cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
11578
Views
0
Helpful
2
Replies

Linux bonding balance-alb

skherzi75
Level 1
Level 1

Hi,

I want to configure two cisco switches that are stacked to work with a linux bonding in balance-alb (two nics).

The requirement is to plug one nic on each switch.

I have noticed that if the switchport security is set on the two ports, a security violation occurs and one of the port is put in ERR Disabled.

Can someone post a known working configuration for a linux bonding balance-alb (mode 6) ?

I guess the security needs to be disabled, but I guess there is some extra configuration to set.

If needed, here is the configuration on the Linux side:

# cat /etc/modprobe.d/bonding.conf

alias bond0 bonding

options bond0 mode=balance-alb miimon=100

Thanks in advance for your answers.

Regards,

Samir

2 Replies 2

Steve Fuller
Level 9
Level 9

Hi Samir,

The network side of things is simply two ports in the same VLAN so a working configuration could be:

!

interface gi 1/10

switchport

switchport mode access

switch access vlan 10

spanning-tree portfast

spanning-tree bpduguard enable

!

interface gi 1/11

switchport

switchport mode access

switch access vlan 10

spanning-tree portfast

spanning-tree bpduguard enable

!

The clever bit is the way the Linux bonding driver works. As per the Linux Ethernet Bonding Driver HOWTO the way the balance-alb works is as follows:

The bonding driver intercepts the ARP Replies sent by the local system on their way out and overwrites the source hardware address with the unique hardware address of one of the slaves in the bond such that different peers use different hardware addresses for the server.

What this means is that the server IP address is seen to have two different MAC addresses in exactly the same way as Cisco does with GLBP.


If you want devices in the same VLAN to balance the traffic to the two NICs that's all you need to do, but if you're trying to get traffic that's being routed to the server balanced across the two NICs there's a little more to consider.

When I've done this in the past the server NICs were connected to two different access switches and we had two distribution layer routers. So router 1 resolved the servers IP address as MAC X, router 2 resolved the same IP address as MAC Y. Traffic destined to the server coming via router 1 was sent to MAC X, traffic via router 2 went to MAC Y and so the traffic was balanced across the two NICs. I think this should still work the same whether the two NICs are connected to two different physical switches or two switches configured as a stack.

The one thing you will need is two routers, otherwise you'll simply get the MAC address in the ARP table changing from one MAC to the other.

Can you give a little more detail regarding the topology i.e., whether youu have one router or two, whether the switch the server is connected to is also the router or it's a separate device etc. I'd also be interested to see the error message you're getting.

Regards

Hi Steve 

I have a server which is having 4 ports and at server side i will be using balance-alb as the bonding mode. 

Is there any configuration required at the switch in order to have load balancing and redundancy rather than keeping them all in same vlan.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card