In this post, I’m going to talk about static port channel configuration and port channels with LACP.
Port channels (also knows as ether channels), allow bundling of upto 8 physical interfaces. This helps to increase the bandwidth and also provides interface redundancy along with load balancing.
The port channel is functional as long as at least one member interface is active.
Any interface can only be a part of a single port channel. If one interface fails, traffic is sent over the other interfaces of the port channel.
All interfaces that are members of a port channel must have similar attributes like speed, duplex, VLAN, encapsulation etc. If interfaces on participating switches do not have identical attributes, this would result in the port channel not functioning correctly and the interfaces being pushed into error disabled state.
Port channels are of two types: static port channels (port channels without any protocol) and port channels running Link Aggregation Control Protocol (LACP).
I recommend configuring port channels with LACP. Configuring static port channels can be a hassle especially when the remote device isn’t under our control. Mismatched attributes cause the interfaces to enter into error disables state like shown below:
%PM-4-ERR_DISABLE: channel-misconfig (STP) error detected on fa1/0/33, putting fa1/0/33 in err-disable state
Interfaces that are member of a port channel can be configured with one of these channel modes:
1. Active: The interface actively negotiates with other interfaces using LACP packets.
2. Passive: The port responds to LACP packets but does not initiate negotiations.
3. On: If LACP is not enabled globally, all interfaces are in this mode.
All interfaces of a static port channel must be configured with channel mode on. If configured otherwise, an error message would be generated.
Create a port channel
Switch(config)# interface port-channel 1
Switch(config-if)# no shutdown
Additional parameters like trunking mode, encapsulation etc. can be configured on the port-channel interface. All member interfaces would have the same configuration as the port channel. Port channel numbers can range from 1 to 4096.
Member interface configuration
Switch(config)# interface Ethernet 0/0
Switch(config-if)# switchport mode trunk
Switch(config-if)# channel-group 1 mode on
Load Balancing within a port channel
Load balancing in a port channel can be configured based on number of different parameters that include Source and Destination MAC addresses, IP addresses and port numbers.
Switch(config)# port-channel load-balance ethernet source-mac
The above command configures load balancing based on source MAC, the default is source-dest-mac.
Switch(config)# feature lacp
The above global configuration command enables LACP. Once LACP is configured, the member interfaces can be configured as active or passive, like below:
Switch(config-if)# channel-group 1 mode active
Switch(config-if)# channel-group 1 mode passive
LACP System and Port priority
Switch(config)# lacp system-priority 1000
The LACP system priority(configured above) and MAC address is used to form a system ID which is used for negotiating with other devices. LACP system priority is configured in global configuration mode.
Switch(config-if)# lacp port-priority 10000
Port priority is used in conjunction with port number to form a port identifier. Port identifier is used to determine which ports would be in active mode and which in standby when there is a limitation. A higher value for port priority would result in a lower LACP priority, and is likely to be chosen as the active link. LACP port priority is configured under interface configuration mode.
Both system priority and port priority have a range of 1 to 65535, the default being 32768. The lower the number, the higher the priority.
Here I have configured static port channel between two switches CERTVIDEOS-SW-1 (ports fa1/0/33 – 34) and CERTVIDEOS-SW-2 (ports fa1/0/1 – 2)