How to Configure PAgP and LACP

EtherChannel is used to bundle physical links into a single logical link. We can bundle a maximum of 8 physical links into one logical link. When physical links are bundled into a single logical link, the STP only sees one and cannot block anything.

Two types of protocols are used for EtherChannel: Port Aggregation Protocol (PAgP) and Link Aggregation Control Protocol (LACP). EtherChannel protocols remove loops within the physical links.

The EtherChannel protocols also maintain a record of each physical link. In case of any physical link failure or restoration, the protocols manage the deletion and addition of the link without informing the STP about the change. Cisco switches use the IEEE standard Link Aggregation Control Protocol (LACP) and Cisco’s proprietary Port Aggregation Protocol.

Each EtherChannel is called a channel group. We can add a physical port into the group using the “channel-group group-number mode on” command in the interface configuration mode. We can also create and configure the EtherChannel without using PAgP or LACP. This type of EtherChannel is called a static or Unconditional EtherChannel.

Port Aggregation Protocol (PAgP)

Port Aggregation Protocol is a Cisco-proprietary protocol that can only work on Cisco switches or switches licensed by vendors to support Port Aggregation Protocol. The protocol helps automatically create EtherChannel using the exchange of PAGP packets.

Port Aggregation Protocol packets are exchanged between EtherChannel-capable ports to negotiate the establishment of a channel. The protocol also checks for configuration stability and manages link additions and failures between two switches. It ensures that when an EtherChannel is created, all ports have the same type of configuration.

PAGP packets contain all the information of the neighbor switch. The receiving switch learns the neighbor switch identity capability of supporting PAGP and then dynamically groups similarly configured ports into a single logical link. When PAgP is enabled, the PAgP packets are sent after every 30 seconds. The Port-Aggregation Protocol (PAgP) uses the layer 2 multicast address 01-00-0C-CC-CC-CC.

To establish EtherChannel, all ports must have the same data speed, duplex setting, and VLAN information. Any modification to the port configuration can affect all other channel ports. The figure shows the modes for the Port Aggregation Protocol.

PAgP
  • On—Interfaces configured with this mode do not exchange PAgP packets. On mode forces the interface to channel without PAgP or LACP. A port with “on” mode will create an EtherChannel only when another interface group is in EtherChannel “on” mode.
  • PAgP desirable—The interface with PAgP desirable mode remains in an active negotiating state, initiating negotiations with other interfaces by sending PAgP packets every 30 seconds.
  • PAgP auto—An interface with PAgP auto mode is in a passive negotiating state. In this state, the interface replies to the PAgP packets received but does not initiate any Port Aggregation Protocol negotiation.

For establishing EtherChannel, compatibility of the modes on both sides is important. For example, if one side is configured to be in auto mode, waiting for the other side to initiate the EtherChannel negotiation.

If the other side is also set to auto, the PAgP packet will never exchange, and the EtherChannel will not form. If all modes are disabled or no mode is configured, then the EtherChannel is disabled. The figure below illustrates the mode of the Port Aggregation Protocol for EtherChannel establishment.

The on mode manually sets the interface in an EtherChannel without any negotiation. If one side is set to on, the other side must be set to for establishing EtherChannel. Suppose the other side is set to negotiate parameters through the Port Aggregation Protocol. In that case, the EtherChannel is impossible because the side set to on mode does not negotiate. The EtherChannel configuration for the above topology is as follows:

Note:- PAgP Modes are On, Desirable, Auto

Switch1

Switch1(config)#interface range e0/0-3
Switch1(config-if-range)#channel-group 1 mode auto
Switch1(config-if-range)#interface port-channel 1
Switch1(config-if)#switchport mode trunk

Switch2

Switch2(config)#interface range e0/0-3
Switch2(config-if-range)#channel-group 1 mode desirable
Switch2(config-if-range)#interface port-channel 1
Switch2(config-if)#switchport mode trunk

The Port Aggregation Protocol does a configuration check on participating interfaces and confirms that the neighboring interfaces also use the Port Aggregation Protocol. The Port Aggregation Protocol interfaces that don’t have similar configurations will not participate, and we won’t get an accidental switching loop.

LACP

LACP is an open protocol published by IEEE under the 802.3ad specification. The IEEE also released a new definition of the LACP in the IEEE 802.1AX standard for local and metropolitan area networks. LACP similarly allows several physical ports to be bundled to establish a single logical channel.

It allows a switch to negotiate an automatic bundle using the LACP packets. The function of the LACP is similar to that of PAgP with Cisco EtherChannel. The difference is that LACP is an IEEE standard, and PAgP is Cisco Propiaritry. The LACP is used to establish EtherChannels in multivendor environments. We can use both protocols on Cisco devices. The LACP uses multicast address 01-80-c2-00-00-02.

LACP functions the same way and has the same negotiation benefits as PAgP. It helps establish the EtherChannel link by detecting each side’s configuration and checking compatibility. The figure shows the different modes for LACP.

LACP
  • On—similarly, the on mode ensures the interface to channel without LACP. Interfaces with this mode do not exchange LACP packets.
  • LACP active– The active mode places a port in an active negotiating state. The port starts negotiations with other ports by sending LACP packets.
  • LACP passive—The passive mode places a port in a passive negotiating state. In this mode, the port responds to the LACP packets it receives; however, the passive port does not initiate LACP packet negotiation.

Similar to PAgP, modes must be compatible for establishing EtherChannel. The on mode is repeated because it creates the unconditional EtherChannel configuration without PAgP or LACP dynamic negotiation. The simple configuration of LACP for the above topology is as follows:

Note:- LACP Modes are On, Active, Passive

Switch1

Switch1(config)#interface range e0/0-1
Switch1(config-if-range)#channel-group 1 mode active
Switch1(config-if-range)#interface port-channel 1
Switch1(config-if)#switchport mode trunk

Switch2

Switch2(config)#interface range e0/0-1
Switch2(config-if-range)#channel-group 1 mode passive
Switch2(config-if-range)#interface port-channel 1
Switch2(config-if)#switchport mode trunk

The LACP configuration is almost the same as the PAgP configuration. The difference is only the use of the keywords. The keywords used by LACP are active and passive. The active keyword shows that the interface uses the LACP protocol. The passive keyword indicates the use of LACP; however, it can only respond to requests but cannot send any LACP packet.