Distributing Traffic in Ether Channel

Traffic in an EtherChannel is statistically load-balanced across the individual links bundled together. However, the load is not necessarily balanced equally across all of the links. Instead, frames are forwarded on a specific link as a function of the addresses present in the frame. Some combination of source and destination addresses (either MAC or IP addresses) is used to form a binary pattern used to select a link number in the bundle.

Switches perform an exclusive-OR (XOR) operation on one or more low-order bits of the addresses to determine what link to use. For example, an EtherChannel consisting of two links bundled together requires the XOR of the last bit of the addresses in the frame. A four-link bundle uses the XOR of the last two bits. Likewise, an eight-link bundle uses the XOR of the last three bits. The outcome of the XOR operation selects the outbound link of the EtherChannel. Table 5-2 shows the results of an XOR on a two-link bundle.

Table 5-2 Frame Distribution on a Two-Link EtherChannel

Binary Addresses Two-Link EtherChannel XOR and Link Number

Addrl:

.. xxxxxxxO

Addr2:

.. xxxxxxxO

... xxxxxxxO: Link 0

Addrl:

.. xxxxxxxO

Addr2:

.. xxxxxxxl

... xxxxxxxl: Link l

Addrl:

.. xxxxxxxl

Addr2:

.. xxxxxxxO

... xxxxxxxl: Link l

Addrl:

.. xxxxxxxl

Addr2:

.. xxxxxxxl

... xxxxxxxO: Link 0

The XOR operation is performed independently on each bit position in the address value. If the two address values have the same bit value, the XOR result is 0. If the two address bits differ, the XOR result is 1. In this way, frames can be statistically distributed among the links with the assumption that MAC or IP addresses are statistically distributed throughout the network. In a four-link EtherChannel, the XOR is performed on the lower two bits of the address values resulting in a two-bit XOR value (each bit is computed separately) or a link number from 0 to 3.

A conversation between two devices will always be sent through the same EtherChannel link because the two endpoint addresses stay the same. However, when a device talks to several other devices, chances are that the destination addresses are equally distributed with zeros and ones in the last bit (even and odd address values). This causes the frames to be distributed across the EtherChannel links. Note that a conversation between two end devices to create a load imbalance is possible using one of the links in a bundle because all traffic between a pair of stations will use the same link.

Switches with an Ethernet Bundling Controller (EBC) are limited to distributing frames based on source and destination MAC addresses only. For each frame, the source MAC address is XOR'd with the destination MAC address. Because this is the only choice, no switch configuration is necessary.

Switches such as the IOS-based Catalyst 2900 and 3500XL distribute frames according to a different criteria. By default, EtherChannel frames are distributed by the low-order bits of their source MAC addresses. The administrator can select either source or destination addresses as the distribution method by using the following command (the port group is defined in the next section):

Switch (config-if)# port group group-number [distribution {source | destination}]

Other switches, such as the Catalyst 6000, offer more flexibility in computing frame distribution. The XOR operation can be performed on either MAC or IP addresses and can be based solely on source or destination addresses or both. Use the following command to configure frame distribution for all EtherChannel switch links:

Switch> (enable) set port channel all distribution {ip | mac} [source | destination

The default configuration is to use IP addresses, both source and destination. Normally, this action should result in a statistical distribution of frames. However, you should determine if the EtherChannel is imbalanced according to the traffic patterns present. For example, if a single server is receiving most of the traffic on an EtherChannel, the source IP addresses of the stations talking to the server can cause one link to be overused. In the case of a four-link EtherChannel, perhaps two of the four links are overused. Configuring the use of MAC addresses or only the source IP addresses might cause the distribution to be more balanced across all the bundled links.

In applications involving switches like the Catalyst 6000, some EtherChannel traffic may consist of protocols other than IP. For example, IPX or SNA frames may be switched along with IP. Non-IP protocols would need to be distributed according to MAC addresses because IP addresses are not applicable. Here, the switch should be configured to use MAC addresses instead of the IP default.

NOTE A special case results when a router is connected to an EtherChannel because the router will use its own MAC address in all frames that it forwards to many end stations. For the EBC-based switch, this means that the destination MAC address is always the same for frames destined through the router. Usually this won't present a problem because the source MAC addresses are all different. When two routers are forwarding frames to each other, however, both source and destination MAC addresses will remain constant and only one link of the EtherChannel will be used. The flexibility in the Catalyst 6000 switch allows the administrator to select exactly which criteria frames will be distributed. If the MAC addresses are remaining constant, you should choose IP addresses instead.

Was this article helpful?

0 0

Responses

  • Conner
    How is traffic distributed on an etherchannel?
    7 months ago

Post a comment