CiscoVPC学习笔记
- 格式:docx
- 大小:39.83 KB
- 文档页数:8
VPC学习笔记(包含配置)_vpc
话题:vpc
Virtual Port Channels
用途:扩展port-channel,将连接不同设备链路汇聚成一条逻辑的链路。(个人理解)
支持设备:N5K、N7K、N2K
优势:
设备级别冗余,收敛速度比STP快(无STP)去除了STP BLOCK端口,提供无环路网络更好的带宽利用(线路能负载均衡)
注意:VPC只能用于二层,VPC端口不能运行路由协议。
实现方式:将2个nexus设备关联到VPC domain。两台设备通过2条特殊链路实现信息交换:
vPC peer-keepalive link:心跳链路,确保两台VPC设备在线。避险A/A或者split-brain情况导致VPC拓扑环路。VPC端口可以是1G或者10G端口
vPC peer link:VPC邻居之间交换状态信息,提供而外的机制发现和防止split-brain情况
split-brain是什么?
关于peer-keepalive端口
MGT可以作为vPC peer-keepalive link接口。在N7K上如果引擎切换或者在线服务升级(ISSU)管理端口会改变,导致keepalive中断。如果使用MGT口,保证所有MGT口接入到网管交换机。可以使用数据接口的port-channel接口提高更高级别的冗余。
配置:
1、开启VPC特性
Congo(config)# feature vpc
Egypt(config)# feature vpc
2、创建用于VPC的VRF
创建VRF
Congo(config-if)# vrf context vpc-keepalive
Egypt(config)# vrf context vpc-keepalive
3、创建VPC keeplive链路
Congo(config)# int ethernet 2/47
Congo(config-if)#no switchport
Congo(config-if)# vrf member vpc-keepalive
Congo(config-if)# ip address 1.1.1.1 255.255.255.252 Egypt(config)# interface ethernet 2/48
Egypt(config-if)# no switchport
Egypt(config-if)# vrf member vpc-keepalive
Egypt(config-if)# ip address 1.1.1.2 255.255.255.252测试连通性:Congo# ping 1.1.1.2 vrf vpc-keepalive 查看:
Congo# sho 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、建立VPC-domain
Congo(config)# vpc domain 1
Congo(config-vpc-domain)# peer-keepalive destination 1.1.1.2 source1.1.1.1 vrf vpc-keepalive Egypt(config)# vpc domain 1
Egypt(config-vpc-domain)# peer-keepalive destination 1.1.1.1 source1.1.1.2 vrf vpc-keepalive 5、配置VPC peer链路(NEXUS交换机互联)
必须使用10G端口,并且指定速率。
配置port-channel 100(省略)
Congo(config)# interface port-channel 100
Congo(config)#switchport mode trunk
Congo(config)# interface port-channel 100
Congo(config-if)# vpc peer-link
Egypt(config)# interface port-channel 100
Egypt(config)#switchport mode trunk
Egypt(config)# interface port-channel 100
Egypt(config-if)# vpc peer-link
配置后STP端口类型从network变为vPC peer-,STPBridge Assurance将会开启,并且不能被关闭。验证:
Egypt# 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,100
如果Configuration consistency status状态为any,可以通过下面命令检查具体不一致的信息
Congo# show vpc consistency-parameters global