EtherChannels can be negotiated between two switches; there are two protocols for this negotiation: PAgP and LACP.
PAgP (Port Aggregation Protocol) is a Cisco proprietary solution, and LACP (Link Aggregation Control Protocol) is based on standards for operation with different manufacturers.
All etherchannel member interfaces must be configured with the same protocol on the local and remote switch.
PAgP sends messages with multicast address 0100:0CCC:CCCC and protocol code 0x0104.
It exchanges PAgP packets and compares its neighbor’s information with the local information to validate compatibility to establish the etherchannel.
It dynamically modifies the etherchannel parameters if one of the interfaces is modified. In other words, if the configuration of a member port of the etherchannel group is changed, this is replicated to the other ports that make up the etherchannel group, similar to the range command.
PAgP operates in three modes to establish an etherchannel:
- Desirable: In this mode, the interface attempts to establish an etherchannel and transmits PAgP packets. The etherchannel is established only if the remote interface is configured in auto or desirable mode. This mode can be said to be actively trying to establish an etherchannel.
- Auto: This mode works passively, it does not send PAgP packets but if it receives any, the interface responds to those packets and can establish the etherchannel. If the interfaces of both devices are in auto mode, the etherchannel is not established.
- On: Does not participate in etherchannel negotiation dynamically, i.e., ignoring messages from a desirable port. This mode is the static way to configure an etherchannel.
PAgP etherchannel configuration:
Switch(config)# interface range g0/6 - 10 ! Indicates the protocol to be used Swtich(config-if)# channel-protocol pagp ! Indicate the operating mode of the port Swtich(config-if)# channel-group <id> mode auto | desirable
In the end, a logical interface called Portchannel is created with the id of the group that has been configured, e.g. Portchannel1 (Po1) or Port-channel15 (Po15)
Validation of the etherchannel
Switch# show etherchannel summary
As long as the Portchannel is not established Spanning-tree takes one port of the group as Root (FWD) and blocks the others. When the portchannel is established, the individual interfaces are no longer displayed in STP, and only the logical interface of the portchannel is displayed.
LACP is an open protocol defined by the 802.3ad standard; it uses the MAC address 0180:c200:0002 to exchange messages. When exchanging packets, LACP compares its neighbor’s information with the local information; at the end, it validates the compatibility to raise the etherchannel.
LACP is very similar to PAgP. However, LACP assigns roles to the ends of the etherchannel. The switch with the lowest priority (which can be considered the master) can decide which ports actively participate in the etherchannel. The master switch is determined by the lowest 8-byte system priority (2 bytes of priority + 6 bytes of MAC address). The default priority is 32768 as in STP, and the second tie-breaker is the MAC address again as in STP.
Ports are selected and activated according to their port priority value (a 2 byte priority followed by a 2 byte port number). A low value indicates a higher priority. The port priority ranges from 1 to 65,535; by default also 32768. LACP can define a set of up to 16 possible interfaces for each EtherChannel. Through LACP, a switch selects up to eight interfaces that have the lowest port priorities as active EtherChannel links. The other interfaces are placed in standby and will be enabled in the EtherChannel if one of the active interfaces stops operating.
The operating modes of the interfaces are as follows:
- Active: In this mode, the interface sends LACP messages to establish an etherchannel. Interfaces in active mode can form an adjacency if the remote interface is configured as active or passive.
- Passive: In this mode, the interface does not initiate an etherchannel; it only waits for an active port to send requests to establish the etherchannel.
- ON: This is the static way to configure an etherchannel.
Commands to configure an LACP etherchannel:
! Configure LACP priority, default 32768 Swtich(config)# lacp system-priority 4096 ! Choose interfaces to configure Swtich(config)# interface range g0/1-5 ! Define LACP Protocol Swtich(config-if-range)# channel-protocol lacp ! Assign group id and LACP operation mode Swtich(config-if-range)# channel-group 50 mode active | passive | on ! Specify the priority of the LACP port Swtich(config-if-range)# lacp port-priority 1
Each interface we need to include in a given EtherChannel must be assigned to the same group id. The channel negotiation must be on (channel without LACP negotiation), passive (listen passively and wait to be asked), or active (actively ask).
By default, the switches are configured with the following command to avoid etherchannel misconfigurations that can cause a loop in the network.
Switch(config)# spanning-tree etherchannel guard misconfig
If the switch identifies a problem with the above command, it will automatically shut down the interfaces and place them in an errdisable state.
General verification commands for etherchannel:
Switch# show etherchhannel summary Switch# show etherchhannel port Switch# show etherchhannel detail Switch# show etherchhannel load-balance Switch# show pagp | lacp neighbor ! !Displays priority and MAC Switch# show lacp sys-id ! Switch# test etherchanel load-balance interface port-channel [id] Switch# show interfaces etherchannel g0/1 etherchannel
For more information: