L2 · switching · reviewed
vPC
Virtual Port Channel
Two Nexus peers present one LACP system downstream; peer-keepalive is the split-brain detector when the peer-link fails.
Presenter modeEmbed this figure
Why it exists
STP blocks one uplink of a dual-homed access switch. vPC lets two Nexus peers present one port channel so both uplinks forward without forming a loop. Cisco Nexus 9000 Series NX-OS Interfaces Configuration Guide, Release 10.5(x) — Configuring vPCs §vPC Overview
The peers remain two control planes with two configurations. Consistency checks synchronise what must match; they do not merge the boxes into a stack. Cisco Nexus 9000 Series NX-OS Interfaces Configuration Guide, Release 10.5(x) — Configuring vPCs §Consistency Check Behavior
One logical channel from two peers
Two Nexus switches share a vPC domain, a peer-link, and a separate peer-keepalive path. Downstream, LACP sees one system ID so both uplinks forward.
Both peers join vPC domain 1. They exchange control state over the peer-link and keep a separate Layer-3 peer-keepalive path that must not ride the peer-link. Access · LACP. NX1 · primary: Domain 1. NX2 · secondary: Domain 1. Fabric / core.
- Link
- Blocking
- Packet in flight
- Discarded
- Emphasis
Text equivalent of this diagram
| Element | Kind | State |
|---|---|---|
| Access · LACP | switch | — |
| NX1 · primary | switch | Domain: 1 |
| NX2 · secondary | switch | Domain: 1 |
| Fabric / core | cloud | — |
| Access · LACP — NX1 · primary | link | up |
| Access · LACP — NX2 · secondary | link | up |
| NX1 · primary — NX2 · secondary | link | up |
| NX1 · primary — Fabric / core | link | up |
| NX2 · secondary — Fabric / core | link | up |
Both peers join vPC domain 1. They exchange control state over the peer-link and keep a separate Layer-3 peer-keepalive path that must not ride the peer-link.
What changed
- NX1 · primary: Domain → 1
- NX2 · secondary: Domain → 1
- Peer-keepalive on separate path
- Emphasis on NX1 · primary ↔ NX2 · secondary
How it works
A vPC domain binds two peers. The peer-link carries control traffic and orphan-port traffic. Peer-keepalive is a separate Layer-3 path used when the peer-link fails to decide whether the peer is still alive. Cisco Nexus 9000 Series NX-OS Interfaces Configuration Guide, Release 10.5(x) — Configuring vPCs §Peer-Keepalive Link and Messages
If the peer-link fails and keepalive still reaches the peer, the secondary disables its vPC member ports. One survivor forwards. If keepalive is also gone, both peers may go dual-active. Cisco Nexus 9000 Series NX-OS Interfaces Configuration Guide, Release 10.5(x) — Configuring vPCs §vPC Peer-Link Failure and Peer-Keepalive
Type-1 consistency mismatches can suspend VLANs or members; type-2 mismatches warn. Orphan ports are single-attached and need dual-attach or orphan-port suspend to survive secondary suspension cleanly. Cisco Nexus 9000 Series NX-OS Interfaces Configuration Guide, Release 10.5(x) — Configuring vPCs §Consistency Check Behavior
On the wire
Constructed examples, encoded from the field table below them — not captured traffic.
- Physical
- A preamble and start-of-frame delimiter precede this, and the hardware removes them before any capture sees the frame. IEEE 802.3-2022
- MAC header
- Destination address, source address, and the EtherType naming the payload. IEEE 802.3-2022
- Payload and FCS
- Between 46 and 1500 octets, padded to the minimum, followed by a four-octet frame check sequence. IEEE 802.3-2022
Configure it
feature vpc feature lacpNX-OS keeps vPC and LACP off until features are enabled. Without `feature vpc`, domain configuration is rejected.
Cisco Nexus 9000 Series NX-OS Interfaces Configuration Guide, Release 10.5(x) — Configuring vPCs §Guidelines and Limitations
vpc domain 1 peer-keepalive destination 192.0.2.2 source 192.0.2.1 peer-switch peer-gatewayDomain ID must match on both peers. Peer-keepalive needs Layer-3 reachability separate from the peer-link so split-brain can be detected when the peer-link fails.
Common mistake: Running keepalive over the peer-link alone — when that link fails, keepalive dies with it and dual-active risk rises.
Cisco Nexus 9000 Series NX-OS Interfaces Configuration Guide, Release 10.5(x) — Configuring vPCs §Peer-Keepalive Link and Messages
interface port-channel1 switchport mode trunk vpc peer-linkThe peer-link carries flooded frames and orphan traffic between peers. It is not a substitute for keepalive.
Cisco Nexus 9000 Series NX-OS Interfaces Configuration Guide, Release 10.5(x) — Configuring vPCs §vPC Peer-Link
interface port-channel10 switchport mode trunk vpc 10Member Port-channel ID (`vpc 10`) must match on both peers so downstream LACP sees one system. Member interfaces join the Port-channel with LACP as usual.
Cisco Nexus 9000 Series NX-OS Interfaces Configuration Guide, Release 10.5(x) — Configuring vPCs §Configuring a vPC
Verify
show vpc brief- Domain ID, peer status, peer-keepalive status, and vPC member up/down.
show vpc consistency-parameters global- Type-1/Type-2 parameters and whether peers agree.
Caveats
- Marked draft: syntax has not been checked against Cisco documentation or a device.
- vPC is Cisco NX-OS only. Peer-keepalive, consistency checks, and orphan-port behaviour are vendor mechanisms — no RFC.
When it breaks
Symptom first, because that is what you have when it happens.
A configuration change is rejected, or a VLAN is suspended on the peer link with a consistency-check message.
Narrow it down
- Read the consistency-check output and find which parameter differs.
- Distinguish a type-1 mismatch, which suspends VLANs, from a type-2, which warns.
- Compare the specific setting on both peers.
Cause
The two peers must agree on a defined set of parameters. Type-1 mismatches suspend VLANs on the secondary because forwarding with inconsistent state would loop or blackhole; type-2 only warn.
Fix
Fix the parameter rather than disabling the check. It is enumerating a real inconsistency, and the suspension is what stops it becoming an outage.
Cisco Nexus 9000 Series NX-OS Interfaces Configuration Guide, Release 10.5(x) — Configuring vPCs §Consistency Check BehaviorThe peer link fails and half the network becomes unreachable, though both switches are up.
Narrow it down
- Check whether the peer keepalive is on a separate path from the peer link.
- Confirm which switch is operational primary.
- Look at whether the secondary suspended its member ports.
Cause
When the peer link fails but keepalive still works, the secondary suspends its virtual port channel members so the primary keeps forwarding alone. That is the design; the outage is anything that was only reachable through the secondary.
Fix
Ensure orphan ports are not carrying anything that matters, and keep the keepalive on a genuinely independent path — if both fail together, both switches forward and it is a split brain.
Cisco Nexus 9000 Series NX-OS Interfaces Configuration Guide, Release 10.5(x) — Configuring vPCs §vPC Peer-Link Failure and Peer-KeepaliveA device attached to only one peer loses connectivity during a peer-link event.
Narrow it down
- Identify which ports are orphan ports.
- Check whether orphan port suspension is configured.
- Confirm what the device depends on reaching.
Cause
An orphan port is attached to one peer only and is not part of a virtual port channel. When the secondary suspends its members, an orphan on the secondary is isolated unless it is suspended too so the device fails over by other means.
Fix
Dual-attach anything that matters. Where that is impossible, configure orphan port suspension so the device sees a link failure rather than a silent black hole.
Cisco Nexus 9000 Series NX-OS Interfaces Configuration Guide, Release 10.5(x) — Configuring vPCs §vPC Orphan PortsBoth peers keep forwarding after a peer-link failure and loops or MAC flaps appear.
Narrow it down
- Check peer-keepalive reachability at the time of the event.
- Confirm keepalive is not routed over the peer-link or a dependent path.
- Inspect show vpc brief for dual-active indicators.
Cause
Peer-link and keepalive failed together, or keepalive was never independent. Each peer concluded it was the survivor.
Fix
Restore an independent keepalive path before relying on peer-link failure behaviour; clear dual-active and re-establish the domain cleanly.
Cisco Nexus 9000 Series NX-OS Interfaces Configuration Guide, Release 10.5(x) — Configuring vPCs §Peer-Keepalive Link and MessagesThe vPC peer-link will not come up even though the port channel looks healthy.
Narrow it down
- Verify peer-keepalive is up before expecting the peer-link.
- Ping between keepalive addresses in the configured VRF.
- Confirm source and destination IPs and VRF mapping.
Cause
NX-OS requires the peer-keepalive link to be up before the peer-link can form. Misplaced keepalive (wrong VRF, no L3 path) blocks domain formation.
Fix
Bring keepalive up on a working Layer-3 path first, then form the peer-link.
Cisco Nexus 9000 Series NX-OS Interfaces Configuration Guide, Release 10.5(x) — Configuring vPCs §Peer-Keepalive Link and Messages
Design notes
Put peer-keepalive on a path that does not depend on the peer-link — often a dedicated VRF or management path with genuine Layer-3 reachability.
Dual-attach anything that matters. Orphans on the secondary become the hidden outage during the designed peer-link recovery.
Spanning tree still runs. vPC changes how the pair presents itself to neighbors; it does not remove the need for STP on miscabling outside the vPC members.
Misconceptions
- “vPC makes the two switches one switch.”
- They remain two control planes with two configurations, synchronised by consistency checks rather than merged. That is the difference from a stack or a chassis virtualisation, and it is why every parameter that must match is checked explicitly.
- “The peer link carries data traffic between the switches.”
- It carries control traffic and orphan-port traffic, and it is deliberately not a data path for virtual port channel members — the receiving peer will not forward a frame that arrived over the peer link out a member port. That rule is what prevents loops.
- “Spanning tree is not needed with vPC.”
- It still runs and still matters. The pair presents itself as one bridge for the purpose, but a loop introduced by miscabling outside the virtual port channels is caught by spanning tree exactly as it would be otherwise.
More walkthroughs
Peer-link down, keepalive still upfailure
The peer-link fails while keepalive remains reachable. The secondary suspends its vPC member ports so only the primary forwards — the designed single-survivor outcome.
Both members forward. Peer-link and keepalive are up. Downstream still sees one logical channel. Access. NX1 · primary: Members forwarding. NX2 · secondary: Members forwarding. Core.
- Link
- Blocking
- Packet in flight
- Discarded
- Emphasis
Text equivalent of this diagram
| Element | Kind | State |
|---|---|---|
| Access | switch | — |
| NX1 · primary | switch | Members: forwarding |
| NX2 · secondary | switch | Members: forwarding |
| Core | cloud | — |
| Access — NX1 · primary | link | up |
| Access — NX2 · secondary | link | up |
| NX1 · primary — NX2 · secondary | link | up |
| NX1 · primary — Core | link | up |
| NX2 · secondary — Core | link | up |
Both members forward. Peer-link and keepalive are up. Downstream still sees one logical channel.
What changed
- NX1 · primary: Members → forwarding
- NX2 · secondary: Members → forwarding
- Dual-active prevented by design
Type-1 mismatch and an orphan portfailure
A type-1 consistency mismatch suspends unsafe VLANs or members. Separately, a single-attached orphan on the secondary goes dark when members suspend unless orphan-port suspend converts that into a visible link failure.
NX1 and NX2 disagree on a type-1 parameter (for example STP mode). Consistency check suspends the affected VLANs or members on the secondary rather than forwarding with unsafe state. Access · vPC. Orphan device. NX1 · primary: STP mode rapid-pvst. NX2 · secondary: STP mode mst.
- Link
- Blocking
- Packet in flight
- Discarded
- Emphasis
Text equivalent of this diagram
| Element | Kind | State |
|---|---|---|
| Access · vPC | switch | — |
| Orphan device | host | — |
| NX1 · primary | switch | STP mode: rapid-pvst |
| NX2 · secondary | switch | STP mode: mst |
| Access · vPC — NX1 · primary | link | up |
| Access · vPC — NX2 · secondary | link | up |
| Orphan device — NX2 · secondary | link | up |
| NX1 · primary — NX2 · secondary | link | up |
NX1 and NX2 disagree on a type-1 parameter (for example STP mode). Consistency check suspends the affected VLANs or members on the secondary rather than forwarding with unsafe state.
Fix the mismatched parameter. Disabling the check keeps the symptom and the danger.
What changed
- NX1 · primary: STP mode → rapid-pvst
- NX2 · secondary: STP mode → mst
- Type-1 → suspend
Terms
- vPC peer-link
- The Cisco MLAG link between two peers. It is not a member of the downstream vPC. If it fails while keepalive is alive, the secondary suspends member ports.