LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-09-2010, 06:48 AM   #1
redrum123
LQ Newbie
 
Registered: Feb 2010
Posts: 4

Rep: Reputation: 0
Routing on 2 bonds/xen bridges over two different networks


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?
 
Old 02-09-2010, 06:57 AM   #2
redrum123
LQ Newbie
 
Registered: Feb 2010
Posts: 4

Original Poster
Rep: Reputation: 0
just a note as well,

ive tried every combination of adding/removing the gw's from these network scripts:

[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
[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


But the routing table remains incorrect. I can never get bot required routes.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Xen Bridges on Centos5.1 r3sistance Linux - Networking 6 11-14-2008 04:26 PM
static routing between two networks verb Linux - Networking 3 07-04-2008 05:43 PM
2 networks, 2 gateways, routing help guitara Linux - Networking 0 05-20-2006 06:37 PM
routing problem between 2 networks bligg Linux - Networking 6 10-27-2003 02:33 AM
Routing 2 incoming networks into 1 ivanatora Linux - Networking 1 10-19-2003 12:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration