Cisco IOS Technologies

Cisco CCNA – EtherChannel

EtherChannel (Link aggregation) :

In this chapter, we’ll take a look at EtherChannel which is also known as link aggregation or port-channel. 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.

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 faster, 1000Mbit or maybe even 10 gigabit if you feel like.
  • Add multiple links and bundle them into an etherchannel.

In the picture above I have added a couple of extra links. The problem is that 3 out of 4 of these links will be blocked because of loop prevention. Spanning-tree is a protocol that prevents loops on switched networks (you’ll learn about it in the next chapter!).

The cool thing about etherchannel is that it will bundle all physical links into a logical link with the combined bandwidth. By combining 4x 100 Mbit I now have a 400 Mbit link.

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 configurations of the interfaces that you use are the same.

If you want to configure PAgP you have a number of options you can choose from, an 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 the configuration of PAgP and how the different options work!

I’ll use SwitchA and SwitchB to demonstrate PAgP. We’ll use two interfaces to bundle into a single logical link.

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.

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

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

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

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

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.

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.

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 (SwitchB 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 SwitchA to use desirable and SwitchB to use auto mode. Not all the different combinations work:

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.

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.

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

I’ll configure SwitchA to use LACP active mode.

SwitchB will use LACP passive mode.

We can use the show etherchannel port-channel command again to verify our configuration again. As you can see the protocol is now LACP and interfaces fa0/13 and fa0/14 are active. The configuration of PAgP and LACP is similar. Keep in mind that PAgP can only be used between Cisco devices while LACP is a IEEE standard, you can use it to form etherchannels with devices from other vendors.

Here’s an overview with the different modes and combinations for LACP. It’s similar to PAgP but now we have the active and passive mode.

The last thing I want to show you about etherchannel is load-balancing:

Use the show etherchannel load-balance command to see what the default configuration is. As you can see our EtherChannel load-balances based on the source MAC address.

You can use the global port-channel load-balance command to change this behavior. You can see you can choose between source/destination MAC/IP address or a combination of source/destination.

Why should you care about load balancing? Take a look at the picture above. We have 4 computers and one router on the right side. The default load-balancing mechanism is source MAC address. This means that ALL traffic from one MAC address will be sent down one and the same physical interface, for example:

– MAC address AAA will be sent using SwitchA’s fa0/13 interface.

  • MAC address BBB will be sent using SwitchA’s fa0/14 interface.
  • MAC address AAA will be sent using SwitchA’s fa0/13 interface.
  • MAC address BBB will be sent using SwitchA’s fa0/14 interface.

Since we have multiple computers this is fine, both physical links on SwitchA will be used for our EtherChannel so depending on how much traffic the computers send it will be close to a 1:1 ratio.

It’s a different story for SwitchB since we only have one router with MAC address EEE. It will pick one of the physical interfaces so ALL traffic from the router will be sent down interface fa0/13 OR fa0/14. One of the physical links won’t be used at all…

If this is the case it’s better to change the load balancing mechanism. If we switch it to destination MAC address on SwitchB traffic from our router to the computer will be load balanced amongst the different physical interfaces because we have multiple computers with different destination MAC addresses.

–  MAC address AAA will be sent using SwitchA’s fa0/13 interface. MAC address BBB will be sent using SwitchA’s fa0/14 interface. MAC address AAA will be sent using SwitchA’s fa0/13 interface. MAC address BBB will be sent using SwitchA’s fa0/14 interface.

Since we have multiple computers this is fine, both physical links on SwitchA will be used for our EtherChannel so depending on how much traffic the computers send it will be close to a 1:1 ratio.

It’s a different story for SwitchB since we only have one router with MAC address EEE. It will pick one of the physical interfaces so ALL traffic from the router will be sent down interface fa0/13 OR fa0/14. One of the physical links won’t be used at all…

If this is the case it’s better to change the load balancing mechanism. If we switch it to destination MAC address on SwitchB traffic from our router to the computer will be load balanced amongst the different physical interfaces because we have multiple computers with different destination MAC addresses.