Re: Two NICs, same network...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 8 May 2007, semi linux wrote:

Ok... you asked for the whole thing, here it is (forget my previous example):

eth0 - 10.1.1.1
eth1 - N/A
eth2 - N/A
br0 (eth1, eth2) - 10.1.1.2
target - 10.1.1.3

The bridge (br0) is setup using brctl and seems to work w/o problem...
The eth1 and eth2 IP addresses really don't matter since they are both
referenced via the bridge and are set to something invalid.  10.1.1.3
is connected via cross-over cable to eth2 port.  br0 and eth0 are
connected to my network on the same subnet.

What I'd like:
- all packets (from the network or local) where destination=10.1.1.3
to be routed to eth2.
- otherwise, all traffic from the network to use eth0 for I/O.

Basically, I want to specify that ONLY traffic for 10.1.1.3 is to use eth2.

I may be missing something, but this seems trivial

define br0 to include eth0 and add 10.1.1.1 to the bridge (br0:0 for example)

then the normal bridgeing code will limit traffic out eth2 to stuff destined for 10.1.1.3 or stuff that the bridgeing code doesn't know where it goes.

if this isn't good enough you can use iptables to put additional filters on the bridge port (search for bridge + iptables and you should find lots of documentation on how to do this)

David Lang


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux