Brown Belt

vPC: Virtual Port-Channel

vPC (Virtual Port-Channel) is a Nexus-only technology that lets two switches act like one from the perspective of a downstream device. It provides active-active redundancy: both switches forward traffic simultaneously, with no failover delay.

What Is vPC?

vPC extends the port-channel concept across two physical switches. Instead of connecting a server or another switch to just one uplink, you connect it to both Nexus switches with a port-channel. Both switches carry traffic; if one fails, the other continues seamlessly.

Key difference from regular port-channel: A port-channel bonds multiple links on the same switch. vPC bonds links across two different switches, giving you switch-level redundancy.

Why Use vPC?

  • Active-active forwarding: Both switches send and receive traffic at the same time, not in active-standby mode.
  • No STP blocking: vPC eliminates the need to block redundant links with Spanning Tree Protocol (STP). Both links are always active.
  • Higher throughput: A downstream LACP port-channel to both vPC peers sees double the bandwidth.
  • Switch redundancy: If one Nexus peer fails, the other continues forwarding for all vPC member port-channels.

vPC Components

Component Description
vPC domain A pair of Nexus switches configured to work as one. Set on both peers with the same domain ID.
Peer-link A dedicated trunk carrying control messages and data between the two Nexus switches. Uses port-channel with the vpc peer-link command on the port-channel interface.
Peer-keepalive A separate control link (often routed through management network) that detects if a peer has failed.
vPC member port-channel A port-channel on the vPC member interface (e.g., vpc 20) that connects to a downstream device. Both peers forward traffic on this channel.

Configure vPC: Step by Step

This example configures vPC between two Nexus 9000 switches. Both switches get nearly identical configuration (only the peer-keepalive IPs differ).

Prepare: Enable Required Features

Nexus1# configure terminal
Nexus1(config)# feature lacp
Nexus1(config)# feature vpc
Nexus1(config)#

Explanation: vPC depends on LACP, so enable both features on both peers.

Step 1: Configure vPC Domain and Role Priority

On Nexus1 (primary):

Nexus1(config)# vpc domain 10
Nexus1(config-vpc-domain)# role priority 100
Nexus1(config-vpc-domain)#

On Nexus2 (secondary):

Nexus2(config)# vpc domain 10
Nexus2(config-vpc-domain)# role priority 200
Nexus2(config-vpc-domain)#

Explanation: vpc domain 10 creates vPC domain 10 on both peers (domain ID must match). role priority 100 and role priority 200 decide which switch is primary (lower number wins). The primary switch handles some management tasks and edge cases.

Step 2: Configure Peer-Keepalive Link

On Nexus1:

Nexus1(config-vpc-domain)# peer-keepalive destination 192.0.2.2 source 192.0.2.1 vrf management
Nexus1(config-vpc-domain)# exit

On Nexus2:

Nexus2(config-vpc-domain)# peer-keepalive destination 192.0.2.1 source 192.0.2.2 vrf management
Nexus2(config-vpc-domain)# exit

Explanation: peer-keepalive destination <peer-ip> source <my-ip> specifies the management IP addresses used for keepalive heartbeats. The destination and source are swapped on each peer. These IPs are on the management network (VRF management).

Step 3: Create and Configure the Peer-Link Port-Channel

On Nexus1:

Nexus1(config)# interface port-channel 1
Nexus1(config-if)# description vPC peer-link
Nexus1(config-if)# switchport mode trunk
Nexus1(config-if)# switchport trunk allowed vlan 1-4094
Nexus1(config-if)# vpc peer-link
Nexus1(config-if)# no shutdown
Nexus1(config-if)# exit

On Nexus2 (identical):

Nexus2(config)# interface port-channel 1
Nexus2(config-if)# description vPC peer-link
Nexus2(config-if)# switchport mode trunk
Nexus2(config-if)# switchport trunk allowed vlan 1-4094
Nexus2(config-if)# vpc peer-link
Nexus2(config-if)# no shutdown
Nexus2(config-if)# exit

Explanation: vpc peer-link on the port-channel interface designates it as the peer-link. This is critical — without it, vPC will not form. Allow all VLANs (or at least all VLANs that will use vPC).

Step 4: Add Member Interfaces to Peer-Link

On Nexus1 (connect to Nexus2 via Ethernet1/49-50):

Nexus1(config)# interface ethernet 1/49-50
Nexus1(config-if-range)# switchport mode trunk
Nexus1(config-if-range)# switchport trunk allowed vlan 1-4094
Nexus1(config-if-range)# channel-group 1 mode active
Nexus1(config-if-range)# no shutdown
Nexus1(config-if-range)# exit

On Nexus2 (connect back to Nexus1 via Ethernet1/49-50):

Nexus2(config)# interface ethernet 1/49-50
Nexus2(config-if-range)# switchport mode trunk
Nexus2(config-if-range)# switchport trunk allowed vlan 1-4094
Nexus2(config-if-range)# channel-group 1 mode active
Nexus2(config-if-range)# no shutdown
Nexus2(config-if-range)# exit

Explanation: Members of the peer-link port-channel use channel-group 1 mode active (LACP) to bundle. This creates the logical peer-link.

Step 5: Create vPC Member Port-Channels (for Downstream Devices)

Now create a port-channel for a downstream device (e.g., a server or access switch) connected to both Nexus peers:

On Nexus1:

Nexus1(config)# interface port-channel 20
Nexus1(config-if)# description vPC member - Server LACP bond
Nexus1(config-if)# switchport mode trunk
Nexus1(config-if)# switchport trunk allowed vlan 10,20,30
Nexus1(config-if)# vpc 20
Nexus1(config-if)# no shutdown
Nexus1(config-if)# exit

