interface port-channel [id]
Creates or enters interface configuration mode for a port-channel (EtherChannel) interface on Cisco NX-OS.
Overview
The 'interface port-channel [id]' command is used to create or modify a port-channel (EtherChannel) interface on Cisco Nexus switches running NX-OS. A port-channel aggregates multiple physical Ethernet links into a single logical link, providing increased bandwidth, load balancing, and redundancy. This command enters interface configuration mode for the specified port-channel ID, allowing you to apply Layer 2 or Layer 3 configurations such as VLAN trunking, IP addressing, or QoS policies.
In NX-OS, port-channels are created automatically when you first enter the interface configuration mode for a given ID; no separate creation step is needed. The physical interfaces are added to the port-channel using the 'channel-group' command under each physical interface configuration. The port-channel can operate in either static mode (on) or dynamic mode using LACP (Link Aggregation Control Protocol) with modes 'active' or 'passive'.
This command is essential for network designs requiring high availability and bandwidth aggregation, such as connecting switches in a data center, linking to servers with NIC teaming, or implementing vPC (virtual PortChannel) for dual-homed devices. It is also used in troubleshooting to verify port-channel configuration and member interface status.
interface port-channel [id]When to Use This Command
- Aggregating multiple physical links between two switches to increase bandwidth and provide redundancy.
- Creating a port-channel to connect to a server with NIC teaming for load balancing and failover.
- Configuring a port-channel as a routed interface for Layer 3 EtherChannel.
- Setting up a port-channel for vPC (virtual PortChannel) to dual-homed devices.
Parameters
| Parameter | Syntax | Description |
|---|---|---|
| id | port-channel-id (1-4096) | Specifies the port-channel number. The range is 1 to 4096 on most Nexus platforms. This ID must match the channel-group number used on member interfaces. |
Command Examples
Create and enter port-channel 10
interface port-channel 10switch(config-if)#
The command creates port-channel 10 if it does not exist and enters interface configuration mode. The prompt changes to (config-if)#.
Configure port-channel with description and switchport mode
interface port-channel 20
description Link to Core-Switch
switchport mode trunkswitch(config-if)# switch(config-if)# switch(config-if)#
After entering port-channel 20, the description and switchport mode are configured. Each command is applied to the port-channel interface.
Understanding the Output
The command itself does not produce output beyond changing the prompt. However, subsequent commands like 'show interface port-channel 10' display detailed information. Key fields include: 'port-channel' status (up/down), 'members' (physical interfaces), 'load-balancing' method, and 'counters' for traffic. A healthy port-channel shows all members in 'up' state and 'protocol' as 'LACP' or 'ON'. Problem values include members in 'down' state or 'err-disabled', indicating physical or configuration issues.
Configuration Scenarios
Basic Layer 2 EtherChannel
Two Nexus switches connected via four 10G interfaces. Need to aggregate them for increased bandwidth and redundancy.
Topology
[Nexus1]---(Eth1/1-4)---[Nexus2]Steps
- 1.On Nexus1, enter global config and create port-channel 10.
- 2.Configure port-channel 10 as a trunk.
- 3.Add physical interfaces to the port-channel using channel-group 10 mode active.
- 4.Repeat on Nexus2 with the same configuration.
! On Nexus1 interface port-channel 10 switchport mode trunk ! interface Ethernet1/1 channel-group 10 mode active ! interface Ethernet1/2 channel-group 10 mode active ! interface Ethernet1/3 channel-group 10 mode active ! interface Ethernet1/4 channel-group 10 mode active
Verify: Use 'show port-channel summary' to verify all members are up and bundled. Use 'show interface port-channel 10' to check status.
Watch out: Ensure all member interfaces have the same speed, duplex, and VLAN configuration; otherwise, the port-channel may not form.
Layer 3 Routed EtherChannel
Need a routed link between two Nexus switches using a port-channel for higher bandwidth.
Topology
[Nexus1]---(Eth1/1-2)---[Nexus2]Steps
- 1.Create port-channel 20 on both switches.
- 2.Remove switchport mode to make it a Layer 3 interface.
- 3.Assign IP addresses.
- 4.Add physical interfaces with channel-group.
! On Nexus1 interface port-channel 20 no switchport ip address 10.1.1.1/30 ! interface Ethernet1/1 channel-group 20 mode active ! interface Ethernet1/2 channel-group 20 mode active
Verify: Ping the remote IP address. Use 'show ip interface brief' to verify port-channel is up.
Watch out: Both sides must have the same Layer 3 configuration; mismatched IP subnets will cause connectivity issues.
Troubleshooting with This Command
When troubleshooting port-channel issues on NX-OS, start with 'show port-channel summary' to see the status of the port-channel and its member interfaces. Look for members in 'down' or 'err-disabled' state. Use 'show interface port-channel [id]' to check for errors, CRC, or collisions. If LACP is used, 'show lacp neighbor' and 'show lacp counters' can help identify negotiation problems. Common issues include mismatched LACP modes (active/passive), incompatible speed/duplex, or VLAN mismatches. Also verify that the port-channel is not in a suspended state due to inconsistent configurations. On Nexus, use 'show system internal ethpm info interface port-channel [id]' for detailed internal state.
CCNA Exam Tips
Remember that on NX-OS, port-channels are created automatically when you enter interface port-channel mode; no explicit 'channel-group' command is needed on the port-channel itself.
For vPC, the port-channel must be configured with 'vpc peer-link' on the peer-link port-channel.
Know that 'interface port-channel' is used for both Layer 2 and Layer 3 EtherChannels; Layer 3 requires 'no switchport'.
Common Mistakes
Forgetting to add physical interfaces to the port-channel using 'channel-group [id] mode active/passive/on' under the physical interface.
Configuring incompatible parameters on member interfaces (e.g., different speed/duplex) causing the port-channel to not form.
Using 'interface port-channel' without specifying an ID, which is invalid.
Platform Notes
On Cisco NX-OS, the 'interface port-channel' command behaves similarly to Cisco IOS, but there are key differences. In NX-OS, port-channels are created implicitly when you enter the interface configuration mode; no 'interface port-channel' creation command is needed. Additionally, NX-OS supports up to 4096 port-channels (depending on platform) and uses a different default load-balancing method (src-dst ip). For vPC, the port-channel must be configured with 'vpc peer-link' on the peer-link port-channel. NX-OS also supports 'lacp rate fast' for faster LACP updates. Equivalent commands on other platforms: on Juniper, 'set interfaces ae0 aggregated-ether-options'; on Arista, 'interface port-channel [id]' similar to Cisco.
Related Commands
Practice for the CCNA 200-301
Test your knowledge with hundreds of CCNA practice questions covering all exam domains.
Practice CCNA Questions