vPC(virtual PortChannel,虛擬鏈路聚合)是Cisco Nexus系列交換機中的一個特性。它支持一個跨機箱的二層Port-Channel。
對於第三方設備來說(交換機或服務器)物理上是連接到了兩台交換機,但邏輯上是一台交換機。
vPC的優勢:
1.消除STP阻塞端口;
2.使用所有可用的鏈路帶寬;
3.允許服務器雙主上連;
4.當鏈路或設備失效后提供了快速的收斂;
5.為服務器提供了雙active的網關;
VPC術語
vPC Peer:啟用vPC的交換機被稱為vPC的 Peer。
vPC domain:兩台啟用vPC的交換機所有的邏輯域
vPC Peer Keepalive Link:Peer Keepalive link是一個三層鏈路,用於在Peer-link失效后檢測vPC Peer是否存活。
vPC Peer Link:用於傳輸vPC控制層面的流量 ,包括同步mac地址表、vpc成員信息、IGMP信息。
Orphan Port:孤立端口,沒有加入vpc的端口。
vPC Member Port:加入vpc的端口,是一個Port-Channel接口。
VPC防環
vPC執行一個數據層面的防環來代替控制層面的STP。vPC peer-link被使用在兩台vPC設備之間同步mac地址、vPC成員狀態信息和IGMP。從vPC member port進來的流量,穿越vpc peer-link之后,不會再被允許從任何vPC Member port發出,但可以從其實接口(L3 Port或孤立端口轉發)。vPC基於這樣的機制來進行防環。
在Nexus01上配置如下:
Nexus01: Nexus01#config t Nexus01(config)# feature vpc //全局開啟vpc功能 Nexus01(config)# vpc domain 1 Nexus01(config-vpc-domain)# peer-keepalive destination 10.10.10.11 source 10.10.10.10//指定peer的源和目標 Nexus01(config)#interface ethernet 1/31-32//這兩個物理口加入channel 10 Nexus01(config-if-range)#switch mode trunk Nexus01(config-if-range)# channel-group 10 mode active Nexus01(config-if-range)#interface port-channel 10 Nexus01(config-if)# vpc peer-link //port-channel 10指定為peer鏈路 Nexus01(config)#interface ethernet 1/1//這兩個物理口加入channel 100 Nexus01(config-if)# switchport mode trunk Nexus01(config-if)# channel-group 100 mode active Nexus01(config)#interface port-channel 100 Nexus01(config-if)# vpc 100//channel 100加入vpc100
在Nexus02上配置如下:
Nexus02#config t Nexus02(config)# feature vpc Nexus02(config)# Nexus02(config)# vpc domain 1 Nexus02(config-vpc-domain)# peer-keepalive destination 10.10.10.10 source 10.10.10.11 Nexus02(config)# interface ethernet 1/31-32 Nexus02(config-if-range)# switch mode trunk Nexus02(config-if-range)# channel-group 10 mode active Nexus02(config-if-range)# interface port-channel 10 Nexus02(config-if)# vpc peer-link Nexus02(config)# interface ethernet 1/1 Nexus02(config-if)# switchport mode trunk Nexus02(config-if)# channel-group 100 mode active Nexus02(config)# interface port-channel 100 Nexus02(config-if)# vpc 100