Setting up Xen and Network Bridges on Debian 7

Hi there. So i am finally going to try out some virtualisation on my new dedicated machine, however i am having some problems / confusion on setting it up, so i will try best to explain my situation, and any help would be much appreciated.

To start, my server has ONE physical network adapter, eth0. The default configuration within /etc/network/interfaces is as follows

### Hetzner Online AG - installimage
# Loopback device:
auto lo
iface lo inet loopback

# device: eth0
auto  eth0
iface eth0 inet static
  # default route to access subnet
  up route add -net netmask gw eth0

iface eth0 inet6 static
  address 2a01:4f8:191:2094::2
  netmask 64
  gateway fe80::1

However i also have a second IP allocation i purchased from my host, just to confirm i can successfully setup what i would like to do (Run roughly 3 virtual machines, each on their own external IP address) on my machine

The information for the second allocation is:


I have installed bridge-utils as directed in the guide i have been following ( http://wiki.xen.org/wiki/Xen_Beginners_Guide#Preparation )

I then add my new bridge using brctl addbr xenbr0

This is where i get stuck, or normally break my networking, which means i have to go into recovery and restore it to what it was originally, which is expected as i do not understand how this all works as of yet.

I am confused because i have seen some guides where you need to setup iface eth0 inet manual and then configure the static ip on the iface xenbr0 inet static and some where it is vice versa. Either way i have attempted has ended up in me breaking my networking as such

So, as a quick summary of what i would like too do:

  • I would like to be able to assign each of my virtual machines their own external IP address
  • I would like to have the dom0 using my first IP allocation ( and my second machine (Which i am using as a tester) using my second IP allocation (
  • I assume i have to use bridge tools to do this correctly? As the Xen guide suggests

I have not been able to find any tutorials which could guide a newbie through this, as i have not used / been into linux networking much, as my machines have always already had it completely configured and ready.

Thanks for any help or articles you point me towards


You want your interfaces file to look like this. Yes, you'll need bridge-utils

auto eth0
iface eth0 inet manual

auto xenbr0
iface xenbr0 inet static
    bridge_ports eth0
    post-up route add -net netmask gw eth0
iface xenbr0 inet6 static

Now, what you want to do is add a second subnet to your internal machine; you're going to need some more post-up routes for that which is out of my scope. But this should get your Dom0 working and a bridge ready for your DomU.

| improve this answer | |

If you are just wanting to get your feet wet, there is a nice GUI in the Debian repository:

apt-get install virt-manager

In particular, note the virtual network configuration bits. You might try setting up a few virtual machines using the GUI and then try a manual setup again.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.