In this article we will describe how to configure both LACP and PAgP EtherChannels on Cisco switches.
An EtherChannel is a Link Aggregation technology whereby two switches are connected together with multiple interfaces which are bundled together to form a single logical interface (“Port-Channel”) therefore increasing bandwidth between the switches.
EtherChannel Use-Case
The diagram below shows a possible scenario for using Etherchannels:
Assume we have a Data Room switch providing access to servers. This switch is connected to a Distribution switch which aggregates traffic from several user access switches.
If we connect the two switches together with a single 1Gbps interface, then it could potentially be a bottleneck to traffic from users to servers (especially for high-volume applications).
With Etherchannel, we can bundle together up to 8 interfaces to form a single logical link (Port-Channel) and traffic is load-balanced between all interfaces.
In our example above, 4x1Gbps interfaces were bundled together thus forming a 4Gbps pipe from users to servers. This increases bandwidth but also enhances redundancy between the switches.
NOTE:
If you connect the interfaces as shown above without configuring EtherChannel, then a Spanning-tree loop will be detected and 3 out of 4 links will be blocked by Spanning-Tree Protocol. By configuring Etherchannel, the bundle is considered as a single logical interface and there are no spanning tree loops.
EtherChannel Protocols
There are two Etherchannel protocols. These protocols manage the channel establishment between the switches:
1) Link Aggregation Control Protocol – LACP (IEEE standard protocol)
2) Port Aggregation Protocol – PAgP (Cisco Proprietary)
The first one (LACP) is preferred as it’s supported by many vendors and it’s a better protocol.
EtherChannel Modes
Each protocol listed above has three modes of operation which dictate if the switch will actively seek to form an Etherchannel link or will wait for the other end to form the link.
LACP Modes: ON, ACTIVE, PASSIVE
PAgP Modes: ON, DESIRABLE, AUTO
Let’s see a useful table below showing whether an Etherchannel will establish or not depending on each switch mode:
LACP Protocol
Switch 1 Mode | Switch 2 Mode | Channel Established? |
ON | ON | YES |
ACTIVE | ACTIVE/PASSIVE | YES |
ON/ACTIVE/PASSIVE | Not configured (off) | NO |
ON | ACTIVE | NO |
PASSIVE/ON | PASSIVE | NO |
PAgP Protocol
Switch 1 Mode | Switch 2 Mode | Channel Established? |
ON | ON | YES |
DESIRABLE | DESIRABLE/AUTO | YES |
ON/DESIRABLE/AUTO | Not configured (off) | NO |
ON | DESIRABLE | NO |
AUTO / ON | AUTO | NO |
EtherChannel Configuration
Assume physical interfaces Gi0/0 up to Gi0/3 will be used to form an Etherchannel. Moreover, it’s better to configure the resulting Port-Channel logical interface as Trunk in order to allow VLANs to pass between the switches.
LACP Configuration
The first switch SW1 will be Active Mode and SW2 will be in Passive Mode.
SW1(config)# interface range Gi0/0 -3 <– Select the 4 interfaces
SW1(config-if-range)# channel-protocol lacp <– Set protocol to LACP
SW1(config-if-range)# channel-group 1 mode active <– Set mode to active
SW1(config-if-range)# exit
SW1(config)# interface port-channel 1 <– Configure the logical port as trunk
SW1(config-if)#switchport trunk encapsulation dot1q
SW1(config-if)#switchport mode trunk
SW2(config)# interface range Gi0/0 – 3 <– Select the 4 interfaces
SW2(config-if-range)# channel-protocol lacp <– Set protocol to LACP
SW2(config-if-range)# channel-group 1 mode passive <– Set mode to passive
SW2(config-if-range)# exit
SW2(config)# interface port-channel 1 <– Configure the logical port as trunk
SW2(config-if)#switchport trunk encapsulation dot1q
SW2(config-if)#switchport mode trunk
PAgP Configuration
The first switch SW1 will be in Desirable Mode and SW2 will be in Auto Mode.
SW1(config)# interface range Gi0/0 -3 <– Select the 4 interfaces
SW1(config-if-range)# channel-group 1 mode desirable <– Set mode to desirable
SW1(config-if-range)# exit
SW1(config)# interface port-channel 1 <– Configure the logical port as trunk
SW1(config-if)#switchport trunk encapsulation dot1q
SW1(config-if)#switchport mode trunk
SW2(config)# interface range Gi0/0 – 3 <– Select the 4 interfaces
SW2(config-if-range)# channel-group 1 mode auto <– Set mode to auto
SW2(config-if-range)# exit
SW2(config)# interface port-channel 1 <– Configure the logical port as trunk
SW2(config-if)#switchport trunk encapsulation dot1q
SW2(config-if)#switchport mode trunk
Useful Show Commands
Here are some useful commands to verify correct operation and for troubleshooting purposes:
- show etherchannel summary
- show etherchannel 1 port-channel
- show interfaces etherchannel