Home
Main website
Display Sidebar
Hide Ads
Recent Changes
View Source:
XenNetworking
Edit
PageHistory
Diff
Info
LikePages
[Xen] has a set of scripts which manage the networking between the priviledged and unpriviledged domains. It defaults into bridged mode, but can be set up in a routed mode as well, or with any sort of topology you like. See the pages at <b>FIXME</b> for a run down on the differences and what is possible. As of [Xen] 3.0.2 (possibly earlier?), [Xen] will manage renaming your physical [Ethernet] interface to <tt>peth0</tt> (from <tt>eth0</tt>), and will bring up a dummy <tt>eth0</tt> interface with the original [IP] address and join this to the <tt>xenbr0</tt> bridge device. This makes it effectively transparent to the [OS] running in the priviledged domain. !! Xen and [Debian]'s interfaces file As of [Xen] 3.0.2, the [Xen]-provided network scripts mean you don't need to do anything special. If you find yourself running an earlier version of [Xen], I use a set of interfaces stanzas like these to manage my networking: <verbatim> # The physical device xen will take over. Note that I'm not setting an IP address on this device as # doing so will interfere with the bridging that occurs later auto eth0 iface eth0 inet manual # The xen bridge device. Note that in xen 2.x this should be xen-br0, in xen 3.x is should be xenbr0 auto xenbr0 iface xenbr0 inet static bridge-ports eth0 address 192.168.1.253 netmask 255.255.255.0 gateway 192.168.1.254 </verbatim> This will cause debian to bring up <tt>eth0</tt> without an [IP] address, then bring up a bridge device <tt>xenbr0</tt> and add <tt>eth0</tt> to the bridge, and then set up the [IP] address specified. Note again: the above is ''NOT'' needed it you are running [Xen] 3.0.2 or more recent! !! [Xen] and [VLAN]s As of this writing, it seems there is no nice integration with [Xen] and [VLAN]s. To work around this I use a modification of the above ([Debian]-specific) interfaces file to provide multiple bridges to [Xen], on different [VLAN]s: <verbatim> # Physical device accepting vlan-tagged frames auto eth0 iface eth0 inet manual # Vlan device auto eth0.1234 iface eth0.1234 inet manual # Vlan device auto eth0.2000 iface eth0.2000 inet manual # first bridge, for vlan 1234 auto xenbr0 iface xenbr0 inet static bridge-ports eth0.1234 address 192.168.1.1 netmask 255.255.255.0 gateway 192.168.1.254 # second bridge, for vlan 2000 auto xenbr1 iface xenbr1 inet static bridge-ports eth0.2000 address 192.168.2.1 netmask 255.255.255.0 </verbatim> This will bring up two bridges with the specified [IP] addresses. When you create a [Xen] domU, you can specifiy which [VLAN] (or bridge) it belongs to with the <tt>vif</tt> parameters in its config file: <verbatim> # one network interface in the first bridge (vlan 1234) vif = [ 'bridge=xenbr0'] # two network interfaces, one in each (vlan 1234, vlan 2000) # vif = [ 'bridge=xenbr0', 'bridge=xenbr1'] </verbatim> Notes: * You may have to disable the <tt>network-script</tt> parameter in the [Xen] config file in <tt>/etc/xen</tt>, or else it will try to manage <tt>xenbr0</tt> on its own. * This may change with newer versions of [Xen] – make sure to check out what [Xen] supports before assuming you have to do it this way! !! [Xen] and bonded interfaces I assume this works on the same theory as the example for [VLAN] interfaces. (Again, this may change with newer versions of [Xen] – make sure to check out what [Xen] supports before assuming you have to do it this way!) !! See also * LinuxVlanNotes ---- Part of CategoryXen, CategoryNetworking
One page links to
XenNetworking
:
Xen