Cisco Nexus系列(三)VPC
什么是vPC(virtual port channel)?
他是允许一个设备使用有两个上游设备的port channel,消除STP阻止端口,使用所有可用的上联带宽,提供一个无环的拓扑,在链路或者设备出现故障时,提供最快的收敛,提供链路级的冗余,确保高可用性,第三方设备可以是一个服务器,一个交换机或者任何网络设备,只要这些设备支持channel Group技术
A pair of vPC-enabled switches
一对vPC激活的交换机
A pair of vPC peers and associated vPC components
一对vPC对等体,和相关的vPC组件
Routed link carrying heartbeat packets for active-active detection
路由链路,承载心跳数据包,进行双Active的检测
在两个vPC对等体设备间,承载控制层面流量
在vPC对等体和有port-channel能力的下游设备之间的port channel
One of a set of ports that form a vPC
形成vPC的一系列端口中的一个
A device that is connected to a vPC peer using a non-vPC link
一个设备使用非vPC链路连接到一个vPC对等体
Port on a vPC peer that connects to an orphan device
一个vPC对等体连接一个Orphan设备的端口
A protocol used for state synchronization and configuration validation between vPC peer devices
在vPC对等体设备间,用于状态同步和配置确认的协议
在配置vPC之前需要先激活vPC特性
先配置Peer-keepalive链路,然后配置Peer-link链路,最后设置vPC domain
vPCs只支持二层port channel
必须手动配置两个vPC设备,配置不会从一个设备发送到另外一个设备上
检查在vPC Peer链路的两端,需要配置的参数是一致的
当配置vPCs时,可能会经历短暂的流量中断
推荐所有vPC的port channel使用LACP
CFS用于同步vPC的控制层面信息
— MAC address learning MAC地址学习
— IGMP snooping
— Configuration consistency checking 配置一致性检查
— vPC member port status vPC成员端口状态
— ARP cache ARP缓存
一个交换机被选举成为Primary,另外一端被选举为Secondary
— Role determines behavior during peer link failure
角色决定当Peer Link失效时的行为
— Primary switch is leading for STP on vPCs
Primary交换机主导在vPC中的STP
— Non-preemptive election
不支持抢占选举
For LACP and STP, vPC peers present themselves as a single switch to neighbor devices connected on a vPC
vPC对等体对于连接到vPC的邻居设备而言,表现为一个单一交换机
vPC Peer Link只承载如下流量
— vPC control traffic vPC控制层流量
— Flooded traffic (broadcast, multicast, unknown unicast) 泛洪流量
— Traffic for orphan ports(Orphan端口的流量)
— Non-vPC ports use regular MAC
address learning
普通交换机的MAC地址学习被替换为为vPC设计的基于CFS的MAC地址学习
从Peer Link进入vPC对等体的帧不会通过vPC成员端口转发
来至于Peer-Link的流量将会被标记,并且不允许从vPC成员端口发出
如果一端的vPC出现故障,Peer-Link可以作为备用链路来实现冗余
交换机A的vPC Peer Link失效
通过Peer-Keepalive链路检查远端vPC Peer B的状态
如果vPC Peer B是Up的,Secondary vPC B将会禁用所有的vPC端口,阻止环路,黑洞和泛洪流量
数据依然在port channel中剩余的Active链路上被发送
软件的学习一个vPC对等体设备的故障,当Keepalive信息没有通过Peer-Keepalive链路返回
当所有的Peer Link失效时,Keepalive信息用于确认对等体的状态,用来确认是peer link故障,还是peer设备故障
vPC与FHRP( First Hop Redundancy Protocol)
去往vPC的流量,如果可能将会被本地的vPC成员接口所转发)
FHRP的行为是被修改的,所有的FHRP路由器都会主动转发从vPC收到的流量
结果:流量如果可能避免使用Peer Link,这样创建了一个可扩展的解决方案,Peer Link的容量不需要随着vPC数量的增长而增长
配置聚合的vPC对等体为Primary STP root和Secondary STP root
— If the vPC peer-switch is implemented, both vPC peers will behave as a single STP root
如果使用vPC peer-switch技术,两个vPC对等体会扮演为一个STP root
应该通过调整让vPC Primary成为STP的Primary root,HSRP的Active Router和PIM的DR
桥接确保技术默认在vPC Peer Link上被激活
不要在vPC上激活Loop Guard和BA
在接主机vPC端口上激活STP端口类型“edge”或者“edge trunk”
全局激活 BPDU-Guard
如果接入交换机支持,应该禁用STP channel-misconfig技术
vPC Peer Switch特性介绍
不开启这功能,只有Primary设备发送BPDU,开启之后,将会把这一对设备呈现为一个STP Root,使用一个MAC地址,那么都可以发送BPDU了。 STP BPDU在所有vPC链路中被发送,避免由于下游设备的STP BPDU超时,造成的流量中断。
注意:要开启该特性,需要将priority设置为一致不能预先调整STP优先级
N7K-3(config)#no spanning-tree vlan 10 root primary
N7K-3(config)# vpc domain 7
N7K-3(config-vpc-domain)# peer-switch
N7K-4(config)#no spanning-tree vlan 10 root secondary
N7k-4(config)# vpc domain 7
N7k-4(config-vpc-domain)# peer-switch
配置命令:
N7K-3(config)# vpc domain 7
N7K-3(config-vpc-domain)# auto-recovery reload-delay 300
N7k-4(config)# vpc domain 7
N7k-4(config-vpc-domain)# auto-recovery reload-delay 300
当一个vPC重启并且恢复后,路由协议需要时间收敛 在三层连接重新建立之前,vPC将会成为接入层访问核心层的路由黑洞 当系统重启后,延时“n”秒激活vPC接口 配置命令:在Peer link建立之后,打开vPC的打开时间400s,SVI接口打开的时间400s,该时间设置不需要太大,比协议收敛时间多一些就好。
配置Relay Restore命令:
N7K-3(config)# vpc domain 7
N7K-3(config-vpc-domain)# delay restore 400
N7K-3(config-vpc-domain)# delay restore interface-vlan 400
N7k-4(config)# vpc domain 7
N7k-4(config-vpc-domain)# delay restore 400
N7K-4(config-vpc-domain)# delay restore interface-vlan 400
提供在故障切换环境下更加灵活的行为 跟踪vPC设备链路的状态 Peer Link和连接核心的接口能够使用布尔算法进行跟踪 vPC组件跟踪,挂起受影响设备的vPC,这样流量就可以被转移到剩余的vPC上去。
注意:vPC的Peer keepalive link应该是好的才行!
比较一下未使用该特性和使用该特性的情况:
配置命令:如果配置生效的话,当故障出现,角色变化如紫色部分字体。
配置Object Tracking
track 1 interface Ethernet4/20 line-protocol
track 2 interface Ethernet3/19 line-protocol
track 3 interface Ethernet3/20 line-protocol
track 66 list boolean or
object 1
object 2
object 3
vpc domain 7
track 66
该特性默认开启的! 提供三层流量的收敛时间 需要在两个vPC设备上同时激活此特性 当Peer link恢复时,通过CFSoE执行一个成块的ARP同步
配置命令:
N7K-3(config)# vpc domain 7
N7K-3(config-vpc-domain)# ip arp synchronize
N7k-4(config-if)# vpc domain 7
N7k-4(config-vpc-domain)# ip arp synchronize