Setup a VPC correctly on Cisco Nexus Switches with Fabricpath
By Vince
VPC: Virtual Port Channel - this is a port channel that instead of connecting multiple ports only on one switch, you are spreading it over two physical switches. This give more redundancy in most cases.
it can be a bit tricky to setup, so here is a config that I have used which seem to work great. The keep alive is done with the management port, and the peer-link is a leaf to leaf (in a fabricpath network) or switch to switch direct link. The peer-link needs to be a port channel. The keep-alive should be put into its own VRF (virtual route and forwarding), which means it can’t share the routing table with anyone else. This will prevent false keep-alives being routed where they shouldn’t. The management port has one by default which makes it easy, and a side benefit of not needing a layer 3 license for vlan interfaces.
interface mgmt0
vrf member management
ip address x.x.x.x/24
vrf context management
ip route 0/0 x.x.x.x
feature vpc
!
!Leaf 1:
!Destination is the other switch's management IP, source is yours
!the role is modified only on one leaf
vpc domain 1
peer-keepalive destination 1.1.1.2 source 1.1.1.1 vrf management
auto-recovery
role priority 1
system-priority 1
delay restore 450
peer-gateway
fabricpath switch-id 10
!!Must say yes after this, only needed if fabricpath back-end
!
!Leaf peer link ports (use more than 1)
int x/x-x
channel-group 1 mode active
int po1
vpc peer-link
!
!!
!Leaf 2:
vpc domain 1
peer-keepalive destination 1.1.1.1 source 1.1.1.2 vrf management
auto-recovery
role priority 100
system-priority 1
peer-gateway
fabricpath switch-id 10
!!Must say yes after this, only needed if fabricpath back-end
!
!Leaf peer link ports (use more than 1)
int x/x-x
channel-group 1 mode active
int po1
vpc peer-link
!
!
Validation:
show vpc
!make sure the peer link and keepalives are OK, if either is down make sure you can ping and all the interfaces are up properly
!
!
!Once you have the peer link and keep-alive setup, its time to configure the ports
!Example VPC port configuration - BOTH switches, trunk not needed but usually setup for UCS chassis
!port connected to your end host, typically name the vpc the same as the port channel for convenience
int ex/x
channel-group 1001 mode active
!
interface port-channel1001
switchport mode trunk !optional
switchport trunk allowed vlan xxx !optional
vpc 1001
!