Networks Training

  • About
  • My Books
  • SUGGESTED TRAINING
  • HOME
  • Cisco Networking
    • Cisco General
    • Cisco IOS
    • Cisco VPN
    • Cisco Wireless
  • Cisco ASA
    • Cisco ASA General
    • Cisco ASA Firewall Configuration
  • Certifications Training
    • CCNA Training
    • Cisco Certifications
    • I.T Training
  • General
    • General Networking
    • IP Telephony
    • Network Security
    • Product Reviews
    • Software
  • Cisco Routers
  • Cisco Switches
You are here: Home / Cisco Switches / Cisco Switch EtherChannel Configuration – LACP – PAgP

Cisco Switch EtherChannel Configuration – LACP – PAgP

Written By Harris Andrea

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.

Table of Contents

  • EtherChannel Use-Case
  • EtherChannel Protocols
  • EtherChannel Modes
  • EtherChannel Configuration
      • LACP Configuration
      • PAgP Configuration
      • Useful Show Commands
    • Related Posts

EtherChannel Use-Case

The diagram below shows a possible scenario for using Etherchannels:

how to configure cisco etherchannel

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.

MORE READING:  How to configure a Cisco Layer 3 Switch-InterVLAN Routing Without Router

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.

MORE READING:  Cisco Show Interface Command on Routers and Switches Explained

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

Related Posts

  • How to Configure a Loopback Interface on Cisco Router & Switch
  • Cisco Switch Layer2 Layer3 Design and Configuration
  • Description of Switchport Mode Access vs Trunk Modes on Cisco Switches
  • What is an SFP Port-Module in Network Switches and Devices
  • 8 Different Types of VLANs in TCP/IP Networks

Filed Under: Cisco Switches

Download Free Cisco Commands Cheat Sheets

Enter your Email below to Download our Free Cisco Commands Cheat Sheets for Routers, Switches and ASA Firewalls.

We use Elastic Email as our marketing automation service. By submitting this form, you agree that the information you provide will be transferred to Elastic Email for processing in accordance with their Terms of Use and Privacy Policy. Also, you allow me to send you informational and marketing emails from time-to-time.

About Harris Andrea

Harris Andrea is an Engineer with more than two decades of professional experience in the fields of TCP/IP Networks, Information Security and I.T. Over the years he has acquired several professional certifications such as CCNA, CCNP, CEH, ECSA etc.

He is a self-published author of two books ("Cisco ASA Firewall Fundamentals" and "Cisco VPN Configuration Guide") which are available at Amazon and on this website as well.

Comments

  1. ihsan says

    January 23, 2017 at 3:34 pm

    Dear Sir,

    if i do not use the trunk port command,,,then it will work for LACP or not…means i do not use trunk for vlan

    thanks

  2. Harris Andrea says

    January 23, 2017 at 6:01 pm

    Yes it will work also without trunk on the port-channel. The trunk is useful to pass vlans between switches.

  3. Aadil says

    May 24, 2018 at 10:32 pm

    Kindly do tell me which one is Data Room Switch / Core Switch and which one is Distribution switch in this specific configuration stated above as SW1 and SW2

  4. Harris Andrea says

    May 25, 2018 at 4:41 am

    It doesn’t really matter. Especially for LACP I’m showing the same config for both switches so SW1 and SW2 can be either Distribution or Data Room. For PAgP its better to have the “desirable” command on the Data room switch so that you have more control.

  5. Doug Richter says

    June 17, 2019 at 8:08 pm

    Thank you for another great explanation and example.

    It isn’t clear to me, though, how to allowing a single vlan across the the port channel. How would the commands look with lacp and only vlan 55, say?

    Much appreciated!

  6. Harris Andrea says

    June 18, 2019 at 5:02 am

    Doug,
    Since we have configured the port channel as trunk link, you will need to configure the allowed Vlan ID using trunk commands as below:

    interface port-channel 1
    switchport trunk allowed vlan add 55

    You will need to configure the above on BOTH switches (SW1 and SW2).

    Harris

  7. Montasir says

    October 12, 2019 at 11:26 am

    How can I configure Ether Channel between router and switch

  8. Harris Andrea says

    October 12, 2019 at 4:59 pm

    Here is an example here: https://learningnetwork.cisco.com/thread/101723

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search this site

About Networks Training

We Provide Technical Tutorials and Configuration Examples about TCP/IP Networks with focus on Cisco Products and Technologies. This blog entails my own thoughts and ideas, which may not represent the thoughts of Cisco Systems Inc. This blog is NOT affiliated or endorsed by Cisco Systems Inc. All product names, logos and artwork are copyrights/trademarks of their respective owners.

Amazon Disclosure

As an Amazon Associate I earn from qualifying purchases.
Amazon and the Amazon logo are trademarks of Amazon.com, Inc. or its affiliates.

Search

BLOGROLL

Tech21Century
Firewall.cx

Copyright © 2023 | Privacy Policy | Terms and Conditions | Hire Me | Contact | Amazon Disclaimer | Delivery Policy

0 shares