Data center · Lesson 4 of 4
vPC and VLANs: Peer-Link, Consistency and Orphan Ports
vPC lets two Nexus switches act as one for a connected device. But if their VLANs do not match, part of the traffic drops silently.
In a nutshell
In a vPC both switches must have the same VLANs and the peer-link must carry them. A difference in allowed VLANs suspends those VLANs on the vPC.
In this lesson
vPC in one minute
vPC (virtual Port Channel) joins two Nexus switches so that a third device (an access switch or a server) forms a single port-channel to both, with no STP blocking. The two Nexus switches communicate through:
- Peer-link: a trunk port-channel between them that carries vPC VLANs and synchronization.
- Peer-keepalive: a separate IP link (usually over the management network) that only checks the other one is alive.
VLANs and the peer-link
Every VLAN that exists on a vPC must be allowed on the peer-link. If a VLAN is on the vPC but not on the peer-link, traffic that arrives at the "wrong" switch cannot cross to the other one.
N9K-1(config)# interface port-channel1
N9K-1(config-if)# switchport mode trunk
N9K-1(config-if)# switchport trunk allowed vlan 10,20,30
N9K-1(config-if)# vpc peer-link
N9K-1(config)# interface port-channel10
N9K-1(config-if)# switchport mode trunk
N9K-1(config-if)# switchport trunk allowed vlan 10,20
N9K-1(config-if)# vpc 10
N9K-1# show vpc brief
N9K-1# show vpc consistency-parameters vpc 10
Consistency checks
| Type | Examples | What happens if they do not match |
|---|---|---|
| Type 1 | STP mode, MTU, port mode (access/trunk), speed | The vPC (or all of them) is suspended on the secondary. |
| Type 2 | Allowed VLANs, SVIs, ACLs | It keeps working with a warning; mismatched VLANs are suspended on that vPC. |
Very common real mistake
Adding VLAN 30 to vPC 10 only on N9K-1. The vPC stays up, but VLAN 30 is suspended on it and the servers in that VLAN have no network.
Orphan ports
An orphan port is a device connected to only one of the two Nexus switches in a vPC VLAN. If the peer-link fails, the secondary switch suspends its vPCs and its SVIs for those VLANs; an orphan device connected to the secondary can end up isolated.
Best practice
Connect servers to both Nexus switches with vPC, configure the same VLANs on both (or with config-sync) and use vpc orphan-port suspend on orphans that have another way out.
What you must remember
- The peer-link is a trunk that must carry every vPC VLAN.
- Type 1 (STP, MTU, mode): suspends the vPC. Type 2 (VLANs): suspends mismatched VLANs.
- Configure the same VLANs on both Nexus switches.
- Avoid orphan ports or plan what happens if the peer-link fails.
Check what you learned
4 exam-style questions. Some have one answer and others ask you to choose several. Answer them all to complete the lesson.