Sub topic 8
Configuring an LACP Port Channel on a Switch
This chapter walks through building a two-link LACP trunk on a Cisco IOS style switch. It assumes you know VLANs and trunks, can move around the switch CLI, and understand that LACP negotiates a bundle between two devices. Command names vary slightly between platforms.
The plan
The goal is a trunk that carries VLANs 10 and 20 over two physical ports, GigabitEthernet0/1 and 0/2. The switch treats the two ports as one logical interface, Port-channel1.
Two settings matter most:
channel-group 1 mode activeputs a port into bundle 1 and makes it send LACP packets. A port inactivemode starts the negotiation.- The
Port-channel1interface holds the settings that apply to the whole bundle.
The configuration
! Global: choose the hash inputs (available options vary by platform)
port-channel load-balance src-dst-ip
!
interface range GigabitEthernet0/1 - 2
switchport mode trunk
switchport trunk allowed vlan 10,20
channel-group 1 mode active
!
interface Port-channel1
switchport mode trunk
switchport trunk allowed vlan 10,20Read it in three parts.
- Hash choice.
port-channel load-balance src-dst-ipis a global setting. It picks which packet fields the switch hashes to choose a member link. It applies to every port channel on the switch, not just this one. - Member ports. The
interface rangecommand applies the same settings to both ports. Setting the trunk mode and allowed VLANs first, thenchannel-group, keeps the members identical when the bundle forms. - Logical interface. IOS creates
Port-channel1automatically when the firstchannel-group 1command runs. Settings you enter here are copied to the members, so configure it the same way as the members.
Configure both ends
LACP needs a partner. The other switch must use the same VLAN and trunk settings and must also run LACP. A typical pairing is:
| Local mode | Remote mode | Result |
|---|---|---|
| active | active | Bundle forms |
| active | passive | Bundle forms |
| passive | passive | No bundle, because neither side starts negotiation |
| active | static (`on`) | No bundle, because the static side sends no LACP |
Use active on both ends unless you have a reason not to. It avoids the passive/passive trap.
Configure members before bringing links up
Cabling both ends before the configuration is finished can cause temporary loops or ports that stay unbundled. A safer order is:
- Configure the port channel on both switches while the cables are disconnected or the member ports are shut down.
- Connect the cables, or run
no shutdownon the members. - Check the result with the commands from the next chapter.
Exercise
Switch A has channel-group 1 mode passive on its two uplinks, and switch B has channel-group 1 mode passive on its two ports. The VLAN and trunk settings match. Will the bundle form? How do you fix it?
Show answer
No. Passive mode only replies to LACP packets and never sends the first one, so neither side starts negotiation. Change at least one end to mode active, and preferably both.