Marco Nenciarini
2010-Jul-08 17:52 UTC
[Xen-users] Setting up bonding + bridges in Debian /etc/network/interfaces
My needing was to configure eth0 eth1 as slave of bond0 with xen. network-bridge script didn''t work because it calls ifdown/ifup on the interface, so after a bit of playing I managed to figure out how to set up it in the Debian Way. However it''s possible to configure as many interfaces as you want in this way. Here''s the content of my /etc/network/interfaces ----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<--- # The bridge interface. # The lines with pre-up and post-down are to bring up the # bond before the bridge. The ''--allow "$IFACE"'' parameter to # ifup/ifdown and the corresponding "allow-br0 bond0" line aren''t # really needed, but I like them. auto br0 iface br0 inet static address 192.168.1.10 netmask 255.255.255.0 gateway 192.168.1.1 bridge_ports bond0 bridge_maxwait 0 pre-up ifup --allow "$IFACE" bond0 post-down ifdown --allow "$IFACE" bond0 # The bond interface # notice it''s set as manual to allow the scripts in ifenslave-2.6 # package to create the master interface and enslave the slaves. allow-br0 bond0 iface bond0 inet manual bond_slaves eth0 eth1 bond_miimon 100 bond_mode balance-tlb # Physical interfaces. # Notice they are set as manual to permit you to add up/down commands # and special directives such as wifi configurations. # Lines beginning with allow-bond0 are required if you want to do # something with these interfaces, otherwise you can remove both of # them as they are brought up when they are enslaved to their master. allow-bond0 eth0 iface eth0 inet manual allow-bond0 eth1 iface eth1 inet manual ---->8---->8---->8---->8---->8---->8---->8---->8---->8---->8---->8--- I hope this helps. Kind regards, Marco -- --------------------------------------------------------------------- | Marco Nenciarini | Debian/GNU Linux Developer - Plug Member | | mnencia@prato.linux.it | http://www.prato.linux.it/~mnencia | --------------------------------------------------------------------- Key fingerprint = FED9 69C7 9E67 21F5 7D95 5270 6864 730D F095 E5E4 _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users