Monday, December 3, 2012

Basic Cisco Nexus 5548 N5K Switch vPC config


As per below setup, have an example of the vPC configuration:

Topology:

N5K-1=PO1=N5K-2
1/3-4               1/3-4
   \\                  //
    \\             //
          server

Interfaces portchannel 1 interfaces of the example: ethernet 1/1-2  on each N5K.


Configuration example dual-homed:
Step 1. Configure the management interface IP address.
N5k-1(config)# int mgmt 0
N5k-1(config-if)# ip address 192.168.1.1
N5k-1(config-if)# vrf context management

Step 2. Enable vPC and LACP.
N5k-1(config)# feature vpc
N5k-1(config)# feature lacp

Step 3. Create the vPC domain.
N5k-1(config)# vpc domain 1
Step 4. Configure the vPC role priority (optional).
N5k-1(config-vpc-domain)# role priority 1000
Note: The role priority on N5K2 is going to be 2000 (secondary role)

Step 6. Configure the peer keepalive link.
N5k-1(config-vpc-domain)# peer-keepalive destination 192.168.1.2
The management interface IP address for Cisco Nexus 5000 Series Switch 2 is 192.168.1.2
Note: Do same but on N5K-1

Step 7. Configure the vPC peer link. Note that, as for a regular interswitch trunk, trunking must be turned on for the VLANs to which the vPC member port belongs.
Interfaces portchannel 1 interfaces of the example: ethernet 1/1-2
N5k-1(config-if-range)# int po1
N5k-1(config-if)# vpc peer-link
N5k-1(config-if)# switchport mode trunk

N5k-1(config-vpc-domain)# int ethernet 1/1-2
N5k-1(config-if)# switchport mode trunk
N5k-1(config-if-range)# channel-group 1 mode active

Note do the same but on switch N5K-2.

Step 8. Configuration for the vPC:

Host with two 10Gig NIC connected e1/3-4 each on N5K switch's.(20 Gig speed on port channel)
N5k-1(config-fex)# int e1/3-4
N5k-1(config-if)# switchport mode access
N5k-1(config-if)#vpc 100
N5k-1(config-if-range)# channel-group 100 mode active

N5k-1(config-if-range)# int po100
N5k-1(config-if)# switchport mode access
N5k-1(config-if)#
========================================

 Examples of host - LAN Switch

N5k-1(config-fex)# int eth1/5
N5k-1(config-if)# switchport mode access
N5k-1(config-if)# switchport acess vlan 377
N5k-1(config-if-range)# channel-group 105 mode active

N5k-1(config-if-range)# int po105
N5k-1(config-if)# switchport mode access
N5k-1(config-if)# switchport acess vlan 377
N5k-1(config-if)# vpc 105
N5k-1(config-if)#



========================================
Trunk - Switch or Host
N5k-1(config-fex)# int eth1/23
N5k-1(config-if)# switchport mode trunk
N5k-1(config-if)# switchport trunk allow vlan 377, 378
N5k-1(config-if-range)# channel-group 123 mode active

N5k-1(config-if-range)# int po123
N5k-1(config-if)# switchport mode trunk
N5k-1(config-if)# switchport trunk allow vlan 377, 378
N5k-1(config-if)# vpc 123
Trunk - Switch or Host
N5k-1(config-fex)# int eth1/24
N5k-1(config-if)# switchport mode trunk
N5k-1(config-if)# switchport trunk allow vlan 377, 378
N5k-1(config-if-range)# channel-group 124 mode active

N5k-1(config-if-range)# int po124
N5k-1(config-if)# switchport mode trunk
N5k-1(config-if)# switchport trunk allow vlan 377, 378
N5k-1(config-if)# vpc 124
========================================


Note: Repeat the same step on N5K-2.

If you have any questions please let me know.

Regards,
Srikanth Kasula