feature vpc
Enables the Virtual Port Channel (vPC) feature on the Nexus switch, allowing the creation of vPC domains for multi-chassis link aggregation.
Overview
The 'feature vpc' command is the foundational step for deploying Virtual Port Channels (vPC) on Cisco Nexus switches. vPC is a Cisco proprietary technology that allows two Nexus switches to act as a single logical switch from the perspective of a third device (such as an access switch, server, or router). This provides active-active uplinks, increased bandwidth, and fast convergence without relying on Spanning Tree Protocol (STP) to block redundant links. In a typical data center, vPC is used to dual-home servers or switches to a pair of aggregation switches, eliminating single points of failure and simplifying network design.
On Cisco NX-OS, vPC requires a dedicated peer-link (a 10GE or 40GE port-channel) between the two switches for data-plane traffic and a separate keepalive link (typically a routed interface) for control-plane health monitoring. The 'feature vpc' command enables the vPC infrastructure, including the ability to create vPC domains, configure peer-keepalive links, and assign member ports. Without this feature enabled, all vPC-related commands are unavailable.
In troubleshooting workflows, verifying that 'feature vpc' is enabled is the first step when vPC configuration fails. Use 'show feature' to confirm. If vPC is not enabled, the switch will reject commands like 'vpc domain 1'. Once enabled, you must also enable 'feature lacp' if using LACP for the peer-link (recommended). The feature is persistent across reboots only if saved to startup-config. vPC is supported on Nexus 3000, 5000, 6000, 7000, and 9000 series switches, though some older platforms may require specific NX-OS versions.
feature vpcWhen to Use This Command
- Enabling vPC to provide active-active uplinks from access switches to two core Nexus switches for redundancy and increased bandwidth.
- Configuring vPC to simplify spanning-tree topology by making two switches appear as a single logical switch to downstream devices.
- Using vPC to support dual-homed servers with NIC teaming, eliminating the need for Spanning Tree Protocol (STP) on server links.
- Enabling vPC as a prerequisite for deploying Cisco FabricPath or other advanced data center features that rely on vPC domains.
Parameters
| Parameter | Syntax | Description |
|---|---|---|
| feature vpc | feature vpc | Enables the vPC feature globally. No parameters. Must be entered in global configuration mode. After enabling, you can configure vPC domain and related parameters. |
Command Examples
Enable vPC feature
configure terminal
feature vpcswitch(config)# feature vpc switch(config)#
The command enables the vPC feature globally. No output is displayed upon success; the prompt returns to config mode.
Verify vPC feature is enabled
show feature | include vpcvpc 1 enabled
The output shows that the vPC feature is enabled (instance 1). If disabled, it would show 'disabled'.
Understanding the Output
The 'feature vpc' command itself produces no output on success. To verify that vPC is enabled, use 'show feature | include vpc'. The output displays the feature name, instance number, and status (enabled/disabled). A healthy state shows 'enabled'. If the feature is not enabled, vPC configuration commands will be rejected. After enabling, you must configure a vPC domain and peer-link to complete the setup.
Configuration Scenarios
Basic vPC Setup on Two Nexus Switches
Two Nexus 9000 switches (N9K-1 and N9K-2) acting as vPC peers, connected to an access switch via vPC.
Topology
+----------+ +----------+
| N9K-1 |----------| N9K-2 |
+----------+ +----------+
| |
+----------------------+
|
[Access Switch]Steps
- 1.Enable vPC feature on both switches.
- 2.Create a vPC domain with the same domain ID on both switches.
- 3.Configure peer-keepalive link (e.g., management interface).
- 4.Create a port-channel for the peer-link and configure it as vPC peer-link.
- 5.Add member interfaces to the peer-link port-channel.
- 6.Create downstream port-channels and configure them as vPC member ports.
! On N9K-1 configure terminal feature vpc vpc domain 10 peer-keepalive destination 10.1.1.2 source 10.1.1.1 role priority 1000 interface port-channel 1 switchport mode trunk vpc peer-link interface Ethernet1/1-2 channel-group 1 mode active ! On N9K-2 configure terminal feature vpc vpc domain 10 peer-keepalive destination 10.1.1.1 source 10.1.1.2 role priority 2000 interface port-channel 1 switchport mode trunk vpc peer-link interface Ethernet1/1-2 channel-group 1 mode active
Verify: Use 'show vpc brief' to verify vPC status, peer-link status, and consistency. Use 'show vpc consistency-parameters' to ensure both switches have matching configurations.
Watch out: The peer-keepalive link must be a routed interface (e.g., management or loopback) and cannot use the peer-link. Also, the vPC domain ID must match on both peers.
Troubleshooting with This Command
When troubleshooting vPC issues on Nexus switches, the first step is to verify that 'feature vpc' is enabled using 'show feature | include vpc'. If disabled, enable it and save the configuration. Common issues include peer-link flapping, keepalive failures, and consistency parameter mismatches. Use 'show vpc brief' to check the overall vPC status: the 'vPC status' should show 'up', and the peer-link status should be 'up'. If the peer-link is down, check the port-channel configuration and physical interfaces. Use 'show vpc peer-keepalive' to verify keepalive connectivity; the status should be 'alive'. If keepalive fails, check IP reachability and firewall rules. Consistency parameters are critical: use 'show vpc consistency-parameters global' and 'show vpc consistency-parameters interface <port-channel>' to ensure both switches have identical settings for STP, VLANs, and port-channel modes. Mismatches can cause vPC member ports to be suspended. Also, verify that the vPC domain ID and role priorities are configured correctly. On Nexus 9000, ensure that the 'feature vpc' and 'feature lacp' are both enabled if using LACP. For advanced troubleshooting, enable debugging with 'debug vpc all' but use cautiously in production.
CCNA Exam Tips
Remember that 'feature vpc' must be enabled before any vPC configuration; it is a prerequisite for all vPC commands.
On Nexus switches, vPC requires a dedicated Layer 2 peer-link and a separate keepalive link (usually routed) for control-plane communication.
In CCNP Data Center exams, be aware that vPC can coexist with FabricPath and OTV, but requires proper feature enablement order.
Common Mistakes
Forgetting to enable 'feature vpc' before configuring vPC domain, resulting in 'Invalid command' errors.
Enabling vPC without also enabling 'feature lacp' if using LACP for the peer-link; vPC supports both static and LACP port-channels.
Not saving the configuration after enabling vPC; the feature state is not automatically saved to startup-config.
Platform Notes
On Cisco NX-OS, 'feature vpc' is required before any vPC configuration. This differs from Cisco IOS where vPC is not available (Cisco IOS uses EtherChannel and STP). On Nexus, vPC is a core data center feature. Equivalent commands on other platforms: on Arista EOS, 'feature vpc' is not used; instead, MLAG is configured with 'mlag configuration'. On Juniper Junos, MC-LAG is configured under 'chassis cluster' or 'interfaces'. On Cisco IOS-XR, vPC is not supported; instead, use 'lacp' and 'port-channel' with 'mlacp' for multi-chassis. NX-OS versions: vPC was introduced in NX-OS 4.0 on Nexus 5000 and later extended to all Nexus platforms. On Nexus 9000, vPC supports up to 256 vPCs per domain. Note that 'feature vpc' also enables the 'vpc' CLI context; after enabling, you can enter 'vpc domain <id>' to configure the domain. Always save the configuration with 'copy running-config startup-config' after enabling features.
Practice for the CCNA 200-301
Test your knowledge with hundreds of CCNA practice questions covering all exam domains.
Practice CCNA Questions