2.6 Port Aggregation with EtherChannel
Cisco provides a method of increasing link bandwidth between two systems by aggregating or bundling Ethernet links, using EtherChannel technology. Two to eight links of either Fast Ethernet (FE) or Gigabit Ethernet (GE) can be bundled as one logical link of Fast EtherChannel (FEC) or Gigabit EtherChannel (GEC), respectively. This bundle provides a full-duplex bandwidth of up to 1600 Mbps on 8 links of Fast Ethernet or 16 Gbps on 8 links of Gigabit Ethernet. This provides load sharing and redundancy capabilities. If a link fails in the FEC or GEC bundle, traffic sent through that link will move to an adjacent link. When links are restored, the load will be redistributed among the links.
2.6.1 Bundling Ports with EtherChannel
Fast EtherChannel is available on the Catalyst 1900, 2820, 2900, 2900XL, 3500XL, 4000, 5000, and 6000 families. Gigabit EtherChannel is supported only on the Catalyst 2900, 2900XL, 4000, 5000, and 6000 families. Most of the switch families support a maximum of four Fast Ethernet or Gigabit Ethernet links bundled in a single EtherChannel link. However, the Catalyst 6000 family supports up to eight bundled links while the Catalyst 6000 supports up to 128 individual EtherChannel links.
All bundled ports must belong to the same VLAN. If used as a trunk, bundled ports must all be in trunking mode and pass the same VLANs. Also, each of the ports must be of the same speed and must be in duplex mode before they are bundled.
2.6.2 Distributing Traffic in EtherChannel
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 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.
In a two-link EtherChannel, 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 or a link number from 0 to 3.
Communication between two devices will always be sent through the same EtherChannel link because the two endpoint addresses stay the same. However, when a device communicates with several other devices, chances are that the destination addresses are equally distributed with zeros and ones in the last bit. This causes the frames to be distributed across the EtherChannel links.
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.
2.6.3 Port Aggregation Protocol (PAgP)
Cisco developed the Port Aggregation Protocol (PAgP) to provide automatic EtherChannel configuration and negotiation between switches. PAgP packets are exchanged between switches over EtherChannel-capable ports. The identification of neighbors and port group capabilities are learned and are compared with local switch capabilities. Ports that have the same neighbor device ID and port group capability will be bundled together as a bidirectional, point-to-point EtherChannel link. PAgP will form an EtherChannel only on ports that are configured for either identical static VLANs or trunking. PAgP also dynamically modifies parameters of the EtherChannel if one of the bundled ports is modified. When ports are bundled into an EtherChannel, all broadcasts and multicasts are sent over one port in the bundle only. Broadcasts will not be sent over the remaining ports and will not be allowed to return over any other port in the bundle. Switch ports can be configured for one of three PAgP modes:
Auto is the default mode. In this mode PAgP packets are sent to negotiate an EtherChannel only if the far end initiates EtherChannel negotiations. Auto mode is thus a passive mode that requires a neighbor in desirable mode.
On, in this mode the ports will always be bundled as an EtherChannel. No negotiation takes place because PAgP packets are not sent or processed.
Off, in this mode the ports will never be bundled as an EtherChannel. They will remain as individual access or trunk links.
Desirable, in this mode PAgP packets are sent to actively negotiate an EtherChannel. This mode starts the negotiation process, and will bring up a successful EtherChannel with another switch in either desirable or auto mode.
The following command is used to configure switch ports for PAgP:
SwitchTKl(config)# interface type mod/num SwitchTKl(config-if)# channel-protocol pagp
SwitchTK1(config-if)# channel-group number mode {on | auto | desirable}
2.6.4 Link Aggregation Control Protocol (LACP)
LACP defined in IEEE 802.3ad can be used instead of PAgP. LACP operates much like PAgP, and can be configured in active mode. The difference is that LACP allocates roles to the EtherChannel's endpoints. A switch that has the lowest system priority, a 2-byte priority value succeeded by a 6-byte switch MAC address, is able to decide on which ports actively partake in the EtherChannel at a certain time. Ports are chosen and activated in relation to their port priority value, a 2-byte priority succeeded by a 2-byte port number. A low value means a higher priority. A maximum collection of up to 16 possible links can be defined for every EtherChannel. With LACP, a switch chooses up to eight of these links with the lowest port priorities as active EtherChannel links. The rest of the links are put in a standby state. They are only enabled when an active link is down.
The following command is used to configure a LACP EtherChannel:
SwitchTK1(config)# lacp system-priority priority
SwitchTKl(config)# interface type mod/num
SwitchTKl(config-if)# channel-protocol lacp
SwitchTKl(config-if)# channel-group number mode {on | passive | active}
SwitchTKl(config-if)# lacp port-priority priority
2.6.5 Configuring EtherChannel
On a router, EtherChannel is configured by assigning interfaces to a port-channel with the channelgroup number mode on command. The virtual interface is created with the interface portchannel number command.
To configure an EtherChannel on a CLI-based switch, use the Switch (enable) set port channel module_number/port_range mode {on | off | desirable | auto} command and on an IOS-based switch, use the Switch (config-if)# port group group_number [ distribution! source | destination }] command.
Information about the current EtherChannel configuration can be obtained by using the show port channel [ moduie_number/port_number ] [ info | statistics ] command on a CLI-based switch and the show port group [ group_number ] command on an IOS-based switch.