VSS设计与配置
一,VSS 技术介绍
VSS称为虚拟交换技术,它的功能是将多台cisco catalyst 6500交换机虚拟成单台交换机,VSS使用机箱间NSF/SSO作为两台机箱间的主要高可用性机制,当一个虚拟交换机成员发生故障时,网络中无需进行协议重收敛。一个虚拟交换机成员机箱将作为主用虚拟交换机成员,另一成员将处于控制面板的热等待状态。请注意,这两个机箱的数据面板均可用,因此总流量转发能力为1440Gbps。
当一个虚拟交换机成员发生故障时,网络中无需进行协议重收敛,接入层或核心层交换机继续转发流量,因为它们只会检测出EtherChannel捆绑中有一个链路故障,所以不需要重收敛任何协议,通过VSS传输的流量不会发生任何中断。在传统模式中,一台交换机发生故障就会导致STP、HSRP和路由协议等多个控制协议进行收敛,与之相比,交换机故障时VSS机制远要出色得多。
多机箱EtherChannel(MEC)是一种L2多路径技术。这类EtherChannel形式允许相连节点在构成VSS的两个物理Cisco Catalyst 6500系列交换机间端接EtherChannel,从而创建简单的无环路L2拓扑结构。
在VSS拓扑结构中使用MEC,能使所有链路激活,并同时在不采用生成树协议的情况下,提供高度可用的拓扑结构。
 
二,VSS 设计
 
 
 
 
        默认情况下,2个VSS机箱的引擎之间的冗余机制是NSF/SSO,NSF/SSO支持状态信息和配置同步。另外, 2个VSS机箱的引擎之间只有运行在NSF/SSO模式下,备份机箱引擎的PFC卡,SwitchFabric卡和线路卡及其DFC才能是活动状态。
若主备机箱的信息不匹配(如主备机箱引擎的IOS版本不一致),则2个VSS机箱的引擎之间的冗余机制是RPR,运行在RPR模式下,只有配置能够同步,但备用机箱引擎的PFC卡,Switch Fabric卡和线路卡及其DFC卡都是非活动状态。
在2个VSS机箱之间通过 Role Resolution Protocol (RRP) 协商每个VSS机箱的角色 (active or standby)后,会执行across the VSL switches 配置的一致性以确保正确的SL操作,如下是配置一致性需要检查的条目:
另外,在NSF/SSO模式下,IOS的版本及其补丁和PFC运行模式需要一致,PFC的模式可以通过命令更改。
 
三, VSS 基本配置
 
步骤一:定义 VSS domain ID&switch ID
Standalone Switch 1:
SW1# config t
SW1(config)# switch virtual domain 10
SW1(config-vs-domain)# switch 1
 
Standalone Switch 2:
SW2# config t
SW2(config)# switch virtual domain 10
SW2(config-vs-domain)# switch 2
 
步骤二: Configure Priority Settings (Optional)
  高优先级交换机,成为 active ,低优先级的交换机成为 standby 。若优先级一样,则 Switch ID 小的为 active switch ID 大的为 standby
Standalone Switch 1:
SW1(config-vs-domain)# switch 1 priority 110
SW1(config-vs-domain)# switch 2 priority 100
 
Standalone Switch 2:
SW2(config-vs-domain)# switch 1 priority 110
SW2(config-vs-domain)# switch 2 priority 100
 
步骤三: Configure the Virtual Switch Link (VSL)
VSL 是一个有特殊用途的 EthernetChannel 链路,包含一个或多个(最多 8 个)物理端口。 VSL 作用有二:
1、其中只选择一个物理成员接口作为控制链路,承载机箱之间的系统控制信息
2、这其余的物理成员接口承载网络控制信息,当必要时也可以承载普通数据流量
 
Standalone Switch 1:
SW1# config t
SW1(config)# interface port-channel 1
SW1(config-if)#no shut
SW1(config-if)#switch virtual link 1
SW1(config-if)#int range Ten5/4 - 5
SW1(config-if-range)#channel-group 1 mode on
 
Standalone Switch 2:
SW2# config t
SW2(config)# interface port-channel 2
SW2(config-if)#no shut
SW2(config-if)#switch virtual link 2
SW2(config-if)#int range Ten5/4 – 5
SW2(config-if-range)#channel-group 2 mode on
 
