What is VPC?
VPC means Virtual PortChannel. It allows links that are physically connected to two different Cisco Nexus switches to appear as a single PortChannel to a third device. The third device can be a Fabric Extender or a switch, server, or any other networking device for that matter.
A VPC can provide Layer 2 multipathing, which allows you to create redundancy by increasing bandwidth, enabling multiple parallel paths between nodes and load-balancing traffic where alternative paths exist.
After you enable the VPC function, you create a peer keepalive link, which sends heartbeat messages between the two peer devices. This provides the VPC function with up-to-date information and status on the ports using it.
The VPC domain includes all of the following: peer devices, the VPC peer keepalive link, the VPC peer link, and all the Port Channels in the VPC domain. You can have only one VPC domain ID on each device. Therefore if you are in a multi-switch environment this needs to be planned properly before implementation.
So what is the key terminology and what does it mean
• VPC: Official explanation is the combined PortChannel between the VPC peer devices and the downstream device.
• VPC peer switch: The VPC peer switch is one of a pair of switches that are connected to the special PortChannel known as the VPC peer link. One device will be selected as the primary device, and the other will be the secondary device. You can find this out by the command show vpc role
• VPC peer link: The VPC peer link is the link used to synchronise states between the VPC peer devices. The VPC peer link carries control traffic between two VPC switches and also multicast, broadcast data traffic. This will be a trunk between your two devices. You should have at least two 10 Gigabit Ethernet interfaces for peer links.
• VPC domain: This domain includes both VPC peer devices, the VPC peer keepalive link, and all the PortChannels in the VPC connected to the downstream devices. It is also associated with the configuration mode that you must use to assign VPC global parameters.
• VPC peer keepalive link: The peer keepalive link monitors the vitality of a VPC peer switch. The peer keepalive link sends periodic keepalive messages between VPC peer devices. The VPC peer keepalive link can be a management interface or switched virtual interface (SVI). No data or synchronization traffic moves over the VPC peer keepalive link; the only traffic on this link is a message that indicates that the originating switch is operating and running VPC.
• VPC member port: VPC member ports are interfaces that belong to the VPC.
Now the theory is done. Let’s configure VPc
The configuration below is explained for each step on Nexus 1 and then straight configuration for Nexus 2.
Enable the vPC feature
Create a vPC domain and assign a domain ID
nexus1(config)# vpc domain 8
Configure the IPv4 address for the remote end of the vPC peer keepalive link.
nexus1(config-vpc-domain)#peer-keepalive destination 172.16.8.9
Select the PortChannel that you want to use as the vPC peer link for this device, and enter the interface configuration mode.
Configure the selected PortChannel as the vPC peer link.
nexus1(config)# interface port-channel 8
Name & configure the selected PortChannel as the vPC peer link.
nexus1(config-if)# description VPC-Peer
nexus1(config-if)# vpc peer-link
Add the interface to the PortChannel and then move the PortChannel to the vPC to connect to the downstream device. The vPC number ranges from 1 to 4096. The vPC number does not need to match the PortChannel number, but it must match the number of the vPC peer switch for that vPC bundle. A PortChannel is needed even if there is only one member interface for the PortChannel. When there is only one member for the PortChannel, the hardware PortChannel resource will not be created.
nexus1(config)#description VPC-PeerPort | e1/1-Nexus2
nexus1(config-if)# interface port-channel 8
nexus1(config-if)# vpc 8
nexus2(config)# vpc domain 8
nexus2(config-vpc-domain)#peer-keepalive destination 172.16.8.8
nexus2(config)# interface port-channel 8
nexus2(config-if)# description VPC-Peer
nexus2(config-if)# vpc peer-link
nexus2(config)#description VPC-PeerPort | e1/1-Nexus1
nexus2(config-if)# interface port-channel 8
nexus2(config-if)# vpc 8