LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices

Reply
 
LinkBack Search this Thread
Old 06-04-2013, 09:31 AM   #1
mr.b-o-b
LQ Newbie
 
Registered: Jan 2011
Location: Edina, MN
Distribution: Slackware, CentOS
Posts: 23

Rep: Reputation: 1
Centos6.4 - LACP (bonding mode 4) + bridge setup


I was wondering if anyone has any experience with setting up LACP (802.3ad dynamic link aggregation) & a bridge for use with KVM.

I have a HP ML370 with 2 x gigabit nics that I installed Centos 6.4 & KVM (virgin run with KVM). To keep it simple I just configured 1 nic, and setup a bridge (as the docs recommended). This setup worked fine, and I am using QEMU on a separate Slackware box to admin the guests. I was able to access the host & the guests no problem.

I would like to take advantage of both nics on the server & would like to setup LACP (bonding mode 4) + the Bridge. I am no stranger to LACP, and all my servers with more than 2 nics are setup this way. No problem.

The problem I am having is getting the bonded links to work with the bridge. Does anyone know how to do this? I currently have the bond 4 working, and can confirm on the switch that LACP partnership is active & up. I cannot ping/access the guests anymore, and the guests (using the bridge) cannot access anything.

Here are my config files:

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

ifcfg-eth1
DEVICE=eth1
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no

ifcfg-bond0
DEVICE=bond0
USERCTL=no
BOOTPROTO=none
ONBOOT=yes
BONDING_OPTS="miimon=100 mode=4"
IPV6INIT=no
IPADDR=192.168.12.240
NETMASK=255.255.255.0
GATEWAY=192.168.12.1
DNS1=192.168.12.35

Up to this point bonding works, I can ping the host, and the host can access outbound.

When I originally configged the KVM bridge I called it br0, so I would like to keep this name so I don't have to redo everything.

Some of the docs online mention I need to setup a tagged vlan on the switch for this config. Is this true, do I really need a vlan?
I did setup a tagged vlan (vlan11), and added the following ifcfg files, but no dice.

ifcfg-bond0.11
DEVICE=bond0.11
ONBOOT=yes
BRIDGE=br0
VLAN=yes

ifcfg-br0
DEVICE="br0"
NM_CONTROLLED="yes"
ONBOOT=yes
TYPE=Bridge
BOOTPROTO=none
NAME="System br0"
IPADDR=192.168.12.240
NETMASK=255.255.255.0
GATEWAY=192.168.12.1
DNS1=192.168.12.35
VLAN=yes
STP=on

So, do I really need a vlan setup on the switch for this config?
If not I suppose I can ditch the ifcfg-bond0.11 config file, and remove the tagged vlan from the switch? If this is the case, can I simply add BRIDGE=br0 to the bond0 config, and remove the VLAN & STP from the br0 config?

Any insight on this would be greatly appreciated.

Thanks!

Mr. B-o-B
 
Old 06-04-2013, 03:41 PM   #2
mr.b-o-b
LQ Newbie
 
Registered: Jan 2011
Location: Edina, MN
Distribution: Slackware, CentOS
Posts: 23

Original Poster
Rep: Reputation: 1
I was able to solve the problem. VLAN is not required, so I deleted the vlan from the switch, and removed it from the config files.
I changed the bond0 config to layer 2, and added the BRIDGE setup. Made the br0 (bridge) config layer 3.

Here are the config files for the LACP (2 nics) + Bridge setup for KVM in case anyone else needs help with this type of setup (Centos).

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

ifcfg-eth1
DEVICE=eth1
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no

ifcfg-bond0
DEVICE=bond0
USERCTL=no
BOOTPROTO=none
ONBOOT=yes
BONDING_OPTS="miimon=100 mode=4"
BRIDGE=br0

ifcfg-br0
DEVICE="br0"
NM_CONTROLLED="yes"
ONBOOT=yes
TYPE=Bridge
BOOTPROTO=none
IPADDR=192.168.12.240
PREFIX=24
GATEWAY=192.168.12.1
DNS1=192.168.12.35
DNS2=192.168.11.10
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System br0"

Restarted the network:

Bringing up loopback interface: [ OK ]
Bringing up interface bond0: [ OK ]
Bringing up interface br0: [ OK ]

Check the switch to make sure LACP still active:

PORT LACP TRUNK PORT LACP LACP
NUMB ENABLED GROUP STATUS PARTNER STATUS
---- ------- ------- ------- ------- -------
3 Active Trk9 Up Yes Success
4 Active Trk9 Up Yes Success

Was able to ping the host & guests again. Fantastic!

Have a great day everyone!

Mr. B-o-B
 
  


Reply

Tags
bonding, bridge, centos, kvm, lacp


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 On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
unable to install rhel6/centos6 in GUI mode in KVM Gil@LQ Linux - Virtualization and Cloud 5 12-01-2011 05:22 AM
[SOLVED] Xen with Bonding / Bridge JasonHarper Linux - Networking 4 08-10-2011 02:45 PM
bonding + bridge + lxc = virtual host routing problem rysic Linux - Networking 0 08-07-2011 02:18 PM
Someone setup my linux in bridge mode for Windows server callingcard Linux - Networking 27 03-04-2010 04:16 PM
redhat el4 bonding round robin and LACP testin, bad results help? zerobane Linux - Networking 14 12-01-2009 03:17 PM


All times are GMT -5. The time now is 04:45 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