Since VSL EtherChannel uses LMP per member link, the link-aggregation protocols, such as PAgP and LACP, are not required; each member link must be configured in unconditional EtherChannel mode using the channel-group group-number mode on command.
 
步骤 4 Executing the Conversion
执行转换进程,在特权模式下执行 switch convert mode virtual 命令,这样做将转换端口名称为 3 元素形式 ----“interface-type switch-number/slot/port” ,然后保存配置,重启设备。重启设备的作用:
1)2个配置合并为1个配置
2)为端口重新编号----从slot/port到switch-number/slot/port
3)只有重启设备,才能通过NSF/SSO协商A/S角色
 
Standalone Switch 1:
SW1# convert mode virtual
This command will convert all interface names
to naming convention "interface-type switch-number/slot/port",
save the running config to startup-config and
reload the switch.
Do you want to proceed? [yes/no]: yes
Converting interface names
Building configuration...
 
Standalone Switch 2:
SW2# switch convert mode virtual
This command will convert all interface names
to naming convention "interface-type switch-number/slot/port",
save the running config to startup-config and
reload the switch.
Do you want to proceed? [yes/no]: yes
Converting interface names
Building configuration...
 
步骤 5 Completing the Conversion
最后一步需要在 Active Virtual Switch 上执行 “switch accept mode virtual” 命令自动配置 Standby Virtual Switch
 
 
VSS Active Virtual Switch :
VSS# switch accept mode virtual
Do you want to proceed? [yes/no]: yes
Merging the standby VSL configuration…
Building configuration...
[OK]
 
或者在 Switch 1 Active )上重新配置 Switch 2 VSL
VSS Active Virtual Switch :
vss-sw1(config)#interface port-channel 2
vss-sw1(config-if)#no shut
vss-sw1(config-if)#switch virtual link 2
vss-sw1(config)#interface ten 2/5/4
vss-sw1(config-if)#channel-group 2 mode on
vss-sw1(config)#interface ten 2/5/5
vss-sw1(config-if)#channel-group 2 mode on
 
到此已经把两台独立的物理 6500s 配置成 VSS ,这是给新的 VSS 配置一个 Hostname ,然后保存配置。
VSS Active Virtual Switch :
vss-sw1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
vss-sw1(config)#hostname SW65VSS
SW65VSS(config)#^Z
SW65VSS#
00:13:40: %SYS-5-CONFIG_I: Configured from console by console
SW65VSS#wr
Building configuration...
00:16:23: %PFINIT-SP-5-CONFIG_SYNC: Sync'ing the startup configuration to the standby Router.
[OK]
SW65VSS#
 
VSS 状态检查
VSS Active Virtual Switch :
SW65VSS#sh switch virtual
Switch mode : Virtual Switch
Local switch number : 1
Local switch operational role: Virtual Switch Active
Peer switch number : 2
Peer switch operational role : Virtual Switch Standby
SW65VSS#sh switch virtual link
VSL Status : UP
VSL Uptime : 18:36:43 UTC Apr 6 2007
VSL SCP Ping : Pass
VSL ICC Ping : Pass
VSL Control Link : Te1/5/4
SW65VSS#sh switch virtual role
 
VSS Multi-Chassis EtherChannel
PAgP Configuration and Monitoring
配置连接到接入交换机3560使用PAgP的Trunk类型的EtherChannel,建议对 MEC 链路运行 Trunk Desirable-Desirable 。
VSS Active Virtual Switch :
interface range GigabitEthernet1/3/1 ----Interface on VSS-SW1
description Access Switch Facing Interface
switchport
switchport trunk encapsulation dot1q
switchport mode dynamic desirable ----Trunk mod dynamic and desirable
switchport trunk allowed vlan 8,9 ----Only allow need VLANs for a given trunk
logging event link-status ----Logging for link status
logging event trunk-status ----Logging for trunk status
logging event bundle-status ----Logging for port-channel status
channel-protocol pagp
channel-group 202 mode desirable ----Define Port-channel, PAgP mode desirable
 