Nexus1(config)# interface ethernet 1/1-2
Nexus1(config-if-range)# switchport mode trunk
Nexus1(config-if-range)# switchport trunk allowed vlan 10,20,30
Nexus1(config-if-range)# channel-group 20 mode active
Nexus1(config-if-range)# no shutdown
Nexus1(config-if-range)# exit

On Nexus2 (identical):

Nexus2(config)# interface port-channel 20
Nexus2(config-if)# description vPC member - Server LACP bond
Nexus2(config-if)# switchport mode trunk
Nexus2(config-if)# switchport trunk allowed vlan 10,20,30
Nexus2(config-if)# vpc 20
Nexus2(config-if)# no shutdown
Nexus2(config-if)# exit

Nexus2(config)# interface ethernet 1/1-2
Nexus2(config-if-range)# switchport mode trunk
Nexus2(config-if-range)# switchport trunk allowed vlan 10,20,30
Nexus2(config-if-range)# channel-group 20 mode active
Nexus2(config-if-range)# no shutdown
Nexus2(config-if-range)# exit

Explanation: vpc 20 on the port-channel marks it as a vPC member. The downstream device sees one LACP port-channel (channel-group 20) to both switches and can distribute traffic across both links.

Step 6: Save Configuration

Nexus1# copy running-config startup-config
Nexus2# copy running-config startup-config

Verify vPC Configuration

Check vPC status on both peers:

Nexus1# show vpc
Legend:
        (*) - local vPC is down, forwarding via vPC Peer-link
vPC domain id                     : 10
Peer status                       : peer adjacency formed ok
vPC keep-alive status             : peer is alive
Configuration consistency status  : ok
Per-vlan consistency status       : ok
Type-2 consistency status         : ok
vPC role                          : primary
Number of vPCs configured         : 1
Peer Gateway                      : Disabled
Dual-active excluded VLANs        : -

Show vPC summary:

Nexus1# show vpc brief
vPC domain id : 10
Peer status   : peer adjacency formed ok
vPC keep-alive status (peer) : peer is alive
vPC keep-alive status (local): peer is alive

vPC Peer-link status
---------------------------------------------------------------------
id     Port     Status Active vlans
--     ----     ------ -------------------------------------------------
1      Po1      up     1-4094

vPC status
---------------------------------------------------------------------
id     Port     Status Consistency Reason
--     ----     ------ ----------- ------
20     Po20     up     success     success

Verify peer-keepalive connectivity:

Nexus1# show vpc peer-keepalive
vPC Keep-alive status
  Destination Address : 192.0.2.2
  Keepalive interval  : 1000 milliseconds
  Keepalive timeout   : 5 seconds
  Keepalive hold-timeout : 3 seconds
  Notification interval : 5000 milliseconds
  Status : peer is alive
  Authentication : disabled

Keepalive Statistics
  Sent : 1234
  Received : 1234
  Missed : 0

Check consistency parameters:

Nexus1# show vpc consistency-parameters global
vPC domain id : 10

Global consistency parameters:
-----------------------------------
Type 1 : vlan
  Consistency : ok

Type 2 : allowed vlan
  Consistency : ok

Type 3 : spanning tree
  Consistency : ok

Common Mistake: Missing vpc peer-link

If you forget vpc peer-link on the port-channel interface connecting the two Nexus switches, the peer-link will appear as a normal port-channel and vPC will fail to form. Check show vpc and look for "Peer status: peer adjacency failed" or "vPC keep-alive status: peer is alive" combined with a failed vPC member. Always verify show port-channel summary shows the peer-link port-channel as SU (layer 2, in use) and member ports as P (bundled).

Common Mistake: Mismatched Peer-Keepalive IPs

If you swap the source and destination IPs on one peer (e.g., use 192.0.2.1 on both instead of swapping them), the keepalive will fail and you'll see "vPC keep-alive status: peer is alive" as false. Re-check the configuration with show run vpc. The source must be the local management IP and destination must be the peer's management IP, and they must be swapped on the other peer.

Downstream Device: LACP to Both vPC Peers

A server, access switch, or any device connected to vPC member port-channels must also use LACP. The device sees one logical port-channel connected to both Nexus switches. Example on a Linux server using bonds:

# /etc/network/interfaces (or equivalent for your distro)
auto bond0
iface bond0 inet static
  address 10.10.10.100
  netmask 255.255.255.0
  gateway 10.10.10.1
  slaves eth2 eth3
  bond-mode 802.3ad
  bond-miimon 100

Explanation: bond-mode 802.3ad enables LACP. The server's eth2 and eth3 connect to port-channel 20 on Nexus1 and Nexus2 respectively. The server and switches negotiate a single LACP port-channel carrying traffic across both physical links.

Try it: build the vPC domain

Two Nexus 9000s with Po10 (Eth1/1-2) ready to become the peer-link, mgmt0 for the keepalive (192.168.100.11 and .12), and ESX-01 dual-homed on Eth1/3. Build vpc domain 10 on both, then vPC 3 as a trunk for VLANs 10 and 20. show vpc tells you how far you got.

Summary

  • vPC is a Nexus-only technology providing active-active redundancy across two switches.
  • Configure the same vPC domain ID on both peers; role priority determines primary (lower number).
  • Set up peer-keepalive with swapped source/destination IPs on each peer.
  • Create a peer-link port-channel marked with vpc peer-link and add its member interfaces with channel-group X mode active.
  • Create vPC member port-channels marked with vpc <id> for downstream devices.
  • Verify with show vpc, show vpc brief, and show vpc consistency-parameters global.
  • Downstream devices must use LACP (mode active) to bond to both vPC member port-channels.