How to configure PAgP on Cisco switches

In this post, I would like to show you how to configure PAgP on Cisco switches. PAgP is a dynamic link aggregation protocol which helps create an EtherChannel port on Cisco switches.

An EtherChannel interface is the result of bundling multiple physical links into a logical port. It is recommended to use n links to the power of two (For example 2, 4, 8, 16 physical ports). In other technical documents, you can find references to the same concept by the name port-channel, link aggregation group (LAG), and bonding.

The idea behind this concept is to increase the fault tolerance and speed between switches, routers and/or servers. In case of a link failure, the traffic will be redistributed among the remaining links.

Gulian Technology

How to configure PAgP on Cisco switches

Port Aggregation Protocol (PAgP) is a Cisco proprietary protocol. It is used for dynamically establishing an EtherChannel port on Cisco switches. This protocol can be run only on Cisco devices. If you have a mixed environment, you can use LACP.

Check the interface status

Before starting to configure EtherChannel, let’s check the lab network diagram and the interfaces status. I will use 4 interfaces in my lab. All of them are in connected status.

Output SW0:

SW0#show int status

Port      Name               Status       Vlan       Duplex  Speed Type 
Gi0/0                        connected    1          a-full   auto RJ45
Gi0/1                        connected    1          a-full   auto RJ45
Gi0/2                        connected    1          a-full   auto RJ45
Gi0/3                        connected    1          a-full   auto RJ45
Gi1/0                        connected    1          a-full   auto RJ45
SW0#

Output SW1:

SW1#show interface status

Port      Name               Status       Vlan       Duplex  Speed Type 
Gi0/0                        connected    1          a-full   auto RJ45
Gi0/1                        connected    1          a-full   auto RJ45
Gi0/2                        connected    1          a-full   auto RJ45
Gi0/3                        connected    1          a-full   auto RJ45
Gi1/0                        connected    1          a-full   auto RJ45
SW1#
Lab Network Diagram
Lab Network Diagram

Check spanning-tree

If you add multiple links between two switches, spanning tree will block all the links and leave only one link for traffic forwarding. With EtherChannel this is not the case. Let’s check if all the interfaces are used to forward the traffic.

Output SW0:

SW0#show spanning-tree 

VLAN0001
  Spanning tree enabled protocol ieee
  Root ID    Priority    32769
             Address     5254.0001.e79b
             This bridge is the root
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32769  (priority 32768 sys-id-ext 1)
             Address     5254.0001.e79b
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  300 sec

Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Gi0/0               Desg FWD 4         128.1    P2p 
Gi0/1               Desg FWD 4         128.2    P2p 
Gi0/2               Desg FWD 4         128.3    P2p 
Gi0/3               Desg FWD 4         128.4    P2p 
Gi1/0               Desg FWD 4         128.5    P2p 


SW0#

Output SW1:

SW1#show spanning-tree 

VLAN0001
  Spanning tree enabled protocol ieee
  Root ID    Priority    32769
             Address     5254.0001.e79b
             Cost        4
             Port        1 (GigabitEthernet0/0)
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32769  (priority 32768 sys-id-ext 1)
             Address     5254.0016.ebf4
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  300 sec

Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Gi0/0               Root FWD 4         128.1    P2p 
Gi0/1               Altn BLK 4         128.2    P2p 
Gi0/2               Altn BLK 4         128.3    P2p 
Gi0/3               Altn BLK 4         128.4    P2p 
Gi1/0               Desg FWD 4         128.5    P2p 


SW1#
show spanning-tree
show spanning-tree

As you can see on SW1, from the available 4 ports, only one is in forwarding status. The other 3 are in blocking status. I will share the same output after adding the ports to the EtherChannel bundle.

Configure PAgP

After confirming that all ports are up and running, you need to configure PAgP by running the below commands.

Output SW0:

SW0#conf term
Enter configuration commands, one per line. End with CNTL/Z.
SW0(config)#int gi0/0
SW0(config-if)#channel-group 1 mode desirable
Creating a port-channel interface Port-channel 1

SW0(config-if)#int
*Nov 17 14:08:44.043: %LINK-3-UPDOWN: Interface Port-channel1, changed state to up
*Nov 17 14:08:45.045: %LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel1, changed state to upgi0/1
SW0(config-if)#channe
SW0(config-if)#channel-g
SW0(config-if)#channel-group 1 mode desirable
SW0(config-if)#int gi0/2
SW0(config-if)#channel-group 1 mode desirable
SW0(config-if)#int gi0/3
SW0(config-if)#channel-group 1 mode desirable
SW0(config-if)#

Output SW1:

SW1#conf term
Enter configuration commands, one per line. End with CNTL/Z.
SW1(config)#int range gi0/0-3
SW1(config-if-range)#chan
SW1(config-if-range)#channel-gr
SW1(config-if-range)#channel-group 1 ?
mode Etherchannel Mode of the interface

