# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback # The primary network interface # IS NO LONGER IN USE, see xenbr0 #allow-hotplug eth0 #iface eth0 inet dhcp # Create a dummy interface to use with a "local-only" # bridge to use for domU-to-domU pure local traffic auto dummy0 iface dummy0 inet manual pre-up ifconfig $IFACE up post-down ifconfig $IFACE down # Bring up eth1, but with no address configuration # eth1 will be used later as a bridge-port interface. auto eth1 iface eth1 inet manual pre-up ifconfig $IFACE up post-down ifconfig $IFACE down # VLAN CREATION # Creating VLANs has become a lot better in Wheezy. # All that is needed to create a VLAN subinterface now, # is to add a stanza for a ethX.Y subinterface. Y becomes # the VLAN ID. # Adding VLANs tagged on eth1. These are simply # brought up, they will be added as bridge-ports later. auto eth1.2 iface eth1.2 inet manual pre-up ifconfig $IFACE up post-down ifconfig $IFACE down auto eth1.3 iface eth1.3 inet manual pre-up ifconfig $IFACE up post-down ifconfig $IFACE down auto eth1.4 iface eth1.4 inet manual pre-up ifconfig $IFACE up post-down ifconfig $IFACE down auto eth1.5 iface eth1.5 inet manual pre-up ifconfig $IFACE up post-down ifconfig $IFACE down # BRIDGES # In my setup, I chose to use the "common or default" naming # scheme for the two first bridges created for Xen use, # xenbr0 and xenbr1. Then I added a pure-local bridge, # and finally, I added bridges for VLANs that are used tagged. # For the VLANs, I used 'vlanX' as bridge-name, as this is far # more descriptive in the domU-configs than "xenbr143" # xenbr0 is tied to eth0, and in my setup it is actually using DHCP for address # allocation. In my network, the address given to xenbr0 is locked down # on the DHCP-server side.. auto xenbr0 iface xenbr0 inet dhcp bridge_ports eth0 # Add the bridge for pure local-only communication between # domU's. Just for fun, I'm setting an IP on this interface.. auto xenlocal iface xenlocal inet static bridge_ports dummy0 address 192.168.127.2 netmask 255.255.255.0 bridge_stp off # xenbr1 is tied to eth1 natively. eth1 is also used for tagged VLANs, those # have separate eth1.X definitions above, and separate vlanX bridges below. I'm # not using any IP addressing on eth1 auto xenbr1 iface xenbr1 inet manual bridge_ports eth1 bridge_stp on bridge_maxwait 0 # None of the interfaces below have IP addresses assigned. Any domU hosts using # these are not supposed to use the bridge for direct communication with dom0, # there is an IP on xenbr0, so there is no deed for one on the VLANs # The configuration for the VLANs is very repetitive: An 'auto' line to make # sure the interface comes up automagically, an 'iface' line setting the bridge # name and defining it to 'manual' configuration, definition of the VLAN # subinterface of eth1, and finally setting Spanning Tree to 'on'. # If even more control over the bridge interfaces is needed, man 5 bridge-utils-interfaces auto vlan2 iface vlan2 inet manual bridge_ports eth1.2 bridge_stp on bridge_maxwait 0 auto vlan3 iface vlan3 inet manual bridge_ports eth1.3 bridge_stp on bridge_maxwait 0 auto vlan4 iface vlan4 inet manual bridge_ports eth1.4 bridge_stp on bridge_maxwait 0 auto vlan5 iface vlan5 inet manual bridge_ports eth1.5 bridge_stp on bridge_maxwait 0