Spanning Tree Protocol is not a good idea especially if we take into consideration data center. Wasting of bandwith by blocking links in environement which demands the highest throughput, is not desirable. Virtual Port Channel feature sorts it out in simple and clever way.
What VPC is for ?
VPc takes 2 links, virtually combine them in the way that for the device from access layer point of view two switches from distribution layer are visible as a one single device in single chassis! This solution eliminates Spanning Tree protocol because 2 links are considered as the one (there is no need to run STP on a single link).
Please have a look on the picture and let me clarify some terminology and rules regarding vPC
vPC peer link – is used to synchornize control plane between vPC peers (mac table, arp cache), uses Cisco Fabric Service over Ethernet -CFSoE protocol. Via vPC peer link, takes place picking up vPC primary and vPC secondary switch role. Despite switches are visible as a single chassis, in case of failure any of them, the second one takes over its role. Not used by data plane, requires 2×10 GB links at least
vPC peer keepalive link – Layer 3 heartbeat in control plane, uses to prevents 2 devices being elected as active. This link might be build with mgmt0 interface, SVI or L3 routed port.
vPC Member Ports – data plane port channel towards downstream neighbor, each vPC peer has at least one member port per vPC. From perspective of downstream neighbor upstream vPC peer are one switch (single chassis).
Orphan Device – Device that is conected only to one upstream vPC switchport, on vPC switch the port is called Orphan Port.
As you see, also server with ordinary NIC cards is connected to vPC domain, but ports on the server have to be set up in NIC teaming active/active mode. 2 switches have to be in the same domain, each switch may be only in one single domain at the same time ! VLANs on vPC member ports must be allowed on vPC peer link trunk.
If we don’t want STP being recalculated if one of the upstream switches got down then we have to set up priority to 0, and on both switches we run the command
vpc domain 1
peer-switch
It is not required but eleminates Spannig Tree Protocol entirely.
The goal of vPC is to hide redundant links from STP, loops are prevented via “vPC Check”. Frames received via vPC Peer link can not be flooded out a vPC Member Port.
Usefull commands to verify vPC
show vpc
show vpc consistency-parameters – shows consistency of 2 peers in various sections
show port-channel traffic
LAB
On downstream switches we just configure standard port channels and set up them as a trunks
SW N5K1
interface e1/7-8
channel-group 55 mode active
interface port-channel 55
switchport mode trunk
SW N5K2
interface e1/-8
channel-group 56 mode active
interface port-channel 56
switchport mode trunk
Firstly we have to create vpc domain, upstream switches are connected via mgmt0 interfaces, so you have to configure the link between switches within network 192.168.0.0/24. Then we configure trunk and port channel between upstream switches and finally we configure vPC downstream ports.
sw N7K1
feature vpc
vpc domain 1
peer-keepalive destination 192.168.0.1 source 192.168.0.2
interface e2/1 – 2
channel-group 1 mode active
switchport mode trunk
interface port-channel 1
vpc peer-link
interface e2/3
channel-group 55 mode active
interface port-channel 55
switchport mode trunk
vpc 55
interface e2/4
channel-group 55 mode active
interface port-channel 56
switchport mode trunk
vpc 56
sw N7K2
feature vpc
vpc domain 1
peer-keepalive destination 192.168.0.2 source 192.168.0.1
interface e2/1 – 2
channel-group 1 mode active
switchport mode trunk
interface port-channel 1
vpc peer-link
interface e2/3
channel-group 56 mode active
interface port-channel 56
switchport mode trunk
vpc 56
interface e2/4
channel-group 56 mode active
interface port-channel 55
switchport mode trunk
vpc 55