PAgP

Submitted by rayc on Mon, 10/25/2021 - 10:51

PAgP or Port Aggregation Protocol, is a Cisco proprietary link aggregation protocol. This protocol works in a similar way to LACP in that it uses PAgP messages to negotiate and establish the etherchannel bundle. Like LACP, PAgP has two modes for configuration:

  • Auto: An interface in this mode will not try to establish a PAgP etherchannel and will not send and PAgP messages. If the port hears a PAgP message it will respond and attempt to negotiate an etherchannel.
  • Desirable: In this mode, the switch will actively try to establish an etherchannel with the neighbouring switch.

 

By default, PAgP operates in silent mode which allows it to establish an etherchannel even if the other end is silent and doesn't natively talk PAgP. The keyword there is IF the neighbour is silent. When you enable silent-mode on a PAgP port (which it is by default), it will actively listen for PAgP packets. If none are heard, it will assume that an etherchannel bundle should be established anyway. This allows PAgP to be used when creating etherchannels with servers etc.  It's recommended to always use the non-silent keyword wherever possible as this tells PAgP to actively send messages to negotiate the etherchannel and also results in a link being established much faster.

While silent-mode will still allow you to establish an etherchannel, it can take quite some time before the port is fully established and data will actually flow across the link. Silent-mode will wait for 15 seconds for any PAgP packets before deciding to form an etherchannel. Once the etherchannel has formed, the port must wait for the STP listening and learning states to begin forwarding. This can lead to a 45 second delay before you can traffic can be sent over the port channel.

Like all other etherchannels, PAgP ports must be configured in the same way, as in static access or trunk, speed and duplex must match etc. Once the interface has become a member of the PAgP bundle however, any changes made to a single interface, are automatically replicated to all other ports in the bundle. For example, if you have pruned VLANs on the member trunk interfaces, and you add an additional VLAN to one interface, PAgP will automatically add the VLAN to the other interfaces. You can find the list of what must match in my previous article here

The first interface that comes up in a PAgP bundle provides the MAC address for the port-channel interface. If that link fails, then the next interface MAC is used. We can verify this by looking at the MAC table, the shutting down the active port with the same MAC.

Port-channel MAC address

Below is a capture of the PAgP headers showing the information that is sent between neighbours. 

--------- packet capture of headers --------------

Configuring PAgP

When configuring PAgP use the command channel-protocol pagp (this tells the switch to expect PAgP commands and not allow either LACP or On etherchannel commands) followed by channel-group <num> mode <auto|desirable> {non-silent}.

Enabling PAgP on SW2

Notice that the port channel status in the output of the show etherchannel summary command shows the ports as I for standalone. In this state the ports will send data as normal ports but will not participate in the etherchannel. This is because as I mentioned, PAgP operates in silent mode and will still bundle the ports even when no PAgP messages have been heard. Now let's configure SW3 to use PAgP mode of auto but still without the non-silent keyword.

Enabling PAgP on SW3

Notice the time it took for the port channel to be established and transition to an up state. Let's wipe the PAgP config on SW2 and start again but this time with the non-silent keyword.

Configuring PAgP in non-silent mode

Notice that the etherchannel came straight up as soon as the command was entered. I also purposely used channel-group 2 to show that the channel groups do not need to be the same on both ends of the switch. 

Like LACP, you can configure a minimum number of links required to establish a port channel. This configuration is done under the port channel interface itself using the command port-channel min-links <num> where <num> is a value between 2 and 8. 

Configuring PAgP minimum links

If you look at the output of the show pagp neighbor command, you can see the the devices are configured to use slow PAgP messages, while you can use the interface configuration subcommand pagp rate fast, i've tried it on a few platforms and it doesn't seem to actually do anything.

pagp rate fast command 

Verifying PAgP

To verify that your PAgP configuration is correct and that the ports are up and in the correct mode, use the command show etherchannel summary.

show etherchannel summary

As with LACP, PAgP devices maintain neighbour information. This includes the ports that are in use, the neighbours device ID, and the status of the ports. To view this information use the command show PAgP neighbors.

show pagp neighbor

To verify that PAgP messages are being sent and receives, you can view the number of messages sent by using the show command show pagp counter. You can reset the counters by using the command clear pagp counters. 

show pagp counter

 

PAgP learn method

By default when you configure an etherchannel, the switch will either learn MAC addresses on the physical ports, or on the aggregate (logical) port. By this I mean that when a frame comes in over the etherchannel, the switch will learn its source port as either the physical interface in the bundle, or as from the port channel logical interface. PAgP enables switches are not capable of learning this information about its neighbouring switch so you must manually configure this setting. To change the PAgP learning method,  Use the Port-channel interface configuration file subcommand pagp learn-method <aggregation-port|physical-port>. If you have to change the PAgP learn method to physical-port, you also must change the load balancing method to src-mac. 

----------- PAgP learn method -------------