关于VSS的双活检测.docx
《关于VSS的双活检测.docx》由会员分享,可在线阅读,更多相关《关于VSS的双活检测.docx(15页珍藏版)》请在冰豆网上搜索。
![关于VSS的双活检测.docx](https://file1.bdocx.com/fileroot1/2023-1/4/a0e0c3e1-9585-45db-904a-025a3e8e3b2d/a0e0c3e1-9585-45db-904a-025a3e8e3b2d1.gif)
关于VSS的双活检测
VSS技术
2011-09-2913:
50:
50
标签:
VSSSSONSFMECdual-activeSTPHSRPPagpLACP
VSS设计与配置
一,VSS技术介绍
VSS称为虚拟交换技术,它的功能是将多台ciscocatalyst6500交换机虚拟成单台交换机,VSS使用机箱间NSF/SSO作为两台机箱间的主要高可用性机制,当一个虚拟交换机成员发生故障时,网络中无需进行协议重收敛。
一个虚拟交换机成员机箱将作为主用虚拟交换机成员,另一成员将处于控制面板的热等待状态。
请注意,这两个机箱的数据面板均可用,因此总流量转发能力为1440Gbps。
当一个虚拟交换机成员发生故障时,网络中无需进行协议重收敛,接入层或核心层交换机继续转发流量,因为它们只会检测出EtherChannel捆绑中有一个链路故障,所以不需要重收敛任何协议,通过VSS传输的流量不会发生任何中断。
在传统模式中,一台交换机发生故障就会导致STP、HSRP和路由协议等多个控制协议进行收敛,与之相比,交换机故障时VSS机制远要出色得多。
多机箱EtherChannel(MEC)是一种L2多路径技术。
这类EtherChannel形式允许相连节点在构成VSS的两个物理CiscoCatalyst6500系列交换机间端接EtherChannel,从而创建简单的无环路L2拓扑结构。
在VSS拓扑结构中使用MEC,能使所有链路激活,并同时在不采用生成树协议的情况下,提供高度可用的拓扑结构。
二,VSS设计
默认情况下,2个VSS机箱的引擎之间的冗余机制是NSF/SSO,NSF/SSO支持状态信息和配置同步。
另外,2个VSS机箱的引擎之间只有运行在NSF/SSO模式下,备份机箱引擎的PFC卡,SwitchFabric卡和线路卡及其DFC才能是活动状态。
若主备机箱的信息不匹配(如主备机箱引擎的IOS版本不一致),则2个VSS机箱的引擎之间的冗余机制是RPR,运行在RPR模式下,只有配置能够同步,但备用机箱引擎的PFC卡,SwitchFabric卡和线路卡及其DFC卡都是非活动状态。
在2个VSS机箱之间通过RoleResolutionProtocol(RRP)协商每个VSS机箱的角色 (activeorstandby)后,会执行acrosstheVSLswitches配置的一致性以确保正确的SL操作,如下是配置一致性需要检查的条目:
另外,在NSF/SSO模式下,IOS的版本及其补丁和PFC运行模式需要一致,PFC的模式可以通过命令更改。
三,VSS基本配置
步骤一:
定义VSSdomainID&switchID
StandaloneSwitch1:
SW1#configt
SW1(config)#switchvirtualdomain10
SW1(config-vs-domain)#switch1
StandaloneSwitch2:
SW2#configt
SW2(config)#switchvirtualdomain10
SW2(config-vs-domain)#switch2
步骤二:
ConfigurePrioritySettings(Optional)
高优先级交换机,成为active,低优先级的交换机成为standby。
若优先级一样,则SwitchID小的为active,switchID大的为standby。
StandaloneSwitch1:
SW1(config-vs-domain)#switch1priority110
SW1(config-vs-domain)#switch2priority100
StandaloneSwitch2:
SW2(config-vs-domain)#switch1priority110
SW2(config-vs-domain)#switch2priority100
步骤三:
ConfiguretheVirtualSwitchLink(VSL)
VSL是一个有特殊用途的EthernetChannel链路,包含一个或多个(最多8个)物理端口。
VSL作用有二:
1、其中只选择一个物理成员接口作为控制链路,承载机箱之间的系统控制信息
2、这其余的物理成员接口承载网络控制信息,当必要时也可以承载普通数据流量
StandaloneSwitch1:
SW1#configt
SW1(config)#interfaceport-channel1
SW1(config-if)#noshut
SW1(config-if)#switchvirtuallink1
SW1(config-if)#intrangeTen5/4-5
SW1(config-if-range)#channel-group1modeon
StandaloneSwitch2:
SW2#configt
SW2(config)#interfaceport-channel2
SW2(config-if)#noshut
SW2(config-if)#switchvirtuallink2
SW2(config-if)#intrangeTen5/4–5
SW2(config-if-range)#channel-group2modeon
SinceVSLEtherChannelusesLMPpermemberlink,thelink-aggregationprotocols,suchasPAgPandLACP,arenotrequired;eachmemberlinkmustbeconfiguredinunconditionalEtherChannelmodeusingthechannel-groupgroup-numbermodeoncommand.
步骤4:
ExecutingtheConversion
执行转换进程,在特权模式下执行switchconvertmodevirtual命令,这样做将转换端口名称为3元素形式----“interface-typeswitch-number/slot/port”,然后保存配置,重启设备。
重启设备的作用:
1)2个配置合并为1个配置
2)为端口重新编号----从slot/port到switch-number/slot/port
3)只有重启设备,才能通过NSF/SSO协商A/S角色
StandaloneSwitch1:
SW1#convertmodevirtual
Thiscommandwillconvertallinterfacenames
tonamingconvention"interface-typeswitch-number/slot/port",
savetherunningconfigtostartup-configand
reloadtheswitch.
Doyouwanttoproceed?
[yes/no]:
yes
Convertinginterfacenames
Buildingconfiguration...
StandaloneSwitch2:
SW2#switchconvertmodevirtual
Thiscommandwillconvertallinterfacenames
tonamingconvention"interface-typeswitch-number/slot/port",
savetherunningconfigtostartup-configand
reloadtheswitch.
Doyouwanttoproceed?
[yes/no]:
yes
Convertinginterfacenames
Buildingconfiguration...
步骤5:
CompletingtheConversion
最后一步需要在ActiveVirtualSwitch上执行“switchacceptmodevirtual”命令自动配置StandbyVirtualSwitch
VSSActiveVirtualSwitch:
VSS#switchacceptmodevirtual
Doyouwanttoproceed?
[yes/no]:
yes
MergingthestandbyVSLconfiguration…
Buildingconfiguration...
[OK]
或者在Switch1(Active)上重新配置Switch2的VSL
VSSActiveVirtualSwitch:
vss-sw1(config)#interfaceport-channel2
vss-sw1(config-if)#noshut
vss-sw1(config-if)#switchvirtuallink2
vss-sw1(config)#interfaceten2/5/4
vss-sw1(config-if)#channel-group2modeon
vss-sw1(config)#interfaceten2/5/5
vss-sw1(config-if)#channel-group2modeon
到此已经把两台独立的物理6500s配置成VSS,这是给新的VSS配置一个Hostname,然后保存配置。
VSSActiveVirtualSwitch:
vss-sw1#conft
Enterconfigurationcommands,oneperline.EndwithCNTL/Z.
vss-sw1(config)#hostnameSW65VSS
SW65VSS(config)#^Z
SW65VSS#
00:
13:
40:
%SYS-5-CONFIG_I:
Configuredfromconsolebyconsole
SW65VSS#wr
Buildingconfiguration...
00:
16:
23:
%PFINIT-SP-5-CONFIG_SYNC:
Sync'ingthestartupconfigurationtothestandbyRouter.
[OK]
SW65VSS#
VSS状态检查
VSSActiveVirtualSwitch:
SW65VSS#shswitchvirtual
Switchmode:
VirtualSwitch
Localswitchnumber:
1
Localswitchoperationalrole:
VirtualSwitchActive
Peerswitchnumber:
2
Peerswitchoperationalrole:
VirtualSwitchStandby
SW65VSS#shswitchvirtuallink
VSLStatus:
UP
VSLUptime:
18:
36:
43UTCApr62007
VSLSCPPing:
Pass
VSLICCPing:
Pass
VSLControlLink:
Te1/5/4
SW65VSS#shswitchvirtualrole
VSS—Multi-ChassisEtherChannel
PAgPConfigurationandMonitoring
配置连接到接入交换机3560使用PAgP的Trunk类型的EtherChannel,建议对MEC链路运行TrunkDesirable-Desirable。
VSSActiveVirtualSwitch:
interfacerangeGigabitEthernet1/3/1 ----InterfaceonVSS-SW1
descriptionAccessSwitchFacingInterface
switchport
switchporttrunkencapsulationdot1q
switchportmodedynamicdesirable----Trunkmoddynamicanddesirable
switchporttrunkallowedvlan8,9----OnlyallowneedVLANsforagiventrunk
loggingeventlink-status----Loggingforlinkstatus
loggingeventtrunk-status----Loggingfortrunkstatus
loggingeventbundle-status----Loggingforport-channelstatus
channel-protocolpagp
channel-group202modedesirable----DefinePort-channel,PAgPmodedesirable
VSSActiveVirtualSwitch:
interfaceGigabitEthernet2/3/1 ----InterfaceonVSS-SW2
descriptionAccessSwitchFacingInterface
switchport
switchporttrunkencapsulationdot1q
switchportmodedynamicdesirable----Trunkmoddynamicanddesirable
switchporttrunkallowedvlan8,9----OnlyallowneedVLANsforagiventrunk
loggingeventlink-status----Loggingforlinkstatus
loggingeventtrunk-status----Loggingfortrunkstatus
loggingeventbundle-status----Loggingforport-channelstatus
channel-protocolpagp
channel-group202modedesirable
interfacePort-channel202----Automaticallycreatedbydefiningatinterfaces
descriptionAccessSwitchMEC
switchport
switchporttrunkencapsulationdot1q
switchporttrunkallowedvlan8,9
loggingeventlink-status
loggingeventspanning-treestatus----STPloggingenabledonport-channel
LACPConfigurationandMonitoring
配置连接到服务器使用LACP的Trunk类型的EtherChannel,同时使能STPportfast
VSSActiveVirtualSwitch:
interfacerangeGigabitEthernet1/4/40,GigabitEthernet2/4/40
descriptionServerFacingInterface
noshut
switchport
loggingeventlink-status----Loggingforlinkstatus
loggingeventbundle-status----Loggingforport-channelstatus
channel-protocollacp
channel-group100modeactive----DefinePort-channel,lacpmodeactive
interfacePort-channel100----Automaticallycreatedbydefiningatinterfaces
descriptionAccessSwitchMEC
switchport
spanning-treeportfast
四、VSS双活检测设计&配置
VSSDual-ActiveSupervisors
VSL链路丢失和恢复:
如果VSL出现故障,则备用机箱无法确定活动机箱的状态。
为了确保发生切换而不出现延迟,备用机箱假设活动机箱已发生故障,并启动切换来接管活动角色。
如果原始活动机箱仍运行正常,则两个机箱此时均处于活动状态。
此情形称为双活动情形。
双活动情形会对网络稳定性产生不利影响,因为两个机箱均会使用相同的IP地址、SSH密钥和STP网桥ID。
虚拟交换系统(VSS)必须检测双活动情形,并执行恢复操作。
VSS支持增强的PAgP、IP双向转发检测(BFD)和dual-activefast-hello三种方法,以便检测双活动情形。
建议:
如有可能,请同时启用基于ePAgP和直接心跳链路的VSLPFastHello方法。
Fast-HelloConfigurationandMonitoring
VSSActiveVirtualSwitch:
SW65VSS#switchvirtualdomain10
SW65VSS(config-vs-domain)#dual-activedetectionfast-hello
SW65VSS(config)#intgi1/4/48
SW65VSS(config-if)#dual-activefast-hello
SW65VSS(config-if)#intgi2/4/48
SW65VSS(config-if)#dual-activefast-hello
%VSDA-SW2_SPSTBY-5-LINK_UP:
InterfaceGi1/5/1isnowdual-activedetectioncapable
%VSDA-SW1_SP-5-LINK_UP:
InterfaceGi2/5/1isnowdual-activedetectioncapable
SW65VSS#showswitchvirtualdual-activefast-hello
SW65VSS#remotecommandstandby-rpshowswitchvirtualdual-activefast-hello
ePAgPConfigurationandMonitoring
VSSActiveVirtualSwitch:
SW65VSS(config)#switchvirtualdomain10
SW65VSS(config-vs-domain)#dual-activedetectionpagptrustchannel-group205
SW65VSS#showswitchvirtualdual-activepagp
PAgPdual-activedetectionenabled:
Yes
PAgPdual-activeversion:
1.1
!
<>
NeighborswitchthatsupportsenhancedPAgP:
S3560#showpagpdual-active
PAgPdual-activedetectionenabled:
Yes
PAgPdual-activeversion:
1.1
Dual-ActiveDetection-ExcludeInterfaces
一旦检测到双活情况,原先Active交换机将会禁用其上面的所有端口以确保不影响其余网络的正常工作,然而,对于用于管理用途的端口等,我们并不希望他们也被禁用,因为管理端口被禁用后就不能远程管理该交换机。
SW65VSS#conft
Enterconfigurationcommands,oneperline. EndwithCNTL/Z.
SW65VSS(config)#)#switchvirtualdomain10
SW65VSS(config-vs-domain)#dual-activeexcludeinterfaceGig1/5/1
SW65VSS(config-vs-domain)#dual-activeexcludeinterfaceGig2/5/1
SW65VSS(config-vs-domain)#^Z
SW65VSS#
双活的3种方式详细介绍