[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-users] bonding + vlan + bridgeing + xen not working


  • To: xen-users@xxxxxxxxxxxxxxxxxxx
  • From: "Eli Criffield" <elicriffield@xxxxxxxxx>
  • Date: Tue, 29 Aug 2006 17:19:19 -0500
  • Delivery-date: Tue, 29 Aug 2006 15:20:10 -0700
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=FkpfUkX7rsNOS9qc6gCDYon/5Wbd4i9nsmWw03+mayl+EeASEl4tP+4f8r9rUwVzPExSYydhzU4Ac838JFaF5i1Uei8Zfg9E9mGDdnW+iL7SPBSUtOYVgG8p17EZQqjBM5IeX/zVgGFTHVvBL+j3vbicKc73OBk1/2UQIcAqtMA=
  • List-id: Xen user discussion <xen-users.lists.xensource.com>

I'm trying to setup bonding combined with vlans with xen. This is
running on a ibm blade with dual ethernet cards.

I commented out the network-script in xend-config.sxp and wrote my own
script. It seems like everything should work.

What i do is first setup bond0 enslaving eth0 and eth1, then create
vlans using bond0 as the device, add those vlan devices to there own
bridge (vlanXXX-br), then use that bridge in the domU configuration
like "vif = [ bridge=vlanXXX-br ]".

Then add vif0.0 to the vlan bridge it needs to be in and configure
veth0 with the dom0 ip and gateway.

dom0 works great, everything comes up and i can connect fine. The domU
guests come up and you can sometimes ping from inside the same vlan
and network, sometimes not. But the domU can't ever ping its own
gateway so no hope of getting out side its own network. Trying
`ethtool -K eth0 tx off` on the domU doesn't change anything.

Here's the script

#!/bin/sh
# read in config for dom0
. /etc/xen/network/dom0

modprobe bonding
modprobe 8021q
modprobe bridge

ip link set bond0 up
ip link set eth0 up
ip link set eth1 up
ip link set bond0 addr fe:ff:ff:ff:ff:ff
ifenslave bond0 eth0 eth1

vconfig set_name_type VLAN_PLUS_VID_NO_PAD

# vlans are stored in /etc/xen/network/vlans one number per line
# it'll create a vlanXXX-br bridge for eath vlan

for vlan in `cat /etc/xen/network/vlans` ; do
  vconfig add bond0 ${vlan}
  vconfig add eth0 ${vlan}
  ip link set vlan${vlan} up
  brctl addbr vlan${vlan}-br
  brctl stp vlan${vlan}-br off
  brctl setfd vlan${vlan}-br off
  brctl addif vlan${vlan}-br vlan${vlan}
  ip link set vlan${vlan}-br up
done

# setup dom0's ip addr on one of the vlan bridgs
# as defined in /etc/xen/network/dom0
brctl addif vlan${dom0_VLAN}-br vif0.0

ip link set veth0 addr 00:0d:60:4e:48:88
ip link set vif0.0 up
ip link set veth0 up
ethtool -K veth0 tx off

ip addr add ${dom0_IPADDR} broadcast ${dom0_BOADCAST} dev veth0
ip route add default via ${dom0_GATEWAY} dev veth0

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.