On Wed, Jun 4, 2014 at 2:00 PM, Steffen Dettmer <[email protected]> wrote:
> how to configure a bridge with multiple static IPs and/or DHPC > via /etc/network/interfaces? > > I tried many combinations, but I didn't find any working one. > > Of course everything works as expected when configuring manually > with "ip", "brctl" etc. Can you post your manual configuration? (By the way, you don't need brctl; "ip link" can create bridges.) > Any working example would be great! > > The rest of the mail discusses what I tried so far. > > Yes, I read man bridge-utils-interfaces(5), but it has simple > examples only (single static IP or no IP). The man page tells, > interfaces used as bridge_ports > > "are the interfaces that are part of the bridge, and > they shouldn't have any stanzas defining them on the > interfaces file" -- man bridge-utils-interfaces(5) > > but this is wrong. There must be a stanza like > > auto eth3.14 > iface eth3.14 inet manual > > otherwise no bridge can use it any only gives an error message > like "interface eth3.14 does not exist!". I suspect that the bridge-utils-interfaces man page refers to physical interfaces. You might want to file an RFE bug for it to work for vlan-tagged interfaces so that: iface br0.100 bridge_ports eth0.100 creates and brings up eth0.100 and br0, as well as br0.100. > For an ordinary ethernet interface, the following works: > > auto eth3.10 > iface eth3.10 inet static > address 10.72.9.17 > netmask 255.255.255.248 > iface eth3.10 inet static > address 10.72.9.25 > netmask 255.255.255.248 > > For bridges, it is not clear how to use multiple stanzas for > multiple IPs; it seems, the options to create the bridge and to > add IPs to it are somehow mixed. > There are options like bridge_ports. They have to be in each > "iface br0" stanza? > > (Experiments show that "bridge_ports" are accumulated (probably > simply because each stanza brctl addif each, in total producing > the desired result), but other options such as bridge_maxwait > are not.) > > The same approach as for Ethernet does not work for Bridges: > > iface br1 inet static > address 10.1.1.1 > netmask 255.255.255.248 > bridge_ports eth3.10 > bridge_maxwait 0 > iface br1 inet static > address 10.1.1.9 > netmask 255.255.255.248 > bridge_ports eth3.11 > bridge_ports eth3.12 > bridge_maxwait 0 > > This adds all interfaces to br1, but only the IP address from the > last block. I can't see the above working. When I've bridged vlan-tagged interfaces, I've used one bridge per vlan. If you want to add more than one ip address to an untagged bridge. This might work: iface br0 inet static address 10.1.1.1 netmask 255.255.255.248 gateway 10.1.1.254 bridge_ports eth0 bridge_ports eth1 iface br0 inet static address 10.1.1.2 netmask 255.255.255.248 gateway 10.1.1.254 bridge_ports eth0 bridge_ports eth1 And this will work: iface br0 inet static address 10.1.1.1 netmask 255.255.255.248 gateway 10.1.1.254 bridge_ports eth0 bridge_ports eth1 up ip addr add 10.1.1.2/29 dev br0 down ip addr del 10.1.1.2/29 dev br0 -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: https://lists.debian.org/CAOdo=SyTJSCwnkhgddr-bTSiRpHgcrbOn_nUvyfj2s=4nus...@mail.gmail.com

