Joakim Tjernlund
2010-Mar-25 16:42 UTC
[Bridge] IP address on physcial interface instead of bridge interface?
Currently it isn't possible to to have an IP address on one of interfaces attached to a bridge, one must always put the IP address on the bridge interface itself. I wonder if there is a technical reason for that? I would love to be able to be able to chose any ONE interface attached to the bridge. Example: Assume br0 bridge with two interfaces attached, eth0 and eth1. Then I would like to assign the IP address to eth0 instead of br0. Ideally one should be able to just attach eth0 with an existing IP address to br0. Jocke
richardvoigt at gmail.com
2010-Mar-25 17:03 UTC
[Bridge] IP address on physcial interface instead of bridge interface?
On Thu, Mar 25, 2010 at 11:42 AM, Joakim Tjernlund <joakim.tjernlund at transmode.se> wrote:> > Currently it isn't possible to to have an IP address on one of interfaces > attached to a bridge, one must always put the IP address on the bridge interface itself. > > I wonder if there is a technical reason for that? I would love to be able > to be able to chose any ONE interface attached to the bridge. > Example: > Assume br0 bridge with two interfaces attached, eth0 and eth1. > Then I would like to assign the IP address to eth0 instead of > br0. Ideally one should be able to just attach eth0 with an existing IP address > to br0.Migrating existing configuration to the bridge at the time a port is added (and back to one member when the bridge is dissolved) has been discussed quite a bit recently, and is completely different from trying to independently configure L3 state of bridge ports at arbitrary times.> > ? ?Jocke > > _______________________________________________ > Bridge mailing list > Bridge at lists.linux-foundation.org > https://lists.linux-foundation.org/mailman/listinfo/bridge >
Joakim Tjernlund
2010-Mar-28 18:27 UTC
[Bridge] IP address on physcial interface instead of bridge interface?
Bart De Schuymer <bdschuym at pandora.be> wrote on 2010/03/28 14:48:52:> > Stephen Hemminger schreef: > > > > If you read the network receive code path in the kernel, you > > will see that there is a special hook used. Basically, > > > > if received_interface_is_part_of_bridge(incoming_interface) > > then process_bridged_packet(packet) > > > > Then bridge looks at packet and decides whether it is local or forwarded. > > The problem is with your application if it wants to use eth0 directly. > > > > > The ebtables brouting chain was designed to enable you to do this.Can you give me an example? Jocke
Joakim Tjernlund
2010-Mar-28 19:04 UTC
[Bridge] IP address on physcial interface instead of bridge interface?
Joakim Tjernlund/Transmode wrote on 2010/03/28 20:27:10:> > Bart De Schuymer <bdschuym at pandora.be> wrote on 2010/03/28 14:48:52: > > > > Stephen Hemminger schreef: > > > > > > If you read the network receive code path in the kernel, you > > > will see that there is a special hook used. Basically, > > > > > > if received_interface_is_part_of_bridge(incoming_interface) > > > then process_bridged_packet(packet) > > > > > > Then bridge looks at packet and decides whether it is local or forwarded. > > > The problem is with your application if it wants to use eth0 directly. > > > > > > > > The ebtables brouting chain was designed to enable you to do this. > Can you give me an example?Found this on the net: ebtables -t broute -A BROUTING -p 0800 -i eth1 --ip-dst 192.168.1.16 -j DROP ebtables -t broute -A BROUTING -p 0806 -i eth1 -d 00:06:9C:00:B2:FB -j DROP ebtables -t broute -A BROUTING -p 0806 -i eth1 --arp-ip-dst 192.168.1.16 -j DROP 192.168.1.16 and 00:06:9C:00:B2:FB are the IP and MAC addresses of eth1. Then add eth1 to the bridge and it appears to be working as I want. Are there any "gotcha's" with this method? Jocke
Joakim Tjernlund
2010-Mar-29 06:57 UTC
[Bridge] IP address on physcial interface instead of bridge interface?
Joakim Tjernlund/Transmode wrote on 2010/03/28 21:04:11:> Joakim Tjernlund/Transmode wrote on 2010/03/28 20:27:10: > > > > Bart De Schuymer <bdschuym at pandora.be> wrote on 2010/03/28 14:48:52: > > > > > > Stephen Hemminger schreef: > > > > > > > > If you read the network receive code path in the kernel, you > > > > will see that there is a special hook used. Basically, > > > > > > > > if received_interface_is_part_of_bridge(incoming_interface) > > > > then process_bridged_packet(packet) > > > > > > > > Then bridge looks at packet and decides whether it is local or forwarded. > > > > The problem is with your application if it wants to use eth0 directly. > > > > > > > > > > > The ebtables brouting chain was designed to enable you to do this. > > Can you give me an example? > > Found this on the net: > ebtables -t broute -A BROUTING -p 0800 -i eth1 --ip-dst 192.168.1.16 -j DROP > ebtables -t broute -A BROUTING -p 0806 -i eth1 -d 00:06:9C:00:B2:FB -j DROP > ebtables -t broute -A BROUTING -p 0806 -i eth1 --arp-ip-dst 192.168.1.16 -j DROP > > 192.168.1.16 and 00:06:9C:00:B2:FB are the IP and MAC addresses of eth1. > > Then add eth1 to the bridge and it appears to be working as I want. > Are there any "gotcha's" with this method?What about other protocols such as pppoe and OSPF, will these work over eth1 too? Are outgoing pkgs from the host bridged or just sent out over eth1? Jocke