SW1(config-if-range)#channel-group 1 mode ?
active Enable LACP unconditionally
auto Enable PAgP only if a PAgP device is detected
desirable Enable PAgP unconditionally
on Enable Etherchannel only
passive Enable LACP only if a LACP device is detected

SW1(config-if-range)#channel-group 1 mode auto
SW1(config-if-range)#

On the switch SW1, I used the interface range command in order to configure multiple interfaces at the same time.

Configure PAgP
Configure PAgP

PAgP port modes

PAgP port modes:

desirable – Enable PAgP unconditionally. The interface transmits PAgP packets out of it and initiates an EtherChannel to be established.

auto – Enable PAgP only if a PAgP device is detected. The interface does not initiate an EtherChannel to be established and does not transmit PAgP packets out of it.

You need to configure at least one end of the interface with the desirable mode. Otherwise, it will not work and the port channel will remain down.

SW0#show etherchannel summary
Flags: D - down P - bundled in port-channel
I - stand-alone s - suspended
H - Hot-standby (LACP only)
R - Layer3 S - Layer2
U - in use N - not in use, no aggregation
f - failed to allocate aggregator

M - not in use, minimum links not met
m - not in use, port not aggregated due to minimum links not met
u - unsuitable for bundling
w - waiting to be aggregated
d - default port

A - formed by Auto LAG


Number of channel-groups in use: 1
Number of aggregators: 1

Group Port-channel Protocol Ports
------+-------------+-----------+-----------------------------------------------
1 Po1(SD) PAgP Gi0/0(I) Gi0/1(I) Gi0/2(I)
Gi0/3(I)

SW0#

Check the status of the newly created logical interface

After configuring both switches, you need to check the status of the newly created logical interface.

Run a similar command for finding details about the new interface.

Output SW0:

SW0#show int po1
Port-channel1 is up, line protocol is up (connected)
Hardware is EtherChannel, address is 5254.001b.3547 (bia 5254.001b.3547)
MTU 1500 bytes, BW 4000000 Kbit/sec, DLY 10 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
ARP type: ARPA, ARP Timeout 04:00:00
Last input 00:00:00, output never, output hang never
Last clearing of "show interface" counters never
Input queue: 0/2000/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 1000 bits/sec, 1 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
1066 packets input, 119066 bytes, 0 no buffer
Received 0 broadcasts (0 multicasts)
0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 input packets with dribble condition detected
889 packets output, 148864 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets
0 unknown protocol drops
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out
SW0#

Output SW1:

SW1#show int po1
Port-channel1 is up, line protocol is up (connected)
Hardware is EtherChannel, address is 5254.0013.cfec (bia 5254.0013.cfec)
MTU 1500 bytes, BW 4000000 Kbit/sec, DLY 10 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
ARP type: ARPA, ARP Timeout 04:00:00
Last input 00:23:15, output never, output hang never
Last clearing of "show interface" counters never
Input queue: 0/2000/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 1000 bits/sec, 1 packets/sec
402 packets input, 87082 bytes, 0 no buffer
Received 0 broadcasts (0 multicasts)
0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 input packets with dribble condition detected
1655 packets output, 207560 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets
0 unknown protocol drops
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out
SW1#

The logical interface on both switches is in up status.

Check the status of the EtherChannel interfaces
Check the status of the EtherChannel interfaces

Now both EtherChannel interfaces are in an up (connected) status. The channel-group number does not need to match on both switches for the logical interface to change its state.

PAgP show commands

By running the show pagp neighbor command, you can find more details about the neighbor device.

SW0#show pagp neighbor 
Flags: S - Device is sending Slow hello. C - Device is in Consistent state.
A - Device is in Auto mode. P - Device learns on physical port.

Channel group 1 neighbors
Partner Partner Partner Partner Group
Port Name Device ID Port Age Flags Cap.
Gi0/0 SW1 5254.0002.8000 Gi0/0 21s SAC A0001
Gi0/1 SW1 5254.0002.8000 Gi0/1 3s SAC A0001
Gi0/2 SW1 5254.0002.8000 Gi0/2 19s SAC A0001
Gi0/3 SW1 5254.0002.8000 Gi0/3 28s SAC A0001
SW0#
show pagp neighbor
show pagp neighbor

To find the number of the pagp packets sent and received, run the following command.

SW0#show pagp counters 
Information Flush PAgP
Port Sent Recv Sent Recv Err Pkts
---------------------------------------------------
Channel group: 1
Gi0/0 55 43 0 0 0
Gi0/1 55 43 0 0 0
Gi0/2 54 42 0 0 0
Gi0/3 54 42 0 0 0

SW0#
show pagp counters
show pagp counters

