4

Routing for 2 IP bonds with xen virtualisation.......and different network ranges

view full story
linux-howto

http://www.linuxquestions.org – I'm trying to setup the following on a red hat 5 HP DL380 server: (2 bonds mapped to 2 xen bridges on 2 different networks) interfaces bond xen bridge network eth0&eth1 -> bond0 -> xenbr0 -> 172.16.6.0/24 eth2&eth3 -> bond1 -> xenbr1 -> 172.16.5.0/24 For IP bonding I want the OS be responsible for configuring the Network Bridges(not xend). So I've commented out any line starting with '(network-script' in the /etc/xen/xend-config.sxp file. My configuration is as follows: 1) For Bond0: [root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 USERCTL=no ONBOOT=yes MASTER=bond0 SLAVE=yes BOOTPROTO=none [root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth1 DEVICE=eth1 USERCTL=no ONBOOT=yes MASTER=bond0 SLAVE=yes BOOTPROTO=none [root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-bond0 DEVICE=bond0 BOOTPROTO=none ONBOOT=yes #BONDING_OPTS="mode=1 miimon=100" BRIDGE=xenbr0 [root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-xenbr0 DEVICE=xenbr0 IPADDR=172.16.5.172 NETMASK=255.255.255.0 NETWORK=172.16.5.0 #GATEWAY=172.16.5.1 BROADCAST=172.16.5.255 ONBOOT=yes TYPE=bridge USERCTL=no BOOTPROTO=none 2) For Bond1 [root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth2 DEVICE=eth2 USERCTL=no ONBOOT=yes MASTER=bond1 SLAVE=yes BOOTPROTO=none [root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth3 DEVICE=eth3 USERCTL=no ONBOOT=yes MASTER=bond1 SLAVE=yes BOOTPROTO=none [root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-bond1 DEVICE=bond1 BOOTPROTO=none ONBOOT=yes #BONDING_OPTS="mode=1 miimon=100" BRIDGE=xenbr1 [root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-xenbr1 DEVICE=xenbr1 IPADDR=172.16.6.172 NETMASK=255.255.255.0 NETWORK=172.16.6.0 #GATEWAY=172.16.6.1 BROADCAST=172.16.6.255 ONBOOT=yes TYPE=bridge USERCTL=no BOOTPROTO=none The modprobe.conf is setup as follows: [root@localhost ~]# cat /etc/modprobe.conf alias eth0 bnx2 alias eth1 bnx2 alias eth2 e1000e alias eth3 e1000e alias scsi_hostadapter cciss alias scsi_hostadapter1 ata_piix alias bond0 bonding alias bond1 bonding options bond0 mode=1 miimon=100 options bond1 mode=1 miimon=100 I have defined two static routes for each bond, to communicate via 2 different gateways: [root@localhost ~]# cat /etc/sysconfig/network-scripts/route-xenbr0 172.16.5.0/24 via 172.16.5.1 [root@localhost ~]# cat /etc/sysconfig/network-scripts/route-xenbr1 172.16.6.0/24 via 172.16.6.1 The network file is as follows: [root@localhost ~]# cat /etc/sysconfig/network NETWORKING=yes NETWORKING_IPV6=no HOSTNAME=localhost.localdomain GATEWAY=172.16.5.1 The problem is that in the routing table, it seems that both networks are routed via the default gateway: [root@localhost ~]# route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 172.16.6.0 * 255.255.255.0 U 0 0 0 xenbr1 172.16.5.0 * 255.255.255.0 U 0 0 0 xenbr0 192.168.122.0 * 255.255.255.0 U 0 0 0 virbr0 169.254.0.0 * 255.255.0.0 U 0 0 0 xenbr1 default 172.16.5.1 0.0.0.0 UG 0 0 0 xenbr0 The routes I wish to see are: Destination Gateway Genmask Flags Metric Ref Use Iface 172.16.6.0 172.16.6.1 255.255.255.0 U 0 0 0 xenbr1 172.16.5.0 * 255.255.255.0 U 0 0 0 xenbr0 So the static routes that are configured, do not seem to taking effect. Has anybody encountered an issue like this before, or knows where to point me in the right direction? (HowTos)