Virtual Port Channel (VPC) – Base Configuration

Overview:

In my last post, we talked about some differences between traditional port channels and virtual port channel found on the Nexus line of switches. If you have not seen it, make sure to check it out here. Now that you understand some differences, its time to jump into the required configuration.

Configuration:

There are a few main steps that need to be done to configure VPC. The first step is to enable the VPC feature. This is done with the following command and will need to be done on both switches.

 

NexusSwitch(config)#feature vpc

 

Once the feature has been enabled. Its time to create the VPC Domain. The commands are shown below. Replace xxx.xxx.xxx.xxx and yyy.yyy.yyy.yyy with the IP address of your switch. Each switch will have these addresses reversed as the source and destination will change.

 

NexusSwitch1(config)#vpc domain 1
NexusSwitch1(config-vpc-domain)#role priority 24576
NexusSwitch1(config-vpc-domain)#peer-keepalive destination xxx.xxx.xxx.xxx source yyy.yyy.yyy.yyy
NexusSwitch1(config-vpc-domain)#exit

 

NexusSwitch2(config)#vpc domain 1
NexusSwitch2(config-vpc-domain)#role priority 28672
NexusSwitch2(config-vpc-domain)#peer-keepalive destination yyy.yyy.yyy.yyy source xxx.xxx.xxx.xxx
NexusSwitch2(config-vpc-domain)#exit

 

The priority value should be different between both of your switches. I typically use the same values as STP. This is more of an OCD thing for me… There is absolutely no requirement to do this and remember that the switch with the lower value will become primary.

Once the domain has been created. Its time to create the peer-link. It can be done with the following commands:

 

NexusSwitch(config)#interface port-channel1
NexusSwitch(config-if)#description VPC Peer-Link
NexusSwitch(config-if)#switchport mode trunk
NexusSwitch(config-if)#spanning-tree port type network
NexusSwitch(config-if)vpc peer-link
NexusSwitch(config-if)#no shutdown
NexusSwitch(config-if)#exit

 

NexusSwitch(config)#interface ethernet1/31-32
NexusSwitch(config-if)#description VPC Peer-Link
NexusSwitch(config-if)#switchport
NexusSwitch(config-if)#switchport mode trunk
NexusSwitch(config-if)channel-group 1 mode active
NexusSwitch(config-if)#no shutdown
NexusSwitch(config-if)#exit

 

This configuration needs to be identical on both switches. Any variation (outside of the description and interface number) can cause a consistency failure and the VPC to not be established.

 

The next and final step is to configure the Keepalive. You can use any interface for the keepalive including the MGMT0 Interface. Be aware that if you use the Management interface you will have to specify the Management VRF on the peer-keepalive command within the VPC domain.

 

NexusSwitch1(config)#interface ethernet1/30
NexusSwitch1(config-if)#description VPC Keep-Alive
NexusSwitch1(config-if)# ip address yyy.yyy.yyy.yyy/yy
NexusSwitch1(config-if)#no shutdown
NexusSwitch1(config-if)#exit

 

NexusSwitch2(config)#interface ethernet1/30
NexusSwitch2(config-if)#description VPC Keep-Alive
NexusSwitch2(config-if)# ip address xxx.xxx.xxx.xxx/xx
NexusSwitch2(config-if)#no shutdown
NexusSwitch2(config-if)#exit

 

You do have the ability and it is recommended to configure the KeepAlive with a port channel. This will give you redundancy if a cable or port ever fails. In the event, you want to use a different VRF for the keep-alive link you can do so with the following configuration. Remember to add that VRF to the keep-alive command within the VPC domain.

 

NexusSwitch(config)#vrf context KEEPALIVE
NexusSwitch(config-vrf)#exit
NexusSwitch(config)#interface ethernet1/30
NexusSwitch(config-if)#description VPC Keep-Alive
NexusSwitch(config-if)#vrf member KEEPALIVE
NexusSwitch(config-if)# ip address xxx.xxx.xxx.xxx/xx
NexusSwitch(config-if)#no shutdown
NexusSwitch(config-if)#exit

 

This configuration should get you up and running and allow you to create virtual port channels. In the next post, we will go over some additional configuration you can add to the VPC Domain like the peer-switch command to manipulate and improve STP convergence.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s