Cisco Nexus系列(三)VPC
- vpc
什么是vPC(virtual port channel)?
他是允许一个设备使用有两个上游设备的port channel,消除STP阻止端口,使用所有可用的上联带宽,提供一个无环的拓扑,在链路或者设备出现故障时,提供最快的收敛,提供链路级的冗余,确保高可用性,第三方设备可以是一个服务器,一个交换机或者任何网络设备,只要这些设备支持channel Group技术
- STP vs vPC区别
- 可以在现有的架构上使用vPC创建无环的网络
- 最多32路Port-Channel(Double-Sided vPC)
- 多层vPC能够加入一个有8个active成员端口的port-channel到一个16路的port-channel中。
- vPC对等体的负载均衡方式是由这个对等体设备本地判断的。
- 在M系列模块中,每一个vPC对等体只有8个active链路,两个vPC对等体加在一起一共提供16路active的负载均衡的链路。
- F系列模块,支持16路active的port-channel,因此提供一个32路的vPC
- 术语
- vPC Peers:
A pair of vPC-enabled switches
一对vPC激活的交换机
- vPC Domain:
A pair of vPC peers and associated vPC components
一对vPC对等体,和相关的vPC组件
- vPC Peer Keepalive Link:
Routed link carrying heartbeat packets for active-active detection
路由链路,承载心跳数据包,进行双Active的检测
- vPC Peer Link: Carries control traffic between vPC peer devices
在两个vPC对等体设备间,承载控制层面流量
- vPC: Combined port channel between the vPC peers and a port channel-capable downstream device
在vPC对等体和有port-channel能力的下游设备之间的port channel
- vPC Member Port:
One of a set of ports that form a vPC
形成vPC的一系列端口中的一个
- Orphan Device:
A device that is connected to a vPC peer using a non-vPC link
一个设备使用非vPC链路连接到一个vPC对等体
- Orphan Port:
Port on a vPC peer that connects to an orphan device
一个vPC对等体连接一个Orphan设备的端口
- Cisco Fabric Services:
A protocol used for state synchronization and configuration validation between vPC peer devices
在vPC对等体设备间,用于状态同步和配置确认的协议
- 最佳实践原则
- You must enable vPCs before you can configure them.
在配置vPC之前需要先激活vPC特性
- You must configure the peer-keepalive link then peer-link in order to set up the vPC domain.
先配置Peer-keepalive链路,然后配置Peer-link链路,最后设置vPC domain
- Only Layer 2 port channels can be in vPCs.
vPCs只支持二层port channel
- You must configure both vPC peer devices; the configuration is not sent from one device to the other.
必须手动配置两个vPC设备,配置不会从一个设备发送到另外一个设备上
- Check that the necessary configuration parameters are consistent on both sides of the vPC peer link.
检查在vPC Peer链路的两端,需要配置的参数是一致的
- You may experience minimal traffic disruption while configuring vPCs.
当配置vPCs时,可能会经历短暂的流量中断
- It is recommended to configure all the port channels in the vPC using LACP with the interfaces in active mode.
推荐所有vPC的port channel使用LACP
- vPC与N7K模块设计图
- vPC 控制层面操作
- Cisco Fabric Services is used to synchronize vPC control plane information:
CFS用于同步vPC的控制层面信息
— MAC address learning MAC地址学习
— IGMP snooping
— Configuration consistency checking 配置一致性检查
— vPC member port status vPC成员端口状态
— ARP cache ARP缓存
- One switch is elected primary, the other secondary
一个交换机被选举成为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数据层面操作
- The vPC peer link carries the following traffic only:
vPC Peer Link只承载如下流量
— vPC control traffic vPC控制层流量
— Flooded traffic (broadcast, multicast, unknown unicast) 泛洪流量
— Traffic for orphan ports(Orphan端口的流量)
- Regular switch MAC address learning is replaced with Cisco Fabric Services-based MAC address learning for vPCs
— Non-vPC ports use regular MAC
address learning
普通交换机的MAC地址学习被替换为为vPC设计的基于CFS的MAC地址学习
- Frames that enter a vPC peer switch from the peer link cannot exit the switch on a vPC member port
从Peer Link进入vPC对等体的帧不会通过vPC成员端口转发
- 数据层防环 (vPC Check)
来至于Peer-Link的流量将会被标记,并且不允许从vPC成员端口发出
如果一端的vPC出现故障,Peer-Link可以作为备用链路来实现冗余
- vPC Peer Link Device Failure
- The switch A vPC peer link fails.
交换机A的vPC Peer Link失效
- The software checks the status of the remote vPC peer B using the peer-keepalive link.
通过Peer-Keepalive链路检查远端vPC Peer B的状态
- If the vPC peer B is up, the secondary vPC B disables all vPC ports on its device to prevent loops and blackholing or flooding traffic.
如果vPC Peer B是Up的,Secondary vPC B将会禁用所有的vPC端口,阻止环路,黑洞和泛洪流量
- The data then forwards down the remaining active links of the port channel.
数据依然在port channel中剩余的Active链路上被发送
- vPC Peer Failure — Peer-keepalive Link
- The software learns of a vPC peer device failure when the keepalive messages are not returned over the peer-keepalive link.
软件的学习一个vPC对等体设备的故障,当Keepalive信息没有通过Peer-Keepalive链路返回
- You use a separate link (vPC peerkeepalive link) to send configurable keepalive messages between the vPC peer devices. The keepalive messages on the vPC peer keepalive link determine whether a failure is on the vPC peer link only or on the vPC peer device. The keepalive messages are used only when all the links in the peer link fail.
当所有的Peer Link失效时,Keepalive信息用于确认对等体的状态,用来确认是peer link故障,还是peer设备故障
- 推荐设计
vPC与FHRP( First Hop Redundancy Protocol)
- Traffic Destination for a vPC is forwarded on a local vPC member port whenever possible
去往vPC的流量,如果可能将会被本地的vPC成员接口所转发)
- FHRP behavior is modified,All FHRP routers actively forward traffic received from a vPC
FHRP的行为是被修改的,所有的FHRP路由器都会主动转发从vPC收到的流量
- Result: Traffic avoids peer link if possible, which creates a scalable solution,Peer link capacity does not need to scale linearly with the number of vPCs
结果:流量如果可能避免使用Peer Link,这样创建了一个可扩展的解决方案,Peer Link的容量不需要随着vPC数量的增长而增长
- Spanning Tree推荐设计
- Configure aggregation vPC peers as root and secondary root
配置聚合的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
- Align STP primary root, HSRP active router, and PIM DR with vPC primary peer
应该通过调整让vPC Primary成为STP的Primary root,HSRP的Active Router和PIM的DR
- BA is enabled by default on vPC peer link
桥接确保技术默认在vPC Peer Link上被激活
- Do not enable Loop Guard and BA on vPC (disabled by default)
不要在vPC上激活Loop Guard和BA
- Enable STP port type “edge” and port type “edge trunk” on host ports
在接主机vPC端口上激活STP端口类型“edge”或者“edge trunk”
- Enable STP BPDU-guard globally
全局激活 BPDU-Guard
- Disable STP channel-misconfig guard if supported by access switches
如果接入交换机支持,应该禁用STP channel-misconfig技术
vPC Peer Switch特性介绍
- 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
- 配置特性之前
- 配置特性之后
- Autorecovery特性
- 该特性默认开启。 如果两个vPC交换机同时重启。默认在两个vPC设备的邻接关系建立起来之前,所有的vPC都将被挂起。 如果仅仅只有一个vPC设备可以工作,本地的vPC成员端口依然处于挂起状态。 一旦启动Autorecovery技术,重启后如果Peer link处于“down”的状态并且持续默认的超时时间240秒,软件会重新初始化vPC,并且激活本地端口。
配置命令:
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
- 查看Autorecovery特性
- Delay Restore
当一个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 Object Tracking特性
提供在故障切换环境下更加灵活的行为 跟踪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
- ARP同步
该特性默认开启的! 提供三层流量的收敛时间 需要在两个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
内容来源网络,如有侵权,联系删除,本文地址:https://www.230890.com/zhan/86977.html