LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 08-09-2011, 11:50 AM   #1
JasonHarper
LQ Newbie
 
Registered: Aug 2011
Posts: 12

Rep: Reputation: Disabled
Xen with Bonding / Bridge


Hello,

I'm read and re-read all the information out there on setting this up but I must be missing something. Here's my setup: Server with 3 NIC's - I want eth0 and eth1 to be in a bond for redundancy and eth2 is stand alone used for private server-to-server communication.

I've taken all the following steps:

1. Added the following lines to modprobe.conf
alias bond0 bonding
options bond0 miimon=80 mode=5

2. Configured ifcfg-bond0
DEVICE=bond0
IPADDR=x.x.x.x
NETMASK=255.255.255.0
ONBOOT=yes
BOOTPROTO=none
USERCTL=no

3. Configured ifcfg-eth0 and ifcfg-eth1
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=none
USERCTL=no
MASTER=bond0
SLAVE=yes

DEVICE=eth0
ONBOOT=yes
BOOTPROTO=none
USERCTL=no
MASTER=bond0
SLAVE=yes

If I reboot at this point, everything works exactly as expected. Then I go into xend-config.sxp and add the following:

(network-script 'network-bridge netdev='bond0')

If I restart again, everything seems to be fine at this point. Then I go about adding some virtual machines and everything is great. However, when I reboot again, that's when everything goes down hill. I get error messages during startup saying Device eth0 has different MAC address than expected and/or networking just fails and I can't get to or from the box.

I really have no idea what I'm doing wrong and would be so grateful for any guidance! Thank you!

Jason
 
Old 08-09-2011, 03:56 PM   #2
rysic
LQ Newbie
 
Registered: Aug 2011
Posts: 21

Rep: Reputation: Disabled
There is problem with bonding and bridge in Linux... :/ I have also some problems with that configuration and in many forums can't find answer but may be I can help you somehow. First question is if you changed bond0 interfase configuration from static to manual?
Code:
iface bond0 inet manual
That is first step... I have one working bonding + bridge configuration in phisical host but in virtual it is not working for me still. Please check it and if it will not work, I'll compare cfg in work.
 
Old 08-09-2011, 09:40 PM   #3
JasonHarper
LQ Newbie
 
Registered: Aug 2011
Posts: 12

Original Poster
Rep: Reputation: Disabled
Thank you for the response! I finally actually got this working. I actually ended up creating a bridge (xenbr0) and disabling the bridge script in Xen. Everything came up beautifully after that.


Quote:
Originally Posted by rysic View Post
There is problem with bonding and bridge in Linux... :/ I have also some problems with that configuration and in many forums can't find answer but may be I can help you somehow. First question is if you changed bond0 interfase configuration from static to manual?
Code:
iface bond0 inet manual
That is first step... I have one working bonding + bridge configuration in phisical host but in virtual it is not working for me still. Please check it and if it will not work, I'll compare cfg in work.
 
Old 08-10-2011, 11:16 AM   #4
rysic
LQ Newbie
 
Registered: Aug 2011
Posts: 21

Rep: Reputation: Disabled
Can you show me exactly what you have in configuration files? It is still not working for me like I want in LXC virtualization :/
 
Old 08-10-2011, 02:45 PM   #5
JasonHarper
LQ Newbie
 
Registered: Aug 2011
Posts: 12

Original Poster
Rep: Reputation: Disabled
Sure thing! This is what I have:

ifcfg-eth0

DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
ISALIAS=no

ifcfg-eth1

DEVICE=eth1
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
ISALIAS=no

ifcfg-eth1

DEVICE=bond0
BOOTPROTO=none
BONDING_OPTS="mode=1 miimon=100"
ONBOOT=yes
BRIDGE=xenbr0

ifcfg-xenbr0

DEVICE=xenbr0
BOOTPROTO=static
IPADDR=x.x.x.x
NETMASK=x.x.x.x
ONBOOT=yes
TYPE=bridge

vi /etc/xen/xend-config.sxp
Comment out ALL (network-script network-bridge)

service xend restart
service network restart


Quote:
Originally Posted by rysic View Post
Can you show me exactly what you have in configuration files? It is still not working for me like I want in LXC virtualization :/
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
bonding + bridge + lxc = virtual host routing problem rysic Linux - Networking 0 08-07-2011 02:18 PM
Configuration of bonding on Xen chandu.bezawada Linux - Virtualization and Cloud 0 02-21-2011 10:19 AM
Using Xen and NIC bonding: please help! djbon2112 Linux - Server 1 07-02-2009 03:48 PM
Xen and eth bonding on Debian Lenny = PITA! djbon2112 Linux - Server 2 05-21-2009 01:00 PM
Nic bonding in XEN kernel akvino Linux - Enterprise 2 08-28-2008 10:56 AM


All times are GMT -5. The time now is 03:32 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration