VPC-Virtual Port Channel虛擬端口通道
VPC介紹:
vPC(Virtual Port-Channel)是Cisco Nexus系列交換機中的一個特性。
它支持一個跨機箱的二層Port-Channel。對於第三方設備來說(交換機或服務器)物理上是連接到了兩台交換機,但邏輯上是一台交換機。
主要是將連接不同設備鏈路匯聚成一條邏輯的鏈路。
支援NX-OS Nexus:N5K、N7K、N2K 。
*vPC只能用於L2,vPC端口介面不能運行在路由協議。
將兩台Nexus設備關聯到vpc domain,兩台設備透過兩條特殊鏈路實現信息交換。
VPC Peer Keepalive Link:虛擬通道對等體存活偵測。主要用途於Heartbit的模式運作,透過此一機制確保雙Core設備的存活,
以避免腦裂(Split-brain)或雙主(Dual Active)的情況發生。
VPC Peer Link:提供VPC對等體之間的資料交換,類似Stack連接上之間的資料交換。
其他名詞解釋
vPC peer – vpc交換機,成對出現。
vPC Domain : 虛擬通道網域,主要一個網路拓墣架構當中會有一個單一的定義號碼。
vPC Role:虛擬通道角色。一臺為主,主要可接收BPDU的角色,決定於role priority(角色權重)
vPC Link:下轄設備連入VPC對等體之連結
vPC member port – 组成vpc的一组端口(port-channel)
vPC VLAN –透過 vpc鏈路和peer-link承载的vlan.
non-vPC VLAN –不通过vpc承载的vlan
CFS – Cisco Fabric Services 協議,用於vpc peer之間狀態同步,配置驗證
設定
1.Feature 功能開啟
#feature vpc
2.設定VPC的VRF
#vrf context vpc-keepalive
3.設定keepalive
#int e 2/1-2
#no switchport
#description vpc-keepalive
#channel-group 50
#int port-channel 50
#description vpc-keepalive
#vrf member vpc-keepalive
#ip address 10.1.1.1 255.255.255.252
3.設定vpc domain
#vpc domain 1
#role priority 1000 (越小越優先)
#peer-keepalive destination 10.1.1.1 source 10.1.1.2 vrf vpc-keepalive
驗證:
測試聯通:# ping 10.1.1.2 vrf vpc-keepalive
# show vpc
Legend:
(*) - local vPC is down, forwarding via vPC peer-link
vPC domain id : 1
Peer status : peer link not configured
vPC keep-alive status : peer is alive
Configuration consistency status: failed
Configuration consistency reason: vPC peer-link does not exists
vPC role : none established
Number of vPCs configured : 0
Peer Gateway : Disabled
Dual-active excluded VLANs : -
可以看到keepalive已经OK,但vpc peer没有起来
4.設定peer-link
#int e2/3-4
#description peer-link
##channel-group 100
#no shutdown
#int port-channel 100
#switchport
#switchport mode trunk
#vpc peer-link
※Auto-recovery 預設是開啟的
驗證:
# show vpc
Legend:
(*) - local vPC is down, forwarding via vPC peer-link
vPC domain id : 1
Peer status : peer adjacency formed ok
vPC keep-alive status : peer is alive
Configuration consistency status: success
vPC role : secondary
Number of vPCs configured : 0
Peer Gateway : Disabled
Dual-active excluded VLANs : -
vPC Peer-link status
id Port Status Active vlans
1 Po100 up 1-20,99,100
5.將port-channel加入VPC
#int e 1/1
#channel-group mode active
#channel-group 1
#switchport
#switchport mode trunk
# vpc 1
#no shutdown
驗證:
# show vpc
Legend:
(*) - local vPC is down, forwarding via vPC peer-link
vPC domain id : 1
Peer status : peer adjacency formed ok
vPC keep-alive status : peer is alive
Configuration consistency status: success
vPC role : primary
Number of vPCs configured : 1
Peer Gateway : Disabled
Dual-active excluded VLANs : -
vPC Peer-link status
id Port Status Active vlans
1 Po100 up 1-20,99,100
vPC status
id Port Status Consistency Reason Active vlans
1 Po1 up success success 1-20,99,100