Virtual port channel (vPC) typically used for providing active-active connection from switch to end-point devices. However, due to it provide loop free design, we can configure one vPC domain on aggregation switches to other vPC domain on access switches while it providing more bandwidth for access switches to aggregation switches. This type of vPC called Double-Sided vPC or back-to-back vPC.

In this lesson, we will learn to configure Double-Sided vPC (back-to-back vPC). Before going into deep, if you need help on basic vPC configuration you can check out How to configure Cisco Nexus vPC. Now, let’s get started.

How to configure Double-Sided vPC - Back-to-back vPC in Cisco Nexus

Enabling Features:


First of all, let’s enable lacp and vpc features on all four nexus switches.

feature vpc
feature lacp

Keep-Alive Link


For keep-alive link, we are using management interfaces for all four switches. You can choose other interfaces as well. Point-to-point IP is 10.1.1.0/30 for N7K-01 and N7K-02.

N7K-01 Switch:
N7K-01(config)# interface mgmt 0
N7K-01(config-if)# description ***vPC Keep-Alive Link***
N7K-01(config-if)# ip address 10.1.1.1/30
N7K-01(config-if)# no shutdown

N7K-02 Switch:
N7K-02(config)# interface mgmt 0
N7K-02(config-if)# description ***vPC Keep-Alive Link***
N7K-02(config-if)# ip address 10.1.1.2/30
N7K-02(config-if)# no shutdown

Let’s verify the reachability from 10.1.1.1 to 10.1.1.2 IP.

N7K-01# ping 10.1.1.2 vrf management
PING 10.1.1.2 (10.1.1.2): 56 data bytes
64 bytes from 10.1.1.2: icmp_seq=1 ttl=254 time=0.688 ms
64 bytes from 10.1.1.2: icmp_seq=2 ttl=254 time=0.698 ms
64 bytes from 10.1.1.2: icmp_seq=3 ttl=254 time=0.568 ms
64 bytes from 10.1.1.2: icmp_seq=4 ttl=254 time=0.566 ms
64 bytes from 10.1.1.2: icmp_seq=5 ttl=254 time=0.583 ms

--- 10.1.1.2 ping statistics ---
5 packets transmitted, 5 packets received, 0.00% packet loss
round-trip min/avg/max = 0.566/0.698/0.6206 ms

For other peer of Nexus switches (N7K-03 and N7K-04), we are using 10.2.2.0/30 as keep-alive point-to-point IP.

N7K-03 Switch:
N7K-03(config)# interface mgmt 0
N7K-03(config-if)# description ***vPC Keep-Alive Link***
N7K-03(config-if)# ip address 10.2.2.1/30
N7K-03(config-if)# no shutdown

N7K-04 Switch:
N7K-04(config)# interface mgmt 0
N7K-04(config-if)# description ***vPC Keep-Alive Link***
N7K-04(config-if)# ip address 10.2.2.2/30
N7K-04(config-if)# no shutdown

Let’s verify the reachability from 10.2.2.1 to 10.2.2.2 IP.

N7K-03# ping 10.2.2.2 vrf management
PING 10.2.2.2 (10.2.2.2): 56 data bytes
36 bytes from 10.2.2.2: Destination Host Unreachable Request 0 timed out
64 bytes from 10.2.2.2: icmp_seq=1 ttl=254 time=1.098 ms
64 bytes from 10.2.2.2: icmp_seq=2 ttl=254 time=0.598 ms
64 bytes from 10.2.2.2: icmp_seq=3 ttl=254 time=0.536 ms
64 bytes from 10.2.2.2: icmp_seq=4 ttl=254 time=0.503 ms

--- 10.2.2.2 ping statistics ---
5 packets transmitted, 4 packets received, 20.00% packet loss
round-trip min/avg/max = 0.503/0.683/1.098 ms

vPC Domain:

For first peer of vPC, below are the domain configuration. We are making N7K-01 as primary and N7K-02 is secondary.

N7K-01(config)# vpc domain 20
N7K-01(config-vpc-domain)# role priority 100
N7K-01(config-vpc-domain)# peer-keepalive destination 10.1.1.2 source 10.1.1.1 vrf management

N7K-02(config)# vpc domain 20
N7K-02(config-vpc-domain)# role priority 200
N7K-02(config-vpc-domain)# peer-keepalive destination 10.1.1.1 source 10.1.1.2 vrf management

For second peer of vPC, we are choosing N7K-03 as primary and N7K-04 as secondary. Here note that, vPC domain id needed to be unique, which means you can not use this id anywhere else in your network.

N7K-03(config)# vpc domain 30
N7K-03(config-vpc-domain)# role priority 100
N7K-03(config-vpc-domain)# peer-keepalive destination 10.2.2.2 source 10.2.2.1 vrf management

N7K-04(config)# vpc domain 30
N7K-04(config-vpc-domain)# role priority 200
N7K-04(config-vpc-domain)# peer-keepalive destination 10.2.2.1 source 10.2.2.2 vrf management

Peer Link Configuration


For vPC peer-link, we are using same interfaces for simplicity in this example. So, configuration will be same for each peer of vPC.

N7K-01 to N7K-04:
interface ethernet 2/1-2
no shutdown 
description ***vPC PEER-LINK***
channel-group 20 mode active

interface port-channel 20
no shutdown
description ***vPC PEER-LINK***
switchport 
switchport mode trunk
switchport trunk allowed vlan all
vpc peer-link

In the next step, we need to configure member port for each vPC.

Member port Configuration

For vPC peer 1, we need to add below configuration.

interface ethernet 2/5-6
no shutdown 
description ***vPC Member Port***
channel-group 30 mode active 

interface port-channel 30
no shutdown 
switchport
switchport mode trunk
switchport trunk allowed vlan add all
vpc 30

For vPC peer 2, we need to add below configuration.

interface ethernet 2/5-6
no shutdown 
description ***vPC Member Port***
channel-group 40 mode active 

interface port-channel 40
no shutdown 
switchport
switchport mode trunk
switchport trunk allowed vlan add all
vpc 40

Verification:

Use “show vpc brief” command to check the VPC status.

N7K-01# show vpc brief
Legend:
                (*) - local vPC is down, forwarding via vPC peer-link

vPC domain id                          : 20
Peer status                       	: peer adjacency formed ok
vPC keep-alive status            : peer is alive
<-- Output Omitted --> 

For more information, you can check Cisco reference guide for vPC.

Written by Rajib Kumer Das

I am Rajib Kumer Das, a network engineer with 7+ years of experience in multi-vendor environment. In my current company, I am responsible to take care critical projects and it's support cases. I do have several vendor certificates and have plans to go further.

This article has 2 comments

  1. OLALEKAN SOBANKE Reply

    You are the Best brother fantastic, i actually have this setup but with extended 8 additional 5k in my two DR sites extending the VLANs across the WAN with fabric path such cool solutions for me to migrate my servers with the same ip from one location to another. The domain aspect is very important to me and i am keenly learning and reading more.

    Thanks so much for sharing, May God bless you

Leave a Comment

Your email address will not be published. Required fields are marked *