10

I am trying to understand how the architecture works in case of NIC Bonding. The scenario is: There are 2 NICs on the same system. Both are bonded to support failover and load balancing. Hence the IP of the bond driver(virtual) is the IP to which traffic comes when target to any of the NICs. Each NIC is connected to a different switch. Now because these NIC are bonded the switches will have the same IP address pointing to different MAC address. So how will a router decide which switch to forward an incoming request to which is intended for that IP? Will there be 2 entries in the routing table for the same IP address? Will the router broadcast to all switches? Will there be more than one router?

1
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can post and accept your own answer.
    – Ron Maupin
    Jan 3, 2021 at 5:06

1 Answer 1

14

It depends on how the interfaces are bonded.

One way to do this is that only one NIC is really active. If one of the links goes down, then the other NIC starts using the MAC address of the first NIC, or the system issues a gratuitous ARP with its MAC address to get everyone to update their ARP tables.

A close second to this method is that both NICs are used to send, but only one is used to receive.

Any other configuration requires the cooperation of the switches or the sending parties.

Note that unless the switch and the end device agree on a configuration, you could get some bad behavior. For example, the switch might not know which port actually has which MAC and will instead flood ALL traffic for that MAC. Or you could get a non-functional link.


Since you are using Adaptive Load Balancing, I will explain this mode.

Outgoing packets are split based on load.

Incoming packets are a bit trickier. When an ARP request is received, the MAC sent back is based on the requester's IP address. For example, if client A send an ARP request for your IP, it will get the MAC of NIC 1. Later when client B sends an ARP request, it will get the MAC of NIC 2. That way clients are split among the available NIC's.

7
  • The interface are bonded in the Adaptive Load Balancing mode which supports both outgoing and recieving load balancing as well as failure support. This mode does not require any special switch support and is said to achieve load balancing by ARP negotiation. Now if you could please guide me further.. Jun 23, 2014 at 15:06
  • See my edit....
    – longneck
    Jun 23, 2014 at 15:50
  • yes i understand how it works at this level. But I am not clear in case of the communication between router and switches? Jun 23, 2014 at 16:30
  • 1
    Since the router only has one IP address, it will always be directed to a single NIC.
    – longneck
    Jun 23, 2014 at 16:32
  • 2
    For devices off the subnet using ALB, it's not possible.
    – longneck
    Jun 23, 2014 at 17:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.