Configuring Back-to-Back vPCs on Cisco Nexus Switches

Author
Carole Warner Reece
Architect

Recently I was talking to one of my co-workers about connecting back-to-back virtual Portchannels (vPCs) from one pair of Nexus 7000s to another pair of  Nexus 7000s (or 5000s). For example, you might have a data center with lots of VLANs, and decide that while you are waiting for TRILL and before you implement FabricPath, you will minimize STP with vPCs. The back-to-back vPCs will give you a loopless design.

Cisco mentions back-to-back vPCs in the Cisco Data Center Interconnect Design and Implementation Guide

http://www.cisco.com/en/US/solutions/collateral/ns340/ns517/ns224/ns949/ns304/ns975/data_center_interconnect_design_guide.pdf
under the “2 Sites vPC-vPC Case Study”, and also calls them multi-layer vPCs in their recent configuration guides.

I decided put together a set of configurations on paper to see what they would look like on N7Ks. Here is the layout:

Back-to-Back vPCs on Cisco Nexus Switches

In my example, 7K-A & 7K-B are at the core layer, 7K-C and 7K-D are at the distribution or access layer. I used different PortChannel numbers mostly to show you could, and I thought it might help illustrate the different devices. I chose different interface numbers for the same reason.

Here are the slightly commented config fragments I put together:

. . .
hostname 7K-A
!
feature lacp
feature vpc
! enable the VLANs needed
vlan 1-50
!
! enable ports that will be used for peer link w/ 7K-B
interface ethernet 7/1-2
switchport
switchport mode trunk
switchport trunk allowed vlan 1-50
switchport trunk native vlan 6
channel-group 20 mode active
exit
!
! enable peer keepalive (in this case, use separate VRF)
vrf context pkal
interface ethernet 8/1
vrf member pkal
ip address 172.23.145.17/30
no shut
!
! configure VPC switch domain
vpc domain 1
peer-keepalive destination 172.23.145.18 source 172.23.145.17 vrf pkal
!
! configure the peer link
interface port-channel 20
vpc peer-link
exit
!
! Configure the interface for the port channel to 7K-C off of the vPC
interface ethernet 7/9
switchport
switchport mode trunk
switchport trunk allowed vlan 1-50
switchport trunk native vlan 6
channel-group 50 mode active
exit
interface port-channel 50
vpc 50
exit
!
. . .
hostname 7K-B

!
feature lacp
feature vpc
! enable the VLANs needed
vlan 1-50
!
! enable ports that will be used for peer link to 7K-A
interface ethernet 8/1-2
switchport
switchport mode trunk
switchport trunk allowed vlan 1-50
switchport trunk native vlan 6
channel-group 20 mode active
exit
!
! enable peer keepalive (in this case, use separate VRF)
vrf context pkal
interface ethernet 9/1
vrf member pkal
ip address 172.23.145.18/30
no shut
!
! configure VPC switch domain
vpc domain 1
peer-keepalive destination 172.23.145.17 source 172.23.145.18 vrf pkal
!
! configure the peer link
interface port-channel 20
vpc peer-link
exit
!
! Configure the interface for the port channel 7K-D off of the vPC.
interface ethernet 8/9
switchport
switchport mode trunk
switchport trunk allowed vlan 1-50
switchport trunk native vlan 6
channel-group 50 mode active
exit
interface port-channel 50
vpc 50
exit
. . .
!
. . .
hostname 7K-C
!
feature lacp
feature vpc
! enable the VLANs needed
vlan 1-50
!
! enable ports that will be used for peer link
interface ethernet 3/1-2
switchport
switchport mode trunk
switchport trunk allowed vlan 1-50
switchport trunk native vlan 6
channel-group 10 mode active
exit
!
! enable peer keepalive (in this case, use separate VRF)
vrf context pkal2
interface ethernet 4/1
vrf member pkal2
ip address 172.23.146.33/30
no shut
!
! configure VPC switch domain
! note the 7K-C / 7K-D vPC topology has a different Domain ID than the 7K-A / 7K-B vPC topology
vpc domain 3
peer-keepalive destination 172.23.146.34 source 172.23.146.33 vrf pkal2
!
! configure the peer link
interface port-channel 10
vpc peer-link
exit
!
! Configure the interface for the port channel to 7K-A off of the vPC.
interface ethernet 3/10
switchport
switchport mode trunk
switchport trunk allowed vlan 1-50
switchport trunk native vlan 6
channel-group 40 mode active
exit
interface port-channel 40
vpc 40
exit
. . .
!
. . .
hostname 7K-D
!
feature lacp
feature vpc
! enable the VLANs needed
vlan 1-50
!
! enable ports that will be used for peer link
interface ethernet 8/1-2
switchport
switchport mode trunk
switchport trunk allowed vlan 1-50
switchport trunk native vlan 6
channel-group 10 mode active
exit
!
! enable peer keepalive (in this case, use separate VRF)
vrf context pkal
interface ethernet 9/1
vrf member pkal2
ip address 172.23.146.34/30
no shut
!
! configure VPC switch domain

! note the 7K-C / 7K-D vPC topology has a different Domain ID than the 7K-A / 7K-B vPC topology
vpc domain 3
peer-keepalive destination 172.23.146.33 source 172.23.146.34 vrf pkal2
!
! configure the peer link
interface port-channel 10
vpc peer-link
exit
!
! Configure the interface for the port channel to the remote data center off of the vPC.
interface ethernet 8/9
switchport
switchport mode trunk
switchport trunk allowed vlan 1-50
switchport trunk native vlan 6
channel-group 40 mode active
exit
interface port-channel 40
vpc 40
exit
. . .
!

— cwr

_____________________________________________________________________________________________

If you would like some additional details, the following references should be helpful:

Configuring vPCs from Cisco Nexus 7000 Series NX-OS Interfaces Configuration Guide, Release 5.x

Virtual PortChannels: Building Networks without Spanning Tree Protocol