Shawn Delaney
2010-Mar-22 18:58 UTC
[Bridge] bridge and ip addresses on enslaved interfaces
In the documentation I've seen so far a bridge is created with no IP address for its enslaved interfaces and optionally with an IP address on the bridge interface. For example, I create a bridge like so: brctl addbr br0 brctl addif br0 eth0 brctl addif br0 eth1 ifconfig eth0 0.0.0.0 ifconfig eth1 0.0.0.0 ifconfig br0 10.0.0.10 netmask 255.255.0.0 This works fine. However if I do the following: ifconfig eth0 10.0.0.10 netmask 255.255.0.0 ifconfig eth1 10.1.0.10 netmask 255.255.0.0 ifconfig br0 0.0.0.0 the bridge gets created but I can't ping the IP addresses of the enslaved interfaces. With the above configuration I am assuming that the enslaved interfaces still behave independently of the bridge, can be assigned IP addresses and participate in routes. My question is whether this is supported and if I should expect it to work. If so, can someone point me to an example? Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.linux-foundation.org/pipermail/bridge/attachments/20100322/2a4aed88/attachment.htm
richardvoigt at gmail.com
2010-Mar-22 19:23 UTC
[Bridge] bridge and ip addresses on enslaved interfaces
On Mon, Mar 22, 2010 at 1:58 PM, Shawn Delaney <sdelaney at juniper.net> wrote:> In the documentation I?ve seen so far a bridge is created with no IP address > for its enslaved interfaces and optionally with an IP address on the bridge > interface. For example, I create a bridge like so: > > > > brctl addbr br0 > > brctl addif br0 eth0 > > brctl addif br0 eth1AFAIK, after this packets no longer arrive on the eth0 and eth1 logical interfaces. Incoming packets have a receive interface of br0 (and which bridge port is stored for physdev-in matching).> > > > ifconfig eth0 0.0.0.0 > > ifconfig eth1 0.0.0.0 > > ifconfig br0 10.0.0.10 netmask 255.255.0.0 > > > > > > This works fine. However if I do the following: > > > > ifconfig eth0 10.0.0.10 netmask 255.255.0.0 > > ifconfig eth1 10.1.0.10 netmask 255.255.0.0 > > ifconfig br0 0.0.0.0 > > > > the bridge gets created but I can?t ping the IP addresses of the enslaved > interfaces. With the above configuration I am assuming that the enslaved > interfaces still behave independently of the bridge, can be assigned IP > addresses and participate in routes. My question is whether this is > supported and if I should expect it to work. If so, can someone point me to > an example? > > > > Thanks. > > > > > > > > _______________________________________________ > Bridge mailing list > Bridge at lists.linux-foundation.org > https://lists.linux-foundation.org/mailman/listinfo/bridge >
Bart De Schuymer
2010-Mar-23 07:54 UTC
[Bridge] bridge and ip addresses on enslaved interfaces
Shawn Delaney schreef:> In the documentation I've seen so far a bridge is created with no IP address for its enslaved interfaces and optionally with an IP address on the bridge interface. For example, I create a bridge like so: > > brctl addbr br0 > brctl addif br0 eth0 > brctl addif br0 eth1 > > ifconfig eth0 0.0.0.0 > ifconfig eth1 0.0.0.0 > ifconfig br0 10.0.0.10 netmask 255.255.0.0 > > > This works fine. However if I do the following: > > ifconfig eth0 10.0.0.10 netmask 255.255.0.0 > ifconfig eth1 10.1.0.10 netmask 255.255.0.0 > ifconfig br0 0.0.0.0 > >Sounds like you want to make a brouter. You can use the ebtables broute table for that. See: http://ebtables.sourceforge.net/examples/basic.html#ex_brouter cheers, Bart -- Bart De Schuymer www.artinalgorithms.be