Finally, if you want to find more details about PAgP timers and priority, run the following command.

SW0#show pagp internal 
Flags: S - Device is sending Slow hello. C - Device is in Consistent state.
A - Device is in Auto mode. d - PAgP is down
Timers: H - Hello timer is running. Q - Quit timer is running.
S - Switching timer is running. I - Interface timer is running.

Channel group 1
Hello Partner PAgP Learning Group
Port Flags State Timers Interval Count Priority Method Ifindex
Gi0/0 SC U6/S7 H 30s 1 128 Any 7
Gi0/1 SC U6/S7 H 30s 1 128 Any 7
Gi0/2 SC U6/S7 H 30s 1 128 Any 7
Gi0/3 SC U6/S7 H 30s 1 128 Any 7
SW0#
show pagp internal
show pagp internal

Check if STP is blocking the ports

After confirming that the logical interface is up and running, let’s check if STP is blocking any interface. Before configuring EtherChannel, it blocked 3 interfaces.

Output SW0:

SW0#show spanning-tree 

VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 5254.0002.ebd7
Cost 3
Port 65 (Port-channel1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 5254.0011.df7b
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300 sec

Interface Role Sts Cost Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Gi1/0 Desg FWD 4 128.5 P2p
Po1 Root FWD 3 128.65 P2p


SW0#

Output SW1:

SW1#show spanning-tree 

VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 5254.0002.ebd7
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 5254.0002.ebd7
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300 sec

Interface Role Sts Cost Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Gi1/0 Desg FWD 4 128.5 P2p
Po1 Desg FWD 3 128.65 P2p


SW1#

The EtherChannel interface is in forwarding status. The physical interfaces that are part of the logical interface are no longer present in the output.

The speed of the interface is increased to 4000000 Kbit/sec.

SW0#show int po1 | include line|BW
Port-channel1 is up, line protocol is up (connected) 
  MTU 1500 bytes, BW 4000000 Kbit/sec, DLY 10 usec, 
SW0#
EtherChannel interface speed
EtherChannel interface speed

Find more details about the EtherChannel port

Another two commands that you can use in order to find more information about the EtherChannel ports are:

SW0#show etherchannel
Channel-group listing:
----------------------

Group: 1
----------
Group state = L2
Ports: 4 Maxports = 4
Port-channels: 1 Max Port-channels = 1
Protocol: PAgP
Minimum Links: 0



SW0#

In the output of the show etherchannel command, you can find the group number (1 in my case), and group state (L2, it can be also configured as L3). You have the number of ports which are part of the logical interface (4 in my lab). Under the protocol, you see PAgP because we configured the EtherChannel dynamically using the Port Aggregation Protocol.

SW1#show etherchannel summary
Flags: D - down P - bundled in port-channel
I - stand-alone s - suspended
H - Hot-standby (LACP only)
R - Layer3 S - Layer2
U - in use N - not in use, no aggregation
f - failed to allocate aggregator

M - not in use, minimum links not met
m - not in use, port not aggregated due to minimum links not met
u - unsuitable for bundling
w - waiting to be aggregated
d - default port

A - formed by Auto LAG


Number of channel-groups in use: 1
Number of aggregators: 1

Group Port-channel Protocol Ports
------+-------------+-----------+-----------------------------------------------
1 Po1(SU) PAgP Gi0/0(P) Gi0/1(P) Gi0/2(P)
Gi0/3(P)

SW1#

In the output of the show etherchannel summary command, you can find the following information: group number, port-channel name and its status (SU – Layer 2, in use), member ports and their status (P – bundled in port-channel) and the protocol used (PAgP in our case).

Check the connectivity from PC0 to PC1

The last step is to check the connectivity between the end hosts: PC0 and PC1.

With the command hostname, I configured the name for my PCs. Both PCs are running Alpine Linux.

With the command ifconfig, I configured an IP address for the interface eth0.

With the ping command, I tested the connectivity between PC0 and PC1.

PC0:~$ ping -c 4 10.10.10.2
PING 10.10.10.2 (10.10.10.2): 56 data bytes
64 bytes from 10.10.10.2: seq=0 ttl=42 time=17.104 ms
64 bytes from 10.10.10.2: seq=1 ttl=42 time=12.235 ms
64 bytes from 10.10.10.2: seq=2 ttl=42 time=17.958 ms
64 bytes from 10.10.10.2: seq=3 ttl=42 time=15.654 ms

--- 10.10.10.2 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 12.235/15.737/17.958 ms
PC0:~$
Check the connectivity between PC0 and PC1
Check the connectivity between PC0 and PC1

That’s it! You have learned how to configure PAgP on Cisco switches. If you found this blog post helpful, please like and subscribe for more Cisco networking tutorials. Thank you for reading it!

Processing…
Success! You're on the list.

Leave a Reply