Score:0

How ARP (address resolution protocol) works with ethernet bonding?

tt flag

We use a dual network card server with bond in 802.3ad mode. The outgoing bandwidth on both network cards is balanced, but the incoming bandwidth is concentrated on one network card. This issue is resolved by modifying the kernel code to make it broadcast the ETH_P_ARP package in __bond_start_xmit function.

So I have questions about how the ARP protocol works in bond mode and why it affects the distribution of incoming bandwidth.

In the case of a single network card, this network card will have its own IP and MAC addresses and establish relationship with other devices on the switch through the ARP protocol. In the case of dual card machine, will these two network cards exposed as a single IP and MAC addresses when in bond and 802.3ad mode? If so, how will the ARP protocol work and which network card will respond to ARP request?

Score:2
ru flag

We use a dual network card server with bond in 802.3ad mode.

While LACP was first introduced in IEEE 802.3ad, it's since been moved to IEEE 802.1AX.

So I have questions about how the ARP protocol works in bond mode and why it affects the distribution of incoming bandwidth.

LAG combines multiple physical ports into a single logical port. It needs to use some form of traffic distribution. How that distribution works on either end is not part of the standard, however - see 802.1AX Clause 6.2.4 Frame Distributor:

This standard does not mandate any particular distribution algorithm(s)

Most implementations use a physical port index derived from a hash function over any subset of {source|destination} {MAC address|IP address|transport layer protocol|transport layer port number}.

Since you're particularly asking about host ingress distribution, that part depends on the uplink switch, its implementation and configuration. Most often, it's best to use a hash over IP addresses and L4 port numbers.

In the case of dual card machine, will these two network cards exposed as a single IP and MAC addresses when in bond and 802.3ad mode?

There are multiple bonding modes, but in LACP mode, all NICs use a single MAC address and as many IP addresses as you've configured on top.

If so, how will the ARP protocol work and which network card will respond to ARP request?

The ARP protocol works completely normally over the single logical interface. Which physical interface sends the ARP responds (or any other frame) doesn't actually matter because its MAC address is only associated with the switch's logical interface. Traffic distribution works as outlined above.

That said, LACP might not be the best bonding mode for your use cases. You should also look into using separate NICs (with their own MAC and IP addresses) with a round-robin access method on the application layer, e.g. via DNS. Or simply a faster NIC.

Andrew Henle avatar
ph flag
DNS round-robin is worse than useless. DNS results are cached in way too many places. If one of the links does fail, round-robin DNS will still try to use it - oops. http://jdebp.info/FGA/dns-round-robin-is-useless.html
Zac67 avatar
ru flag
@AndrewHenle Round-robin DNS can work very nicely provided you've got enough clients to get a statistical distribution. But agreed, with single/few clients it's pretty useless, unless the access protocol itself provides distribution.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.