Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 4th June 2013, 17:28
badassbob badassbob is offline
Junior Member
 
Join Date: Nov 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Centos6.4 - lacp (bond 4) + bridge setup

I followed the Centos 6.4 KVM howto, and it worked perfect. I setup QEMU on a Slackware box to admin the guest, and that works great too.

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. 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
Reply With Quote
Sponsored Links
  #2  
Old 5th June 2013, 00:08
badassbob badassbob is offline
Junior Member
 
Join Date: Nov 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default Solved

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 With Quote
Reply

Bookmarks

Tags
802.3ad, bridge, centos 6.4, kvm, lacp

Thread Tools
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Configuring DNS for Primary Servers In Multi-Server Setup darinpeterson HOWTO-Related Questions 7 27th January 2013 20:01
ISPconfig setup - DNS, router and general access problems ingvar Installation/Configuration 6 31st July 2010 14:13
Chrome + Ubuntu + Flash player andor Desktop Operation 1 25th May 2010 17:59
Server randomly stops responding Jayock Server Operation 12 16th October 2007 12:34
Advice on how to setup Lintrack As A LAN Gateway And An OpenVPN Bridge eddiequek HOWTO-Related Questions 0 12th July 2007 11:38


All times are GMT +2. The time now is 19:13.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.