Etherchannel enables the grouping multiple interfaces together increases throughput and improves resilience. This chapter will cover what you can consider to be the bread-and-butter work of any Cisco engineer. Expect to be asked about configuration options and commands in the CCNA exam.
EtherChannels
You may hear other vendors refer to this technology as:
- Link aggregation
- Link teaming
- NIC teaming
- Port channeling
The idea behind this technique is to take multiple interfaces and bundle (bond) them to increase the amount of throughput between two devices. Link aggregation can use any type of interfaces (e.g., 100 Mbps, 1 Gbps, 10 Gbps) but usually all the interfaces within a bundle must have the same capacity, so you can’t connect Fast Ethernet interfaces to Gigabit Ethernet, for example.
Such connections are used in scenarios in which we need a high amount of traffic traveling between two network devices, usually in data center environments at the core or distribution layer. The most common use for link aggregation is connecting two switches.
FIG 12.1 – Link aggregation
Besides the increase in throughput, interface bonding also offers another important benefit, which is redundancy. If one link in the bundle fails, the rest keep forwarding traffic and the logical link (the bundle) remains active. In order for the logical link to go down, all the component physical links must go down.
Another benefit of link aggregation is optimizing ports in STP. With multiple physical interfaces, only one of those interfaces would be in forwarding mode (to prevent loops). When the interfaces are bundled together, they are treated as one logical Spanning Tree interface and set in forwarding mode, if there are no redundant EtherChannels. This means that if one of the links in the bundle should fail for any reason, there will be no need for STP convergence to take place. The entire bundle would need to fail for this to happen.
In order for an EtherChannel to form, all ports or interfaces should have matching settings, such as interfaces with the same speed, duplex mode, native VLAN, VLAN range, and trunking status and type. The DTP settings won’t affect EtherChannel formation. This is also covered in the Cisco Ethernchannel configuration guide.
EtherChannel (link aggregation) is a very popular technology and is typically deployed between the distribution and the core layers or between core devices, where increased availability and scalability is needed. However, link aggregation is usually disabled on interfaces that are facing end-users. Without the ability to use EtherChannels, the network in Figure 12.2 below would only be able to utilize one link between the top two switches:
FIG 12.2 – Multiple links utilized by EtherChannel
Two commonly used link aggregation protocols are:
- LACP (Link Aggregation Control Protocol) – an open standard protocol
- PAgP (Port Aggregation Protocol) – a Cisco proprietary protocol
Link Aggregation Control Protocol
LACP is described in the IEEE 802.3AD specification as a standard for aggregating multiple physical Ethernet links into a single logical link. LACP is incompatible with PAgP, so both ends of a link need to run LACP before a logical bundle (EtherChannel) can be formed.
The physical ports in a link bundle should have the same physical properties (such as speed and duplex) and trunk encapsulation type, and must be operating on the same layer of the OSI model (either as switch ports or as routed ports). Traffic is balanced across the active members of a port channel. If an interface within a port channel fails, then traffic is rebalanced across the remaining active interfaces.
LACP supports autonegotiation of port channels by exchanging LACP packets. LACP requires ports to operate in full-duplex mode (unlike PAgP, which supports half-duplex). LACP frames are sent to a special multicast group address for IEEE 802.3 slow protocols: 01-80-C2-00-00-02. LACP frames are encoded with the EtherType value 0x8809. Figure 12.3 below shows a captured LACP frame:
FIG 12.3 – LACP frame capture
LACP Port Modes
LACP supports two modes of operations, which are active and passive.
In LACP active mode, a port actively negotiates LACP. This means that the port initiates negotiations with the remote end. If one of the ends of a link is in active mode, then LACP negotiation will be initiated and a port channel will be formed if all the physical attributes match.
In LACP passive mode, ports will not initiate LACP negotiation. However, they will respond if the other end initiates. This means that if both ends of a link are in passive mode, then an EtherChannel will not be formed.
Table 12-1 below shows the different LACP combinations and the result when trying to establish an EtherChannel between two switches:
Table 12-1: LACP combinations
Switch 1 LACP Mode | Switch 2 LACP Mode | EtherChannel Result |
Passive | Passive | No EtherChannel Formed |
Passive | Active | EtherChannel Formed |
Active | Active | EtherChannel Formed |
Active | Passive | EtherChannel Formed |
Port Aggregation Protocol
PAgP is Cisco’s proprietary protocol for automatic negotiation of EtherChannels. Just like LACP, PAgP sends packets between EtherChannel-capable ports to negotiate an EtherChannel. These frames are sent to the multicast address 01-00-0C-CC-CC-CC. An output from a packet sniffer is shown below:
FIG 12.4 – PAgP frame capture
NOTE: You will be expected to identify PAgP and LACP from the multicast MAC address, so make sure that you remember these.
PAgP Port Modes
PAgP also operates in two modes, like LACP, as described below.
Ports in auto mode will not initiate PAgP negotiation but will respond when they receive a PAgP packet. This is similar to the passive mode in LACP. Two ports operating in PAgP auto mode will NOT negotiate an EtherChannel.
Ports in desirable mode will actively initiate PAgP negotiations. This means that an EtherChannel will be negotiated as long as the other end is running PAgP, whether in auto mode or desirable mode.
Table 12-2 below shows the different PAgP combinations and the result when trying to establish an EtherChannel between two switches:
Table 12-2: PAgP combinations
Switch 1 PAgP Mode | Switch 2 PAgP Mode | EtherChannel Result |
Auto | Auto | No EtherChannel Formed |
Auto | Desirable | EtherChannel Formed |
Desirable | Auto | EtherChannel Formed |
Desirable | Desirable | EtherChannel Formed |
Configuring EtherChannels on Cisco IOS
PAgP and LACP configurations on Cisco devices are similar, but each implementation presents some particularities. We will cover each of them in the sections below.
As a general rule, both PAgP and LACP configurations require the component port to share a number of settings, including:
- Same speed and duplex
- Allowed VLAN list
- STP cost for each VLAN
- STP priority for each VLAN
- STP PortFast settings
An easy way to ensure that the configurations are exactly the same is to use the interface range command. This allows you to apply the same configuration on multiple interfaces at the same time.
Mini-lab – PAgP Configuration
Let’s assume that you want to configure two ports in a PAgP EtherChannel carrying VLAN 100. The command to group the ports in an EtherChannel is channel-group [group_id] mode [mode] interface configuration mode. Use desirable mode for both ports. The number of channel groups you can configure depends on your platform. As of the writing of this chapter, the limit for the 2960 Switch model is six.
2960(config)#int f0/3
2960(config-if)#channel-group ?
<1-6> Channel group number
On my Cisco 3550 switch you have 64 available:
3550(config-if)#channel-group ?
<1-64> Channel group number
FIG 12.5 – Mini-lab: PAgP configuration
Switch0#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch0(config)#interface range f0/1-2
Switch0(config-if-range)#switchport mode access
Switch0(config-if-range)#switchport access vlan 100
% Access VLAN does not exist. Creating vlan 100
Switch0(config-if-range)#channel-group 6 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
Switch0(config-if-range)#channel-group 6 mode desirable
Creating a port-channel interface Port-channel 6
Now repeat this configuration on Switch 1.
You can verify the EtherChannel configuration using a number of commands:
- show etherchannel [id] port-channel
- show etherchannel [id] brief
- show etherchannel [id] detail
- show etherchannel summary
- show etherchannel port-channel
- show etherchannel protocol
Let’s test a couple of these commands on your newly created EtherChannel. You can see that a port channel interface is created, and it matches the number allocated to the channel group. Check that the port channel is present first.
Switch0#show ip interface brief
Interface IP-Address OK? Method Status Protocol
GigabitEthernet0/2 unassigned YES unset down down
Vlan1 unassigned YES unset administratively down down
Port-channel 6 unassigned YES unset down down
[output truncated]Note that the command below will show you which interfaces are in which group, as well as whether PAgP or LACP is in use. You will need to remember this for the exam.
Switch1#show etherch summary
Flags: D – down P – 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
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
——+————-+———–+———————————–
6 Po6(SU) PAgP Fa0/1(P) Fa0/2(P)
Switch0#show etherchannel port-channel
Channel-group listing:
———————-
Group: 6
———-
Port-channels in the group:
—————————
Port-channel: Po6 (Primary Aggregator)
————
Age of the Port-channel = 00d:00h:18m:06s
Logical slot/port = 2/1 Number of ports = 3
GC = 0x00000000 HotStandBy port = null
Port state = Port-channel
Protocol = LACP
Port Security = Disabled
Ports in the Port-channel:
Index Load Port EC state No of bits
——+——+——+——————+———–
0 00 Fa0/2 Active 0
0 00 Fa0/3 Active 0
0 00 Fa0/1 Active 0
Time since last port bundled: 00d:00h:15m:51s Fa0/1
Switch1#show etherchannel port-channel
Channel-group listing:
———————-
Group: 6
———-
Port-channels in the group:
—————————
Port-channel: Po6
————
Age of the Port-channel = 00d:00h:03m:55s
Logical slot/port = 2/6 Number of ports = 2
GC = 0x00000000 HotStandBy port = null
Port state = Port-channel
Protocol = PAGP
Port Security = Disabled
Ports in the Port-channel:
Index Load Port EC state No of bits
——+——+——+——————+———–
0 00 Fa0/1 Desirable-Sl 0
0 00 Fa0/2 Desirable-Sl 0
Time since last port bundled: 00d:00h:03m:55s Fa0/2
[END OF MINI-LAB]You might want to note that the port channel load balances traffic across its member interfaces on a per-flow method based on any of the sources and destinations below:
- Destination IP
- Destination MAC
- Source and destination IP
- Source and destination MAC
- Source IP
- Source MAC
The default behavior differs from platform to platform but, in general, if you want a more granular distribution of traffic on the EtherChannel, it is recommended that you configure load balancing based on the source and destination IP hash. This is done in global configuration mode, as follows:
Switch(config)#port-channel load-balance src-dst-ip
To verify the EtherChannel load balancing configuration, use the following commands:
Switch#show etherchannel load-balance
Source XOR Destination ip address
Mini-lab – LACP Configuration
LACP configuration is similar to PAgP configuration. However, you should choose an LACP-specific port mode (active or passive) with the channel-group command:
FIG 12.6 – Mini-Lab: LACP configuration
Here is the configuration for Switch 0; configure Switch 1 yourself:
Switch0(config)#interface range FastEthernet1/1-2
Switch0(config-if-range)#switchport mode access
Switch0(config-if-range)#switchport access vlan 100
Switch0(config-if-range)#channel-group 6 mode active
Try out some of the previous show commands.
The load balancing customization is achieved in the same way as with PAgP:
Switch0(config)#port-channel load-balance src-dst-ip
[END OF MINI-LAB]Layer 3 EtherChannel Configuration
EtherChannels can also be configured as layer 3 logical interfaces. This is done by converting the port to a routed port using the no switchport command and assigning an IP address on the port channel interface. This is accomplished as follows (you won’t be able to do this on a 2960 Switch because it doesn’t generally support layer 3 services and protocols):
Switch#configure terminal
Switch(config)#interface port-channel 10
Switch(config-if)#no switchport
Switch(config-if)#ip address 10.0.0.1 255.255.255.0
Switch(config-if)#no shut
Switch(config-if)#do sho ip interface brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 unassigned YES unset up up
FastEthernet0/1 unassigned YES unset up up
Port-channel10 10.0.0.1 YES manual up up
Port Channel Mode On
There is another method to configure EtherChannels using the interface command channel-group # mode on. This is neither PAgP nor LACP (i.e., no protocol is involved in setting up the channel or monitoring it). If you use the on command for one side, you cannot use any LACP or PAgP commands on the other side (i.e., active, passive, auto, or desirable).
If both ends of an EtherChannel are hardcoded as on, the EtherChannel will be formed, without a negotiating protocol.
The configuration on a switch on one of my live Cisco racks (access layer switch 1 [ALS1]) is shown below:
ALS1(config-if)#channel-group 1 mode on
Creating a port-channel interface Port-channel 1
1d08h: %LINK-3-UPDOWN: Interface Port-channel1, changed state to up
1d08h: %LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel1, changed state to up
ALS1(config-if)#end
ALS1#show etherchannel summary
Flags: D – down P – in port-channel
I – stand-alone s – suspended
H – Hot-standby (LACP only)
R – Layer3 S – Layer2
u – unsuitable for bundling
U – in use f – failed to allocate aggregator
d – default port
Number of channel-groups in use: 1
Number of aggregators: 1
Group Port-channel Protocol Ports
——+————-+———–+———————————–
1 Po1(SU) – Fa0/12(P)
End of Chapter Questions
Please visit www.howtonetwork.com/ccnasimplified to take the free Chapter 12 exam.
Chapter 12 Labs
Lab 1: LACP EtherChannels
Lab Exercise
Your task is to configure the network in Figure 12.7 below. You will place three ports into a VLAN, and then create an LACP EtherChannel between them. When you have completed the lab, reload the switches and configure one side as passive. Then repeat the process using PAgP.
FIG 12.7 – LACP EtherChannels lab
Text in Courier New font indicates commands that can be entered on the router.
Purpose
This two-switch lab will teach you the basics of EtherChannel.
Lab Objectives
- Use the ports listed in Figure 12.7.
- Use the interface range command to group ports Fast 0/1-3.
- Make all ports access and place into VLAN 100.
- Configure EtherChannel LACP on both switches.
- Use show commands to verify your configurations.
Lab Walk-through
- Configure the VLAN on the switches.
Switch(config)#host Switch0
Switch0(config)#interface range fast0/1-3
Switch0(config-if-range)#switchport mode access
Switch0(config-if-range)#switchport access vlan 100
- Create the EtherChannel.
Switch0(config-if-range)#channel-group ?
<1-6> Channel group number
Switch0(config-if-range)#channel-group 1 mode active
Creating a port-channel interface Port-channel 1
- Now repeat the commands on Switch 1.
Switch(config)#host Switch1
Switch1(config)#interface range fast0/1-3
Switch1(config-if-range)#switchport mode access
Switch1(config-if-range)#sw access vlan 100
% Access VLAN does not exist. Creating vlan 100
Switch1(config-if-range)#channel-group 1 mode active
Creating a port-channel interface Port-channel 1
- Issue show commands to display the EtherChannel information.
Switch0#show etherchannel summary
Flags: D – down P – 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
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/1(P) Fa0/2(P) Fa0/3(P)
Show Runs
hostname Switch0
!
spanning-tree mode pvst
!
interface FastEthernet0/1
switchport access vlan 100
channel-group 1 mode active
switchport mode access
!
interface FastEthernet0/2
switchport access vlan 100
channel-group 1 mode active
switchport mode access
!
interface FastEthernet0/3
switchport access vlan 100
channel-group 1 mode active
switchport mode access
!
interface FastEthernet0/4
!
hostname Switch1
!
spanning-tree mode pvst
!
interface FastEthernet0/1
switchport access vlan 100
channel-group 1 mode active
switchport mode access
!
interface FastEthernet0/2
switchport access vlan 100
channel-group 1 mode active
switchport mode access
!
interface FastEthernet0/3
switchport access vlan 100
channel-group 1 mode active
switchport mode access
!