Etherchannel on Cisco IOS Catalyst Switch

In this tutorial we‟ll take a look at etherchannel which is also known as link aggregation. Etherchannel is a technology that lets you bundle multiple physical links into a single logical link. We”ll take a look at how it works and what the advantages of etherchannel are. Let’s start with an example of a small network:

sw1 sw2 two hosts gigabit fastethernet

Take a look at the picture above. I have two switches and two computers connected to the switches. The computers are connected with 1000 Mbit interfaces while the link between the
switches is only 100 Mbit. If one of the computers would send traffic that exceeds 100 Mbit of bandwidth we”ll have congestion and traffic will be dropped.

There are two solutions to this problem:

  • Replace the link in between the switches with something that has a higher bandwidth, perhaps a gigabit or 10gigabit link.
  • Add multiple links and bundle them into an etherchannel.

Since this tutorial is about Etherchannel, we’ll take a look at adding multiple links. Here’s an example:

In this tutorial we‟ll take a look at etherchannel which is also known as link aggregation. Etherchannel is a technology that lets you bundle multiple physical links into a single logical link. We"ll take a look at how it works and what the advantages of etherchannel are. Let's start with an example



sw1 sw2 two hosts 4 fastethernet links

In the picture above I have added a couple of extra links. The problem with this setup is that we have a loop so spanning tree would block 3 out of 4 links. Etherchannel solves this problem because it will create a single virtual link out of these physical links:

sw1 sw2 two hosts etherchannel 400 mbit

By combining 4x 100 Mbit I now have a 400 Mbit link. Spanning tree sees this link as one logical link so there are no loops! Etherchannel will do load balancing among the different links that we have and it takes care of redundancy. Once one of the links fails it will keep working and use the links that we have left.

There’s a maximum to the number of links you can use: 8 physical interfaces.

If you want to configure an Etherchannel there are two protocols you can choose from:

  • PAgP (Cisco proprietary)
  • LACP (IEEE standard)

These protocols can dynamically configure an etherchannel. It‟s also possible to configure a static etherchannel without these protocols doing the negotiation of the link for you. If you are going to create an etherchannel you need to make sure that all ports have the same configuration:

  • Duplex has to be the same.
  • Speed has to be there same.
  • Same native AND allowed VLANs.
  • Same switchport mode (access or trunk).

PAgp and LACP will check if the configuration of the interfaces that you use are the same.

If you want to configure PAgP there are a number of options you can choose from, the interface can be configured as:

  • On (interface becomes member of the etherchannel but does not negotiate).
  • Desirable (interface will actively ask the other side to become an etherchannel).
  • Auto (interface will wait passively for the other side to ask to become an etherchannel).
  • Off (no etherchannel configured on the interface).

Let me show you an example how to configure PAgP between two switches. I’ll use SW1 and SW2 for this demonstration:

sw1 sw2 fa013 fa014

SW1 and SW2 each have a FastEthernet 0/13 and 0/14 interface. We’ll bundle these into a single logical link.

SW1(config)#interface fa0/13
SW2(config-if)#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

First we go to the interface level where we can create a channel-group. I’m going to use channel-group number 1. Above you can see the different options that we have for PAgP and LACP.

SW1(config)#interface fa0/13
SW1(config-if)#channel-group 1 mode desirable 
Creating a port-channel interface Port-channel 1
SW1(config)#interface fa0/14
SW1(config-if)#channel-group 1 mode desirable

I configure SW1 for PAgP desirable mode. It will actively ask SW2 to become an Etherchannel this way.

SW2(config)#interface fa0/13
SW2(config-if)#channel-group 1 mode auto 
SW2(config)#interface fa0/14
SW2(config-if)#channel-group 1 mode auto

Here’s the configuration of SW2. I used the PAgP auto mode so it will respond to requests to become an etherchannel.

SW1 %LINK-3-UPDOWN: Interface Port-channel1, changed state to up
SW2 %LINK-3-UPDOWN: Interface Port-channel1, changed state to up

You’ll see a message on your switches like mine above. The switch will create a port-
channel interface.

SW1(config)#interface port-channel 1
SW1(config-if)#switchport trunk encapsulation dot1q 
SW1(config-if)#switchport mode trunk
SW2(config)#interface port-channel 1
SW2(config-if)#switchport trunk encapsulation dot1q 
SW2(config-if)#switchport mode trunk

The port-channel interface can be configured. I’ve set mine to use 802.1Q encapsulation and to become a trunk.

SW1#show etherchannel 1 port-channel 
		Port-channels in the group: 
		---------------------------

Port-channel: Po1
------------

Age of the Port-channel   = 0d:00h:10m:16s
Logical slot/port   = 2/1          Number of ports = 2
GC                  = 0x00010001      HotStandBy port = null
Port state          = Port-channel Ag-Inuse 
Protocol            =   PAgP
Port security       = Disabled

Ports in the Port-channel: 

Index   Load   Port     EC state        No of bits
------+------+------+------------------+-----------
  0     00     Fa0/13   Desirable-Sl       0
  0     00     Fa0/14   Desirable-Sl       0

Time since last port bundled:    0d:00h:00m:07s    Fa0/14
Time since last port Un-bundled: 0d:00h:04m:08s    Fa0/13

Here’s one way to verify your configuration. Use the show etherchannel port-channel command to check if the port-channel is active or not. You can also see that we are using PAgP. Interface fa0/13 and fa0/14 are both in use for this etherchannel.

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      f - failed to allocate aggregator

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

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

Group  Port-channel  Protocol    Ports
------+-------------+-----------+-----------------------------------------------
1      Po1(SU)         PAgP      Fa0/13(P)   Fa0/14(P)

If you have many etherchannels you can also use the show etherchannel summary command. It will give you a quick overview of all the etherchannels and the interfaces that are in use.

SW1#show interfaces fa0/14 etherchannel 
Port state    = Up Mstr In-Bndl 
Channel group = 1           Mode = Desirable-Sl    Gcchange = 0
Port-channel  = Po1         GC   = 0x00010001      Pseudo port-channel = Po1
Port index    = 0           Load = 0x00            Protocol =   PAgP

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.
        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.

Local information:
                                Hello    Partner  PAgP     Learning  Group
Port      Flags State   Timers  Interval Count   Priority   Method  Ifindex
Fa0/14    SC	U6/S7   H	30s	 1        128        Any      5001

Partner's information:

          Partner              Partner          Partner         Partner Group
Port      Name                 Device ID        Port       Age  Flags   Cap.
Fa0/14    SW2              0019.569d.5700	Fa0/14      19s SAC	10001 

Age of the port in the current state: 0d:00h:02m:37s

The third method to verify your etherchannel is to use the show interfaces etherchannel command. In my example I am looking at the information of my fa0/14 interface. Besides information of our local switch you can also see the interface of our neighbor switch (SW2 in my example).

The last thing I want to share with you about PAgP are the different modes you can choose from:

  • On
  • Desirable
  • Auto
  • Off

I have configured SW1 to use desirable and SW2 to use auto mode. Not all the different combinations work:

On Desirable Auto Off
On Yes No No No
Desirable No Yes Yes No
Auto No Yes No No
Off No No No No

Here’s an overview with all the different options. Keep in mind that configuring your etherchannel as “on” doesn’t use any negotiation so it will fail if the other side is configured for auto or desirable.

Configurations

Want to take a look for yourself? Here you will find the configuration of each device.

SW1

hostname SW1
!
interface FastEthernet0/13
 channel-group 1 mode desirable 
!
interface FastEthernet0/14
 channel-group 1 mode desirable 
!
interface port-channel 1
 switchport trunk encapsulation dot1q 
 switchport mode trunk
!
end

SW2

hostname SW2
!
interface FastEthernet0/13
 channel-group 1 mode auto 
!
interface FastEthernet0/14
 channel-group 1 mode auto
!
interface port-channel 1
 switchport trunk encapsulation dot1q 
 switchport mode trunk
!
end


LACP is similar to PAgP. You also have different options to choose from when you configure the interface:

  • On (interfaces becomes member of the etherchannel but does not negotiate).
  • Active (interface will actively ask the other side to become an etherchannel).
  • Passive (interface will wait passively for the other side to ask to become an etherchannel).
  • Off (no etherchannel configured on the interface).

It’s basically the same thing as PAgP but the terminology is different. Let’s configure LACP to see what it does.

SW1(config)#default interface fa0/13
Interface FastEthernet0/13 set to default configuration
SW1(config)#default interface fa0/14
Interface FastEthernet0/14 set to default configuration
SW2(config)#default interface fa0/13
Interface FastEthernet0/13 set to default configuration
SW2(config)#default interface fa0/14
Interface FastEthernet0/14 set to default configuration
SW1(config)#no interface port-channel1
SW2(config)#no interface port-channel1

Don’t forget to clean up PAgP before you start playing with LACP.

We're Sorry, Full Content Access is for Members Only...

If you like to keep on reading, Become a Member Now! Here is why:

  • Learn any CCNA, CCNP and CCIE R&S Topic. Explained As Simple As Possible.
  • Try for Just $1. The Best Dollar You've Ever Spent on Your Cisco Career!
  • Full Access to our 655 Lessons. More Lessons Added Every Week!
  • Content created by Rene Molenaar (CCIE #41726)

535 Sign Ups in the last 30 days

satisfaction-guaranteed
100% Satisfaction Guaranteed!
You may cancel your monthly membership at any time.
No Questions Asked!

Tags: , , , ,


Forum Replies

  1. Hi, Rene. Thanks for info. What if you add note about pagp silent/non-silent submode? Thanks.

  2. Hello Rene,

    port-channel load-balance {dst-ip | dst-mac | src-dst-ip | src-dst-mac | src-ip | src-mac}

    could you please explain what is the function of {dst-ip | dst-mac | src-dst-ip | src-dst-mac | src-ip | src-mac} and how load is converting in each link based on load balancing ?

  3. Hi Hans,

    The default is src mac based load balancing.

    From SW1’s perspective this is a great choice as each computer has a different MAC address. Traffic from the computers will be load balanced when it is sent from SW1 to SW2.

    From SW2 to SW1, it’s another story. The MAC address of the router remains the same so using src mac based load balancing is not a good idea. All traffic will be sent using the same physical interface. It’s better to change it to dst mac address load balancing since the destination MAC address will be one of the four computers.

    The same

    ... Continue reading in our forum

  4. I dont think there is a difference between the two in regards to pros and cons. The only advantage I could see is that PAgP might be “quicker” to configure since the default protocol used for etherchannel is PAgP on Cisco equipment. After some googling there was no clear advantage I seen. One advantage of both LACP and PAgP is they help prevent loops manual etherchannel configurations do not allow for this. I hope this was helpful!

  5. Thank you very much Laz for this intuitive explanation

73 more replies! Ask a question or join the discussion by visiting our Community Forum