CCNP Study Notes – Aggregating Switch Links

By | March 4, 2012

Switch Port Aggregation with Etherchannel


2 to 8 links of 100mb, 1gb or 10gb can be bundled as one logical link of Fast Etherchannel (FEC), Gigabit Etherchannel (GEC), or 10 Gigabit Etherchannel (10 GEC) respectively, giving a full duplex bandwidth of up to 1600mbps, 16gbps or 160gbps.   There are no spanning tree issues as the links are bundled together as one logical link that can be either an access or trunk link.  Devices at either end of the etherchannel must speak “etherchannel” in order for the link to function correctly.


Traffic is distributed across the links in an etherchannel using a load-distribution algorithm, and each link can only operate at it’s maximum inherent speed (200mpbs for FE), so if one link in the bundle is favored by the algorithm then that link will carry a disproportionate amount of traffic.  Redundancy is also built in to etherchannel, so that if one of the links fails then traffic is automatically moved to an adjacent link (transparently to the end user), in less that a few milliseconds.  As links are restored then traffic is automatically distributed over the restored link.


bundled ports must:

  • be of the same type, speed and duplex
  • generally be in the same VLAN
  • If used as a trunk then they must be in trunking mode, have the same native VLAN and pass the same set of VLANs.
  • have the same spanning tree settings

Distributing Traffic in Etherchannel


Frames are forwarded over a specific link as the result of a hashing algorithm.  The algorithm can use the following to compute a binary pattern that selects a link number in the bundle to carry each frame:

  • source IP
  • destination IP
  • combination of source and destination IP
  • source and destination MAC address
  • TCP/UDP port numbers

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


Eg. an etherchannel consisting of 2 links requires a 1-bit index.  If the index is 0, link 0 is selected; if the index is 1, link 1 is selected.  Either the lowest order address bit or the XOR of the last bit of the addresses in the frame is used as the index.  A four link bundle uses a hash of the last two bits, and an eight link bundle uses a hash of the last three bits.


Frame distribution on a two-link etherchannel using the source and destination IP:


Binary Address Two-link Etherchannel XOR and Link Number


…xxxxxxx0: Use link 0


…xxxxxxx0: Use link 1


…xxxxxxx0: Use link 1


…xxxxxxx0: Use link 0


The XOR operation is performed independently on each bit position in the address value.  If the two addresses have the same bit value, the XOR result is always 0.  If the address bits differ then the result is always 1.


Example:  source:, destination:  only the right-most (least significant) 3 bits are needed as an index.  In this case these are: 001 (1) and 110 (6) respectively.  For a 2 link EC a 1 bit XOR is performed on the right-most address bit: 1 XOR 0 = 1, meaning link 1 is used.  For a four link EC, a 2 bit XOR is performed: 01 XOR 10 = 11, meaning link 3 is used.  For an eight link EC, a 3 bit XOR is performed: 001 XOR 110 = 110, meaning link 7 is used.


Configuring Etherchannel Load Balancing


The hashing operation can be performed on either MAC or IP addresses and can be based solely on source or destination addresses, or both.  To set the frame distribution type for all etherchannel switch links:


Switch(config)# port-channel load-balance method


Types of etherchannel load-balancing methods


method Value Hash Input Hash Operation Switch Model
src-ip Source IP address bits All models
dst-ip Destination IP address bits All models
src-dst-ip (default) Source and destination IP address XOR All models
src-mac Source MAC address bits All models
dst-mac Destination MAC address bits All models
src-dst-mac Source and destination MAC address XOR All models
src-port Source port number bits 6500, 4500
dst-port Destination port number bits 6500, 4500
src-dst-port Source and destination port number XOR 6500, 4500


To view the load balancing performance of an etherchannel, use the command show etherchannel port-channel, this shows each link and a Hex load value.


Etherchannel Negotiation Protocols


Port Aggregation Protocol (PAgP) – Cisco proprietary, and Link Aggregation Control Protocol (LACP), which is standards based.


Negotiation Mode   Negotiation Packets Sent Characteristics
On On No All ports channeling
Auto Passive Yes Waits to channel until asked
Desirable Active Yes Actively asks to form a channel


Port Aggregation Protocol (PAgP)


Packets are exchanged between switches over etherchannel capable ports.  Neighbours are identified and port group capabilities are are learned and compared with ports on the local switch.  Ports with the same neighbour device ID, and port group capability are bundled together as a bidirectional point-to-point etherchannel link.  EC’s are formed only on ports that are configured for either identical static VLANs or trunking.  EC parameters are dynamically modified, eg. if the speed/duplex/configured VLAN of a port in a bundle is changed then PAgP reconfigures that parameter for all ports in the bundle.


