Etherchannel Configuration
Configuration
The configuration shown here is relevant to a Cisco IOS switch. Similar config is used on a router or Nexus switch. This may be quite different to other vendors.
Channel-Group Modes
The mode keyword determines the negotiation protocol used and whether the switch actively tries to form the channel. There are three options:
LACP (IEEE 802.3ad) — the open standard, supported by all vendors. Uses two modes:
active— the port sends LACP PDUs and actively tries to form a channelpassive— the port listens for LACP PDUs but won’t initiate
PAgP (Cisco proprietary) — Cisco-only switches. Uses two modes:
desirable— actively tries to form a channelauto— listens and responds, but won’t initiate
Static (on) — no negotiation protocol. The port is always in the channel. Both ends must use on — mixing on with any negotiated mode causes a misconfiguration.
Which mode combinations actually form a channel:
| Switch A | Switch B | Result |
|---|---|---|
| active | active | ✅ Forms (LACP) |
| active | passive | ✅ Forms (LACP) |
| passive | passive | ❌ No channel — neither side initiates |
| desirable | desirable | ✅ Forms (PAgP) |
| desirable | auto | ✅ Forms (PAgP) |
| auto | auto | ❌ No channel — neither side initiates |
| on | on | ✅ Forms (static) |
| on | active/passive | ❌ Misconfiguration — protocols conflict |
For new deployments, LACP active on both sides is the recommended choice — it’s open standard, actively negotiates, and will detect misconfigurations.
Interface Configuration
Each interface is configured by adding it to a particular channel-group, and chosing the mode.
An example of this configuration is:
interface range GigabitEthernet0/1-4
description Member Port
channel-group 1 mode active
no shutdown
The configuration above uses the range option to configure multiple interfaces at once. This is optional, individual interfaces can be configured one at a time, as long as they’re in the same group.
The channel-group number corresponds to the Administrative Key when LACP is used.
Port-Channel Configuration
After one or more interfaces have been added to a channel-group, a virtual interface called a port-channel is created:
show running-config interface port-channel 1
Building configuration...
Current configuration : 122 bytes
!
interface Port-channel1
end
This can be configured just like a normal interface. Much of the configuration on the port-channel will be applied directly to the member interfaces. One exception to this is the description, which can be different on each physical interface and the port-channel.
interface port-channel 1
description EtherChannel
switchport trunk encapsulation dot1q
switchport mode trunk
show running-config interface gigabit 0/1
Building configuration...
Current configuration : 122 bytes
!
interface gigabit 0/1
description MemberPort
switchport trunk encapsulation dot1q
switchport mode trunk
end
System Priority
The system priority is 32768 by default, and is changed globally on the switch or router.
lacp system-priority [value]
Port Priority
The port priority is 32768 by default. This can be changed on a per port basis.
interface GigabitEthernet0/1
lacp port-priority [value]
Max Ports
The maximum number of active links in a port-channel can be restricted, lower than the platform limit. For example, a platform may support eight links in a port-channel, but an administrator may wish to restrict this to four.
This may be useful in a case where there is an IPS, WAN accelerator, or some other ‘bump in the wire’ installed inline between two switches. In this case, a port-channel could be configured with two links, with a maximum on one active.
If the ‘bump in the wire’ fails, the active link goes down, and the passive link becomes active. This allows the failed device to be bypassed. When the device is fixed or replaced, that link becomes active again (if port priorities are set correctly), and the other link goes back to standby.
Note, not all platforms support changing the maximum number of links in a channel.
interface port-channel 1
lacp max-bundle [value]
Load-Balancing Type
The load balancing type specifies the algorithm that is used to spread the traffic across the physical links. Before trying to set a method, check which methods are supported on the platform.
This is set globally on the switch.
! Query the available options
m1-catsw01(config)#port-channel load-balance ?
dst-ip Dst IP Addr
dst-mac Dst Mac Addr
src-dst-ip Src XOR Dst IP Addr
src-dst-mac Src XOR Dst Mac Addr
src-ip Src IP Addr
src-mac Src Mac Addr
! Set the method
port-channel load-balance [method]
Troubleshooting
When troubleshooting, the best place to start is to understand the topology you’re working on. For example, know the etherchannels in use, the number of links in the channel, and so on.
If possible, try to understand the pattern of traffic passing over the etherchannel. This includes knowing whether communication is within a single subnet, or whether routers are involved. Listing endpoints may help with this. Traffic captures may be useful too.
There are several commands to begin troubleshooting the etherchannel. Firstly, show etherchannel summary can be used to get basic information, such as a list of port channels, the physical links they contain, link up/down status, and protocol type.
show etherchannel summary
! Output omitted for brevity
Number of channel-groups in use: 1
Number of aggregators: 1
Group Port-channel Protocol Ports
------+-------------+-----------+-----------------------------------------------
1 Po1(SU) LACP Gi0/1(P) Gi0/2(P) Gi0/3(P)
Gi0/4(P)
The load-balancing type can be found with show etherchannel load-balance
show etherchannel load-balance
EtherChannel Load-Balancing Configuration:
src-mac
EtherChannel Load-Balancing Addresses Used Per-Protocol:
Non-IP: Source MAC address
IPv4: Source MAC address
IPv6: Source MAC address
More detail can be found with show etherchannel port-channel or show etherchannel detail.
show etherchannel port-channel
Channel-group listing:
----------------------
Group: 1
----------
Port-channels in the group:
---------------------------
Port-channel: Po1 (Primary Aggregator)
------------
Age of the Port-channel = 380d:06h:04m:51s
Logical slot/port = 2/40 Number of ports = 4
HotStandBy port = null
Port state = Port-channel Ag-Inuse
Protocol = LACP
Port security = Disabled
Ports in the Port-channel:
Index Load Port EC state No of bits
------+------+------+------------------+-----------
0 00 Gi0/1 Active 0
0 00 Gi0/2 Active 0
0 00 Gi0/3 Active 0
0 00 Gi0/4 Active 0
Time since last port bundled: 380d:06h:04m:27s Gi0/2
Time since last port Un-bundled: 380d:06h:04m:37s Gi0/4
Etherchannel traffic distribution can be tested with the test etherchannel … command. This simulates which link in a port-channel will be used for a particular flow. Below is the example for IP based traffic, however there are other options such as MAC address that can be specified.
The output will show the computed RBH, which is the hash value that would be assigned to the flow. Some switches will show the interface that would be selected.
test etherchannel load-balance interface port-channel [num] ip [src-ip] [dst-ip]
On some switches, the show interfaces port-channel ID etherchannel command has to be used.
In the table, there is a load column. Depending on the switch, this may include Hex values such as 11, 22, 44, and 88.
When these are converted into an 8-bit binary value (for example 0x11 is 0001 0001), the ‘on’ bits refer to the hashes that are allocated to the link. In the case of 0x11, bits 0 and 4 are set, so hashes 1 and 4 are assigned to this link.
Depending on the switch, the load may show as 00 on all links.
show interfaces port-channel 1 etherchannel
Port-channel1 (Primary aggregator)
Age of the Port-channel = 380d:06h:36m:16s
Logical slot/port = 2/40 Number of ports = 4
HotStandBy port = null
Port state = Port-channel Ag-Inuse
Protocol = LACP
Port security = Disabled
Ports in the Port-channel:
Index Load Port EC state No of bits
------+------+------+------------------+-----------
0 00 Gi0/1 Active 0
0 00 Gi0/2 Active 0
0 00 Gi0/3 Active 0
0 00 Gi0/4 Active 0
Time since last port bundled: 380d:06h:35m:52s Gi0/2
Time since last port Un-bundled: 380d:06h:36m:02s Gi0/4
Common Reasons EtherChannel Won’t Form
If show etherchannel summary shows links in standalone (S) or suspended (s) mode rather than bundled (P), a parameter mismatch is the most likely cause. IOS checks these settings before allowing a link to bundle:
show etherchannel summary
Group Port-channel Protocol Ports
------+-------------+-----------+-------
1 Po1(SD) LACP Gi0/1(s) Gi0/2(s)
The SD flag on the port-channel (down) and s on the physical ports (suspended) means the links are connected but IOS is blocking them from bundling.
Check for mismatched channel-group modes. Both sides must use a compatible combination (see the modes table above). A common mistake is on at one end and active at the other:
! Check the mode on each interface
Switch-A#show running-config interface gigabit 0/1 | include channel-group
channel-group 1 mode on
Switch-B#show running-config interface gigabit 0/1 | include channel-group
channel-group 1 mode active
This will never form a channel. Both sides need matching modes.
Check for parameter mismatches. All member interfaces must have identical configuration for: speed and duplex, switchport mode (access vs trunk), allowed VLANs, native VLAN, and spanning-tree port type. Use show interfaces gigabit 0/1 trunk to verify VLAN configuration matches across all member ports.
Check the err-disable log. IOS may err-disable a port when it detects a bundling violation:
Switch#show interfaces gigabit 0/2 status
Port Name Status Vlan Duplex Speed Type
Gi0/2 err-disabled trunk full 1000 10/100/1000BaseTX
Switch#show log | include Gi0/2
%EC-5-CANNOT_BUNDLE2: Gi0/2 is not compatible with Gi0/1 and will be suspended
(speed of Gi0/2 is 100Mb/s, Gi0/1 is 1000Mb/s)
The syslog message identifies the exact mismatch — in this case, a speed difference between member ports.