EtherChannel load distribution

pham0329pham0329 Member Posts: 556
Going through the CCNP OCG and I need some clarification on the algorithm used to load balance an EtherChannel.

From page 109 of the book
If only one address or port number is hashed, a switch forwards each frame by using one or more low-order bits of the hash value as an index into the bundled links. If two addresses or port numbers are hashed, a switch performs an exclusive-OR (XOR) operation on one or more low-order bits of the addresses or TCP/UDP port numbers as an index into the bundled links.

Here's how I took it. If I had a bundle of 2 links, and I were to load balance by source MAC address, if the last bit of the MAC address ends with a 0, link 0 will be used. If it ends with 1, link 1 will be used.

If I load balance my source and destination MAC address, if the last bit of both the source/dest mac address is the same, link 0 will be used. If the last bit of the source/destination mac address is different, link 1 will be used.

Is that right?

Comments

  • EdTheLadEdTheLad Member Posts: 2,111 ■■■■□□□□□□
    Don't waste your time thinking about how exactly the etherchannel load balancing works as Cisco have many different implementations of it.The way the hashing is done varies depending on which platform you work on.
    All you need to know is that if you have 1000 flows passing over a bundle, these flows will be statistically multiplexed over the bundle, so each link will gets its fair share of flows.These flows may have different rates so the bw allocation isnt exactly distributed, but theres nothing you can do about this.
    I've done alot of load-balancing testing over bundles and the implementation works well in my opinion.The more flows the better the distribution.
    Networking, sometimes i love it, mostly i hate it.Its all about the $$$$
  • Forsaken_GAForsaken_GA Member Posts: 4,024
    EdTheLad wrote: »
    Don't waste your time thinking about how exactly the etherchannel load balancing works as Cisco have many different implementations of it.The way the hashing is done varies depending on which platform you work on.
    All you need to know is that if you have 1000 flows passing over a bundle, these flows will be statistically multiplexed over the bundle, so each link will gets its fair share of flows.These flows may have different rates so the bw allocation isnt exactly distributed, but theres nothing you can do about this.
    I've done alot of load-balancing testing over bundles and the implementation works well in my opinion.The more flows the better the distribution.

    I disagree with that sentiment. Knowing what options are available for your load balancing scheme is quite a relevant design decision, especially if you're on a platform with limited choices.

    Source MAC is a horrible choice on a segment in which a few high traffic generating sources are on, and can easily leave some links in the bundle totally saturated, while others are virtually un-utilized, and in those situations, knowing you can change to destination mac hashing is a good thing.

    The same holds true for the reverse and destination mac hashing. If everyone in the company stores their home directories on the same server, and that side of the bundle is using destination MAC hashing, then every single one of those file transfers is going to use the same link in the bundle, whether it's 10 or 1000 flows. In that case, changing that side of the etherchannel to source MAC hashing is a very intelligent thing to do.
  • EdTheLadEdTheLad Member Posts: 2,111 ■■■■□□□□□□
    I dont think you understand what i meant.I was not discussing in regards to using the mac address in the hashing which in found in every book on etherchannel.I was talking about when using ip addresses or a combo of ip address and port numbers, how the hashing distributes the flows over the links within the bundle.
    Networking, sometimes i love it, mostly i hate it.Its all about the $$$$
  • Forsaken_GAForsaken_GA Member Posts: 4,024
    EdTheLad wrote: »
    I dont think you understand what i meant.I was not discussing in regards to using the mac address in the hashing which in found in every book on etherchannel.I was talking about when using ip addresses or a combo of ip address and port numbers, how the hashing distributes the flows over the links within the bundle.

    Apparently, I didn't. What I took from your post was you telling the OP not to worry about how etherchannel load balances, because it'll work itself out in the end to a good average. Depending on platform available, and other design choices, that can be the furthest thing from the truth.

    You made no mention that you were talking specifically about IP/Port hashing, and the OP was quoting IP/port from the book, but gave his example based on Source/Dest MAC
Sign In or Register to comment.