Assume that we have a configured Xen setup, for which we want to add a dummy-net (a virtual network that has no outside connectivity and is used only for domU-to-domU communication).
This material is relevant for Linux Debian (and possibly Ubuntu too).
1) Create a new file /etc/network/xenbr0 with the following contents:
brctl addbr br0
ip link set br0 up
Now make the file executable:
# chmod +x /etc/network/xenbr0
2) Create an interface in domain-0. To do this, edit the following file in domain-0:
/etc/network/interfaces
We need to add the following line to the active network interface (for example, eth0):
up /etc/network/xenbr0
For example, so that the eth0 declaration looks like this (or eth1, eth2 — whichever interface you choose):
# 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
auto eth0
# The primary network interface
allow-hotplug eth0
#NetworkManager#
iface eth0 inet static
address 10.80.94.2
network 10.80.94.0
netmask 255.255.255.0
broadcast 10.80.94.255
gateway 10.80.94.1
dns-nameservers 10.80.1.2 10.80.1.1 94.230.128.3 94.230.129.3
dns-search mydomain
up /etc/network/xenbr0
3) As the network interface for the Xen domU, specify the network bridge. Here is a sample excerpt from the Xen guest machine's config file:
vif = ['mac=00:16:3e:51:fd:79, bridge=br0,model=rtl8139']
After that, either reboot, or manually run /etc/network/xenbr0. It's now ready to use.
Comments