Traffic Distribution

Traffic in an EtherChannel is distributed across individual bundled links in a deterministic manner, but load is not necessarily balanced equally. Instead, a hashing algorithm is used to compute a binary pattern that selects a link in the bundle to forward traffic. The hashing can be based on source IP, destination IP, or a combination of both, source and destination MAC addresses or TCP/IP port numbers. For example, a bundle of four links has 2-bits (2^2=4). If index=0, link-0 is selected, index=1, link-1 is selected, and so forth. The hashing is performed using XOR operation. Let us take an example of source and destination IP based traffic distribution. The source IP address is 10.0.0.1 and the destination IP address is 192.168.1.3. The rightmost bits are used for XOR operation. If four links are bundled, 2-bits are required from the last octets. In this case, 01 from 10.0.0.1 and 11 from 192.168.1.3. Now (01 XOR 11) = 10 which is 2 in decimal. Therefore, link-2 is selected for traffic forwarding. Traffic distribution can be modified with “port-channel load-balance ” in global configuration mode (refer to command reference for details).

EtherChannel Negotiation Protocols

  1. Port Aggregation Protocol (PAgP)

Cisco propriety protocol. PAgP forms EtherChannel on ports that configured with identical static VLANs or trunking. Once ports are grouped according to configured parameters, PAgP adds the group to the spanning tree as a single switch port. PAgP can be configured in active (desirable) or passive (auto) mode.

  1. Link Aggregation Control Protocol (LACP)

Defined in IEEE 802.3ad standard. LACP packets are exchanged over EtherChannel enabled interfaces. Like PAgP, ports are identified and grouped according to capabilities learned and compared with local switch. However, LACP also assigns roles to EtherChannel endpoints.

LACP assigns a system priority (2-byte priority followed by 6-byte MAC-address) to each switch. Lower priority switch determines what ports are allowed to actively participate in port aggregation. Ports are also assigned a port priority value (2-byte priority followed by 2-byte port number). Lower priority ports are selected to participate in EtherChannel. LACP allows up to 16-pors to participate in an EtherChannel but only eight can be active at any time. The rest of the link will be put in standby mode. Like PAgP, LACP is also configured in either active or in passive mode.

Warning: Always shutdown the ports to be configured for EtherChannel to avoid (temporary) bridging loops. “no shut” the ports after EtherChannel configuration. For layer-3 EtherChannel, configure the logical PortChannel interface first and then assign it to (layer-3) ports.

Configuration

EtherChannel can be configured either as layer-2 or layer-3. Configuration is straight forward.

Layer-2 EtherChannel

Step-1: interface

Step-3: channel-group mode [on | {auto|desirable|active|passive}]

Step-4: interface portchannel

Auto and Desirable are used PAgP. Active and Passive are configured for LACP.

 

Layer-3 EtherChannel

Step-1: interface portchannel

Step-2: ip address

Step-3: interface ß the actual switchport

Step-4: no switchport ß used as a routed port

Step-5: channel-group mode [on | {auto|desirable|active|passive}]

Step-6: interface portchannel

 

Verification

1- show ehterchannel summary