Configuring Cisco

Configuring Etherchannels (Link Aggregation) on Cisco switches

11.03.2016

The etherchannel (also called port channel sometimes) technology allows to combine several physical switch ports (from 2 to 8 total) into one logical port. This technology is often used to increase reliability of a connection between two devices. Traffic uses all active ports and, in case one physical port fails, this will have no effect on the overall availability of the connection. Naturally, the connection bandwidth is increased, as well.

Important!
It’s important to remember that such a connection can be created only using ports with of the same speed. For example, using two FastEthernet (100 + 100 Mbps) or two GigabitEthernet (1 + 1 Gbps) ports. You cannot combine a FastEthernet (100 Mbps) and a GigabitEthernet (1 Gbps) port into the same etherchannel.

Important!
Etherchannel settings must be identical on both devices that are using it, no matter whether you’re connecting a switch to a switch or a switch and a server.

For this example, we will look at configuring two Cisco switches. Let it be Cisco Catalyst 3560, although the technology and command syntax are universal and practically identical for all models.

Configuring Etherchannels (Link Aggregation) on Cisco switches

On the first switch, SW-DELTACONFIG-1, we need to create a logical interface port-channel with a unique sequence number (for example, 1)

SW-DELTACONFIG-1(config)#
interface port-channel1

Now we need to assign the needed amount of physical ports to the logical interface. Physical ports also need to be turned on with the “no shut” command.

SW-DELTACONFIG-1(config)#
interface Gi 0/1
channel-group 1
mode active
no shut

interface Gi 0/2
channel-group 1
mode active
no shut

deltaconfig cisco outsourcing

Inside the logical(!) interface’s configuration, we add all the relevant commands: link description, trunk or access port configuration, allowed VLAN tags and etc.
SW-DELTACONFIG-1(config)#
interface port-channel1
description ---Link to SW-DELTACONFIG-2---
switchport mode trunk
switchport trunk allowed vlan 1-10,20-30
no shut

All of these commands will be automatically added into the physical port configurations for the ports assigned to this port-channel. You can check this using the “show run interface [interface name]” command. In order to do it straight from the configuration mode, use the keyword “do” in front of the command:
SW-DELTACONFIG-1(config)# do sh run interface Gi 0/1
interface GigabitEthernet0/1
description ---Link to SW-DELTACONFIG-2---
switchport mode trunk
switchport trunk allowed vlan 1-10,20-30
channel-group 1 mode active

Important!
I strongly recommend creating portchannel interfaces in this exact order:
— First the logical interface itself
— Then assign physical ports to it
— Only after these steps make configuration changes of the logical interface. All commands will be automatically transferred to the physical ports, as well.
Such order of configuration will eliminate the possibility of making mistakes in settings, which is extremely important, for any discrepancies in parameters between physical ports will make the entire portchannel behave incorrectly.

Important!
After assigning a physical interface into the logical one, you can not make configuration changes to it. Any and all configuration changes are made only (!) on the logical port-channel interfaces. Any change made to the configuration of a physical switch port that is included into a port-channel might lead to the failure of the entire aggregated connection.

The second switch, SW-DELTACONFIG-2, is configured in a similar fashion. For this example we are using same Cisco Catalyst 3560 model switches with identical interfaces. In this case, you can see difference in configuration only by the description field.

SW-DELTACONFIG-2(config)#
interface Gi 0/1
channel-group 1
mode active
no shut

interface Gi 0/2
channel-group 1
mode active
no shut

interface port-channel1
description ---Link to SW-DELTACONFIG-1---
switchport mode trunk
switchport trunk allowed vlan 1-10,20-30
no shut

Checking settings

Additionally to checking that all the necessary lines are present in the switch’s configuration through the “sh run” command, you should use the “show etherchannel summary” command to check the port channel operation:
SW-DELTACONFIG-1#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 Gi0/1(P) Gi0/2(P)

The letter P next to the physical port names Gi 0/1 and Gi 0/2 means that the interfaces are working properly and are aggregated into the logical connection named Portchannel 1. The letter D next to an interface name would mean that the interface is inactive. Most likely you need to check the cable connections and all port settings.

Important!

Don’t forget to save the configuration changes on all devices with the “write” or “copy run start” commands. Otherwise all the made changes will be lost after the next reload.
SWR-DELTACONFIG-1#write
Building configuration...
[OK]

 
This article was written by Alexey Yurchenko
 

Back to Table of contents

Comments are closed.

×

How can I help you?