WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] Configuring xen bridges and networking issues

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] Configuring xen bridges and networking issues
From: Simon Hobson <linux@xxxxxxxxxxxxxxxx>
Date: Sat, 30 Jul 2011 19:08:14 +0100
Delivery-date: Sat, 30 Jul 2011 11:10:05 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1312048370.3281.4.camel@Astonmartin-U>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <1312048370.3281.4.camel@Astonmartin-U>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Larry Ing wrote:
I am trying to use bridged networking with my Xen VMs, but I am unable
to connect them to the network.  I am running a Debian dom0 with Xen
4.0.1.  I am not seeing a xenbr0 interface in the output of "ifconfig",
but I do see peth0 and eth0.  Running the command "brctl show" tells me
that eth0 is the bridge device.  In my xend-config.sxp I did not name it
eth0, but instead said the following "(network-script 'network-bridge
antispoof=yes bridge=xenbr0')."  How do I create the xenbr0 interface
and have my VMs successfully connect to this bridge?

Basically, forget the Xen bridge setup and let Debian do it. I think the Xen scripts are now acknowledged as possibly not the best in the world. Having looked at them, they seem terribly complicated for what little actually needs to be done.


In /etc/network/interfaces put this stanza :

iface eth0 inet static
  bridge_ports peth0
  address 192.168.x.y
  netmask 255.255.255.0
  gateway 192.168.x.z

This will automatically create a bridge called eth0 and make peth0 an interface bound to it.

In /etc/udev/rules.d/70-persistent-net.rules configure your interface to be named peth0 : SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="xx:xx:xx:77:bc:9d", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="peth0"

In /etc/xen/xend-config.sxp, just make sure none of the network-script options are uncommented.

It should now "just work" - configure your guests to have a IVF on the bridge and that's it. If you have more than one interface, just rinse and repeat the above for each one. You do not have to use eth0, eth1, etc - I usually use something along the lines of ethext, ethbak, ethint, and so on so the names are easier to associate with networks (my hosts at work are connected to a minimum of 3 networks).
--
Simon Hobson

Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users