Link Aggregation Control Protocol


Standards based alternative – IEEE 802.3ad, AKA IEEE 802.3 Clause 43, “Link Aggregation).  Operates the same as PAgP, but also assigns roles to the EC’s end points.  The switch withe lowest system prioirity (2 byte priority value followed by a 6 byte switch MAC address), is allowed to make decisions about what ports are actively participating in the EC at any given time.  Ports are selected and become active according to their port-priority value (a 2 byte priority followed by a 2 byte port number), where a low value indicates a higher priority.  A set of up to 16 potential links can be defined for each EC, and the switch will select up to 8 of these having the lowest port priorities as active EC links at any given time.  The other links are in standby until one of the active links goes down.


Etherchannel Configuaration


For each EC on a switch you must chose the negotiation protocol and assign the individual ports to it.  If you set the mode to ON, then neither PAgP or LACP packets are sent or received.  As ports are configured to be members of an EC, the switch automatically creates a logical port channel interface that represents the channel as a whole.


Configuring PAgP (the default)


Switch(config)# interface type mod/num

Switch(config-if)# channel-protocol pagp

Switch(config-if)# channel-group number mode {on | {{auto | desirable} [non-silent]}}


By default PAgP operates in silent sub-mode with the desirable and auto modes.  If you expect a PAgP capable switch to be on the far end then you should add the  non-silent keyword to the desirable or mode – this requires each port to receive PAgP packets before adding them to a channel.


Config example – EC with load balancing hash of source and destination port numbers, the switch actively negotiating, without waiting to listen for silent partners:


Switch(config)# port-channel load-balance src-dst-port

Switch(config)# interface range gig 3/1 – 4

Switch(config-if)# channel-protocol pagp

Switch(config-if)# channel-group 1 mode desirable non-silent


Configuring LACP


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


system priority can be 1-65635 and should be defined first, default is 32,768) if both ends are the same then the switch with the lowest MAC address will be the ecision maker in the EC set up.  More interfaces than are allowed can be configured in the channel, and these will be in standby in case an interface fails.  Configure the active interfaces with a lower port priority (1-65635) using lacp port-priority, and a higher port priority for the standby interfaces.  IUf left to defaults then the lower numbered ports will be active.


Config example – EC with this switch as the decision maker (lower system priority), with some links set as standby by leaving their port priority as default and setting the active ports to 100:


Switch(config)# lacp system-priority 100

Switch(config)# interface range gig 2/1 – 4, gig 3/1 – 4

Switch(config-if)# channel-protocol lacp

Switch(config-if)# channel-group 1 mode active

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

Switch(config-if)# exit

Switch(config)# interface range gig 2/5 – 8, gig 3/5 – 8

Switch(config-if)# channel-protocol lacp

Switch(config-if)# channel-group 1 mode active


Troubleshooting Etherchannel

  • consistent configuration at both ends – access/trunk, speed/duplex, native VLAN etc
  • EC on mode does not send or receive PAgP or LACP packets, so both ends must be set to on for a channel to form
  • desirable (PAgP) and active (LACP) ask the far end to form a channel, so the far end must be set to either desirable or auto mode
  • EC auto (PAgP) or passive (LACP) participates in a channel but only if the far end asks, therefore auto or passive at both ends = no channel
  • PAgP desirable and auto modes default to silent sub-mode, in which no PAgP packets are expected from the far end.  If set to non silent mode then PAgP packets must be received before a channel will form
  • show etherchannel summary – shows each ports status within the channel
  • show etherchannel port – verify the negotiation mode and protocol
  • show interface type mod/num etherchannel – shows all active etherchannel parameters for a port
  • show etherchannel port-channel – time stamps of EC changes, and port index used by hashing algorithm
  • show etherchannel detail – detailed status about each component
  • show etherchannel load-balance – LB hashing algorithm
  • show {pagp | lacp} neighbor – EC neighbours on each port
  • show lacp sys-id – LACP system ID

Category: Certification Study Notes SWITCH Tags: , , ,

About Rich Bibby

Rich Bibby is a UK based Network Engineer, working mainly with Cisco, Juniper and Arista gear in the enterprise LAN, WAN and Data Centre space. Aside from route/switch/firewalling, he is interested in open source network monitoring and management tools, and exploring the possibilities that automation and programmability bring to networking. Follow Rich on Twitter

Leave a Reply

Your email address will not be published. Required fields are marked *