Re: A weird routing question.



Hello,

Ken Sims a écrit :

On Thu, 27 Sep 2007 19:36:35 +0200, none <""testr\"@(none)"> wrote:

On a linux box 'A' which has interfaces eth0, eth1, eth2, eth3, I would
like to do a special treatment on packets incoming via eth0 and whose
source is <some-network>.

I would like these packets be unconditionaly redirected unmodified for
output via interface eth1.

That is:
- even if they were targeted (destination IP) at my box 'A', they will
be re-emitted through eth1.
- even if they would have been forwarded through eth2 or eth3, they
will be re-emitted through eth1 too.

If they would be forwarded anyway, advanced routing can be used to
force them out a specific interface.

Yes.

For packets whose destination is 'A', I think you would need to do
something with netfilter to get the packets on to the forwarding
chain, but I don't know how without changing the destination IP
address.

The highly controversial ROUTE target, which allows to override the routing decision, may help :

This option adds a `ROUTE' target, which enables you to setup unusual
routes. For example, the ROUTE lets you route a received packet through
an interface or towards a host, even if the regular destination of the
packet is the router itself.
.



Relevant Pages

  • Re: What is a default route??
    ... lines run to two different ISPs. ... By "bonding" the NICs the OP could have automatic failover (another ... two route paths. ... route related packets out one interface and other related packets out ...
    (comp.os.linux.networking)
  • Re: When does Linux drop UDP packets?
    ... I have the following setting in which a client that resides on the same ... arrives on any of its interfaces sent by that server. ... If the client removes its default route and doesn't have any route ... the packets get always discarded ...
    (Linux-Kernel)
  • Re: Understanding Local Networking - help please?
    ... incoming packets discarded ... 100 ICMP messages received ... 546 active connections openings ...
    (Fedora)
  • Re: Load Balancing using 2 NICS (same network) with (iproute2) multipath route
    ... I do think your setup will route packets out alternate interfaces, ... On Ciscos you can configure load balancing by alternating by ...
    (comp.os.linux.networking)
  • Re: A weird routing question.
    ... like to do a special treatment on packets incoming via eth0 and whose ... This option adds a `ROUTE' target, which enables you to setup unusual ... though through traffic shaping or accountancy on some other host ...
    (comp.os.linux.networking)