VSS Active Virtual Switch :
interface GigabitEthernet 2/3/1 ----Interface on VSS-SW2
description Access Switch Facing Interface
switchport
switchport trunk encapsulation dot1q
switchport mode dynamic desirable ----Trunk mod dynamic and desirable
switchport trunk allowed vlan 8,9 ----Only allow need VLANs for a given trunk
logging event link-status ----Logging for link status
logging event trunk-status ----Logging for trunk status
logging event bundle-status ----Logging for port-channel status
channel-protocol pagp
channel-group 202 mode desirable
interface Port-channel202 ----Automatically created by defining at interfaces
description Access Switch MEC
switchport
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 8,9
logging event link-status
logging event spanning-tree status ----STP logging enabled on port-channel
 
 
 
LACP Configuration and Monitoring
配置连接到服务器使用LACP的Trunk类型的EtherChannel,同时使能STP portfast
VSS Active Virtual Switch :
interface range GigabitEthernet1/4/40 ,GigabitEthernet2/4/40
description Server Facing Interface
no shut
switchport 
logging event link-status ----Logging for link status
logging event bundle-status ----Logging for port-channel status
channel-protocol lacp
channel-group 100 mode active ----Define Port-channel, lacp mode active
interface Port-channel100 ----Automatically created by defining at interfaces
description Access Switch MEC
switchport
spanning-tree portfast
 
四、 VSS 双活检测设计 & 配置
VSS Dual-Active Supervisors
VSL 链路丢失和恢复:如果 VSL 出现故障,则备用机箱无法确定活动机箱的状态。 为了确保发生切换而不出现延迟,备用机箱假设活动机箱已发生故障,并启动切换来接管活动角色。
如果原始活动机箱仍运行正常,则两个机箱此时均处于活动状态。 此情形称为双活动情形。 双活动情形会对网络稳定性产生不利影响,因为两个机箱均会使用相同的 IP 地址、SSH 密钥和 STP 网桥 ID。 虚拟交换系统 (VSS) 必须检测双活动情形,并执行恢复操作。VSS支持增强的 PAgP、 IP 双向转发检测 (BFD)和dual-active fast-hello三种方法,以便检测双活动情形。建议:如有可能,请同时启用基于 ePAgP 和直接心跳链路的 VSLP Fast Hello 方法。
Fast-Hello Configuration and Monitoring
VSS Active Virtual Switch :
SW65VSS# switch virtual domain 10
SW65VSS(config-vs-domain)# dual-active detection fast-hello
SW65VSS(config)# int gi1/4/48
SW65VSS(config-if)# dual-active fast-hello
SW65VSS(config-if)# int gi2/4/48
SW65VSS(config-if)# dual-active fast-hello
%VSDA-SW2_SPSTBY-5-LINK_UP: Interface Gi1/5/1 is now dual-active detection capable
%VSDA-SW1_SP-5-LINK_UP: Interface Gi2/5/1 is now dual-active detection capable
 
SW65VSS# show switch virtual dual-active fast-hello
SW65VSS# remote command standby-rp show switch virtual dual-active fast-hello
 
ePAgP Configuration and Monitoring
VSS Active Virtual Switch :
SW65VSS(config)# switch virtual domain 10
SW65VSS(config-vs-domain)# dual-active detection pagp trust channel-group 205
SW65VSS# show switch virtual dual-active pagp
PAgP dual-active detection enabled: Yes
PAgP dual-active version: 1.1
! << Snip >>
 
Neighbor switch that supports enhanced PAgP:
S3560# show pagp dual-active
PAgP dual-active detection enabled: Yes
PAgP dual-active version: 1.1
 
 
 
Dual-Active Detection - Exclude Interfaces
一旦检测到双活情况,原先Active交换机将会禁用其上面的所有端口以确保不影响其余网络的正常工作,然而,对于用于管理用途的端口等,我们并不希望他们也被禁用,因为管理端口被禁用后就不能远程管理该交换机。
SW65VSS#conf t
Enter configuration commands, one per line. End with CNTL/Z.
SW65VSS(config)#)#switch virtual domain 10
SW65VSS(config-vs-domain)#dual-active exclude interface Gig 1/5/1
SW65VSS(config-vs-domain)#dual-active exclude interface Gig 2/5/1
SW65VSS(config-vs-domain)# ^Z
SW65VSS#