Administering EtherChannels

EtherChannels, Port-Channels, or Link Aggregation on Cisco switches is a popular and practical feature.  This allows additional capacity to be added to your network without upgrading hardware.  Unfortunately, however, it’s not hard to get confused or to cause an accidental network disruption when working with this feature.

Before getting down in the weeds with the configuration, let’s look at the topology we will be working with:

EtherChannel1

Configuration

We have two switches.  In this case they are connected with two trunk ports each trunking VLAN 100.  Spanning tree is working as expected and one of the ports on SW2 is in blocking mode to prevent loops.   What we would like to do is create an EtherChannel between the two to widen the pipe and provide redundancy without spanning tree convergence.

There is no way to bring up an EtherChannel without a short blip in connectivity.  The physical interfaces and the logical Port Channel need to be configured the same for the entire link to function properly. I always find it’s best to make the changes on the remote switch first.  I suggest having a backup plan to get into the switch should something not go well.  Perhaps something like THIS?  At any rate, you will want to configure the interfaces:

SW2(config)#interface range gigabitEthernet 0/47 - 48, po1
SW2(config-if-range)#switchport trunk encapsulation dot1q
SW2(config-if-range)#switchport mode trunk
SW2(config-if-range)#switchport trunk allowed vlan 100

Then, hit just the physical ports to get them into the logical port channel:

SW2(config-if-range)#interface range gigabitEthernet 0/47 – 48
SW2(config-if-range)#channel-group 1 mode passive

You can use various modes of course.  I use passive mode that utilizes the link aggregation control protocol (LACP) on the remote switch so that the interfaces will come back up individually once they realize the opposing switch is not yet configured with an EtherChannel.  If you are connected via telnet or ssh this would be the change that disconnects your session and breaks the data flow.  Be sure to look at the trouble shooting section to get familiar with the things that can go wrong before implementing.

If you’re connected directly to the switch you will see it log messages while the process takes place:

%EC-5-COMPATIBLE: Gi0/47 is compatible with port-channel members
%EC-5-COMPATIBLE: Gi0/48 is compatible with port-channel members
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/47, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/48, changed state to up

Assuming EtherChannel is still not configured on SW1, SW2 should revert back to working normally.  You can see in the output below that the interfaces and independent and that spanning tree is representing them individually as well:

SW2#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(SD)         LACP      Gi0/47(I)   Gi0/48(I)
VLAN0100
  Spanning tree enabled protocol rstp
  Root ID    Priority    4196
             Address     001b.d566.e300
             Cost        19
             Port        47 (GigabitEthernet0/47)
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
  Bridge ID  Priority    32868  (priority 32768 sys-id-ext 100)
             Address     4c4e.35ce.b100
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  300 sec
Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Gi0/47              Root FWD 19        128.47   P2p
Gi0/48              Altn BLK 19        128.48   P2p

Now that connectivity is back, we will establish the other side of the EtherChannel on SW1.  The steps are essentially the same.

SW1(config)#interface range gigabitEthernet 0/47 - 48, po1
SW1(config-if-range)#switchport trunk encapsulation dot1q
SW1(config-if-range)#switchport mode trunk
SW1(config-if-range)#switchport trunk allowed vlan 100
SW1(config-if-range)#interface range gigabitEthernet 0/47 – 48
SW1(config-if-range)#channel-group 1 mode active

The interfaces will hiccup for a few seconds and then come back online with a similar set of messages:

SW1(config-if-range)#channel-group 1 mode active
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/47, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/48, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/47, changed state to up
%LINK-3-UPDOWN: Interface Port-channel1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/48, changed state to up

When configured the EtherChannel will display as a single interface in spanning tree.  You will also notice the port cost is reduced. You can see this below:

SW1#show spanning-tree
VLAN0100
  Spanning tree enabled protocol rstp
  Root ID    Priority    4196
             Address     001b.d566.e300
             This bridge is the root
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
  Bridge ID  Priority    4196   (priority 4096 sys-id-ext 100)
             Address     001b.d566.e300
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  300 sec
Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Po1                 Desg FWD 12        128.56   P2p

That’s the basics.  However, this wouldn’t be IT without things going a little haywire.  The next section will discuss some of the troubleshooting steps to take should things not turn out so well…

Trouble Shooting

First, let’s look at log messages.  I will list a few and attempt to briefly explain the issue and discuss how to fix it.

%EC-5-CANNOT_BUNDLE2: Gi0/47 is not compatible with Po1 and will be suspended(dtp mode of Gi0/47 is on, Po1 is off)

This happens when “switchport mode trunk” is explicitly set on some interfaces and not others.  As you can see in the details it appears as though Po1 needs to have “switchport mode trunk” applied or to have it removed from Gi 0/47.

%EC-5-CANNOT_BUNDLE2: Fa0/47 is not compatible with Fa0/48 and will be suspended (vlan mask is different)

This happens when the allowed VLANs are not configured identically on the physical and logical interfaces.  Correct this with the “switchport trunk allowed vlan” commands on all the interfaces involved.

To see the status of EtherChannels and physical ports that make them up I typically find “show etherchannel summary” command to be a useful.   The flags for port statuses are included at the top of the output to simplify your troubleshooting experience.

SW1#sh 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)         LACP      Fa0/47(P)   Fa0/48(P)

I hope everyone found this document helpful.  As always, be sure to leave comments, suggestions and feedback if you have any!  I hope to update this document in accordance with the feedback I get.

This entry was posted in Networking and tagged , , , . Bookmark the permalink.

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.