Section 4.1: Switch Port Aggregation with EtherChannel

Switches can use Ethernet, Fast Ethernet, Gigabit Ethernet, or 10Gigabit Ethernet ports to scale link speeds by a factor of ten. Cisco offers another method of scaling link bandwidth by aggregating or bundling parallel 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. Switches should not be configured to have multiple links connected to form a loop. EtherChannel avoids this situation by bundling parallel links into a single logical link, which can act as either an access or a trunk link. Traffic is balanced across the individual links within the EtherChannel. EtherChannel also provides redundancy through the use of the several bundled physical links. If one of the links in the bundle fails, traffic sent through that link will move to an adjacent link. When links are restored, the load will be redistributed among the links

4.1.1: Bundling Ports with EtherChannel

Generally, all bundled ports must first 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 duplex settings before they are bundled.

4.1.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.

4.1.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:

Switch(config)# interface type mod/num Switch(config-if)# channel-protocol pagp

Switch(config-if)# channel-group number mode {on | auto | desirable)

4.1.4: Link Aggregation Control Protocol (LACP)

LACP defined in IEEE 802.3 and 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:

Switch(config)# lacp system-priority priority Switch(config)# interface type mod/num Switch(config-if)# channel-protocol lacp

Switch(config-if)# channel-group number mode {on | passive | active)

Switch(config-if)# lacp port-priority priority

4.1.5: EtherChannel Configuration

Before configuring switch ports into an EtherChannel bundle, you should ensure that the switch module supports it by using the show port capabilities [ module_number/port_number ] command. The output of the show port capabilities command will show the acceptable port groupings, if they are available.

The following guidelines that apply to the switch ports that will be grouped into an EtherChannel:

• All ports should be assigned to the same VLAN or configured for trunking. In the latter case, all ports should have the same trunk mode and should carry the same VLANs over the trunk.

• All ports should be configured for the same speed and duplex mode.

• The ports should not be configured as dynamic VLAN ports.

• All ports should be enabled.

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.