vpcInterface Config

vpc [id]

Assigns a Virtual Port Channel (vPC) domain ID to an interface, enabling it to participate in a vPC with a peer switch.

Overview

The 'vpc [id]' command is used in interface configuration mode to assign a Virtual Port Channel (vPC) identifier to a port channel interface on Cisco Nexus switches. vPC technology allows two Nexus switches to appear as a single logical switch to downstream devices, providing active-active uplinks with fast convergence and loop-free topology. This command is a critical part of vPC configuration; without it, a port channel operates as a standard LACP or static port channel. The vPC ID must be unique within the vPC domain and must match on both peer switches for the corresponding port channel. The command is typically used after creating the port channel and configuring the vPC domain globally. In troubleshooting workflows, verifying the vPC ID assignment is done via 'show running-config interface port-channel X' or 'show vpc brief'. Platform-specific behavior: On NX-OS, the vPC ID range is 1-4096, and the command is only available after enabling the vPC feature. The command is not present in Cisco IOS; vPC is Nexus-specific.

Syntax·Interface Config
vpc <id>

When to Use This Command

  • Configuring a port channel as a vPC member on a Nexus switch to provide active-active uplink from a downstream device.
  • Enabling dual-homed server connections with vPC for redundancy and load balancing.
  • Creating a vPC between two Nexus switches to act as a single logical switch to downstream devices.
  • Migrating from traditional port channels to vPC for improved convergence and bandwidth utilization.

Parameters

ParameterSyntaxDescription
id<1-4096>The vPC identifier to assign to the port channel. Must be unique within the vPC domain and match on both peer switches. Range is 1 to 4096.

Command Examples

Assign vPC ID 100 to a port channel

interface port-channel 10 vpc 100
interface port-channel10
  vpc 100

The command assigns vPC ID 100 to Port-channel10. This port channel will be part of the vPC with the same ID on the peer switch.

Verify vPC configuration on an interface

show vpc brief
vPC domain id        : 1
Peer status          : peer adjacency formed ok
vPC keep-alive status: peer is alive
Configuration consistency status: success
vPC role             : primary
Number of vPCs configured : 1
vPC Peer-link status
---------------------------------------------------------------------
id   Port   Status Active vlans
--   ----   ------ ------------------------------------------------
1    Po1    up     1-100,200

vPC status
---------------------------------------------------------------------
id    Port   Status Consistency Reason                        Active vlans
--    ----   ------ ----------- ------                        ------------
100   Po10   up     success     success                       1-100,200

The output shows vPC domain 1 is operational. Port-channel10 (vPC 100) is up and consistent. Active VLANs are listed. The peer link (Po1) is up.

Understanding the Output

The 'show vpc brief' command provides a summary of the vPC domain status. Key fields include: 'vPC domain id' - the domain number configured globally; 'Peer status' - indicates if the vPC peer adjacency is formed (should be 'peer adjacency formed ok'); 'vPC keep-alive status' - shows if the peer is reachable via keepalive messages ('peer is alive' is healthy); 'Configuration consistency status' - must be 'success' for vPC to operate; 'vPC role' - primary or secondary; 'Number of vPCs configured' - count of vPC interfaces. The 'vPC Peer-link status' section shows the peer-link port channel (e.g., Po1) and its status. The 'vPC status' table lists each vPC ID, its associated port, status (up/down), consistency status (success/failure), reason for inconsistency if any, and active VLANs. A healthy vPC shows 'up' and 'success' for both status and consistency. Problems include 'down' status, 'failed' consistency, or 'peer not formed'.

Configuration Scenarios

Basic vPC Configuration for Server Uplink

Two Nexus 9000 switches acting as a vPC pair, connecting to a dual-homed server with two NICs in a port channel.

Topology

+-------+ +-------+ | N9K1 |----------| N9K2 | +-------+ +-------+ | | +-------+--------+ | [Server] (Port-channel 10)

Steps

  1. 1.Configure vPC domain on both switches.
  2. 2.Create peer-link port channel (e.g., Po1) and assign it as vPC peer-link.
  3. 3.Create port channel for server (e.g., Po10) and assign vPC ID 100.
  4. 4.Configure member interfaces (e.g., Eth1/1, Eth1/2) as channel-group 10 mode active.
  5. 5.Verify with 'show vpc brief'.
Configuration
! On both N9K1 and N9K2
feature vpc
vpc domain 1
  role primary  ! on N9K1 only; secondary on N9K2
  peer-keepalive destination 10.1.1.2 source 10.1.1.1
interface port-channel 1
  vpc peer-link
interface port-channel 10
  vpc 100
interface Ethernet1/1
  channel-group 10 mode active
interface Ethernet1/2
  channel-group 10 mode active

Verify: show vpc brief show vpc consistency-parameters global show port-channel summary

Watch out: Ensure the vPC ID (100) matches on both switches for the same port channel. Mismatch causes consistency failure.

Troubleshooting with This Command

When troubleshooting vPC issues, start with 'show vpc brief' to check overall domain health. If a vPC interface is down, verify the vPC ID is configured correctly on both peers using 'show running-config interface port-channel X'. Use 'show vpc consistency-parameters interface port-channel X' to check for mismatched parameters like allowed VLANs, STP settings, or MTU. Common issues: vPC ID mismatch, port channel not created on both sides, or member interfaces not in the same channel group. On NX-OS, the 'vpc' command will be rejected if the port channel is already a peer-link or if the vPC domain is not configured. Also check the peer-link status; if it's down, vPC interfaces will be suspended. Use 'show vpc peer-keepalive' to verify keepalive connectivity. If consistency fails, the vPC interface will be suspended; resolve the mismatch by aligning configurations. The 'show vpc role' command helps identify primary/secondary roles; role changes can cause temporary traffic disruption.

CCNA Exam Tips

1.

Remember that vPC ID must match on both peer switches for the same port channel.

2.

vPC configuration requires a peer-link and keepalive link; the 'vpc' command is only part of the setup.

3.

CCNP exam may ask about vPC consistency checks and common reasons for failure (e.g., mismatched MTU, allowed VLANs).

Common Mistakes

Assigning the same vPC ID to multiple port channels on the same switch (not allowed).

Forgetting to configure the vPC domain globally before using the 'vpc' command on an interface.

Configuring vPC on a port channel that is also used as a peer-link (peer-link must be a separate port channel).

Platform Notes

The 'vpc [id]' command is specific to Cisco NX-OS and is not available on Cisco IOS or IOS-XE. On Nexus platforms, vPC is a key feature for data center switching. The command syntax is consistent across Nexus 3000, 5000, 6000, 7000, and 9000 series. In earlier NX-OS versions, the vPC ID range was limited to 1-4096; newer versions support up to 4096. The command requires the 'feature vpc' to be enabled globally. On other platforms like Arista, similar functionality is achieved with MLAG, using different commands. For Cisco IOS, the equivalent is EtherChannel with VSS or StackWise, but not vPC. Understanding vPC is essential for CCNP Data Center and CCIE certifications.

Practice for the CCNA 200-301

Test your knowledge with hundreds of CCNA practice questions covering all exam domains.

Practice CCNA Questions