XX医院核心设备(cisco的65系列)的VSS配置
cisco交换机默认的工作模式是单机模式而非VSS模式,可以使用命令show switch virtual 查看,需要改成VSS模式。
1,在核心交换机上配置Etherchannel(使用tenGigabitEthernet 5/4 - 5
这两端口)
 switch-1(config)#interface range tenGigabitEthernet 5/4 - 5
 switch-1(config-if-range)#channel-group 10 mode on
 switch-1(config-if-range)#no shutdown
注: 在双核心相连的交换上做etherchannel为vsl做准备
2,配置VSS域名与VSS主机号:
switch-1(config)#switch virtual domain 100
 Domain ID 100 config will take effect only
 after the exec command 'switch convert mode virtual' is issued
 ?
 switch-1(config-vs-domain)#switch 1
 switch-1(config-vs-domain)#switch 1 priority 200
 switch-1(config-vs-domain)#switch 1 preempt
 Please note that Preempt configuration will make the ACTIVE switch with
 lower priority to reload forcefully when preempt timer expires
 ?
 switch-1(config-vs-domain)#exit
注::配置VSS的域名为100,范围为1-255,两台交换机必须相同;配置VSS的主机号码为1,必须一台为1,另一台为2;并配置VSS优先级为200,默认为100,数字越大,优先级越高,便能成为主VSS交换机。
3,配置VSL链路:
switch-1(config)#interface port-channel 10
 switch-1(config-if)#switch virtual link 1
 switch-1(config-if)#no shutdown
 switch-1(config-if)#exit
注:将两台交换机互连的EtherChannel配置为VSL。
配置完后查看交换机的VSS角色:switch-1#show switch virtual role,此地交换机的角色为active状态,即既有控制权限的主交换机
查看当前交换机的VSL链路状态:switch-1#show switch virtual link ,因为还没有配置第二台交换机,所以本地交换机当前的VSL链路状态为DOWN。
查看交换机当前的SSO状态:switch-1#show redundancy states
注:本地交换机的SSO状态为Active,由于对端交换机并未配置,所以不能看到对端peer状态。
 
4,下面配置第二个核心交换机:
switch-2(config)#int range tenGigabitEthernet 5/4 - 5
 switch-2(config-if-range)#channel-group 20 mode on
 switch-2(config-if-range)#no shutdown
switch-2(config-if-range)#exit
注:将核心交换机65-2上与65-1相连的接口TenGigabitEthernet5/4和TenGigabitEthernet5/5配置为EtherChannel,为配置VSL作准备,请注意双方的EtherChannel号码不要配置相同。
switch-2(config)#switch virtual domain 100
 Domain ID 100 config will take effect only
 after the exec command 'switch convert mode virtual' is issued
 ?
 switch-2(config-vs-domain)#switch 2
 switch-2(config-vs-domain)#switch 2 preempt
 Please note that Preempt configuration will make the ACTIVE switch with lower priority to reload forcefully when preempt timer expires
 ?
 switch-2(config-vs-domain)#exit
 注:配置VSS的域名为100,范围为1-255,两台交换机必须相同;配置VSS的主机号码为2,必须一台为1,另一台为2。
switch-2(config)#int port-channel 20
 switch-2(config-if)#switch virtual link 2
 switch-2(config-if)#no shutdown
 switch-2(config-if)#exi
 switch-2(config)#exi
注:将两台交换机互连的EtherChannel配置为VSL。
注:由于两台核心交换机之间配置了VSS,所以两台交换机的配置信息将合并为一台,65-1之前的接口GigabitEthernet1/2现在变为GigabitEthernet1/1/2,之前的接口GigabitEthernet2/3现在变为GigabitEthernet1/2/3,之前的接口TenGigabitEthernet5/4现在变为TenGigabitEthernet1/5/4,而65-2之前的接口GigabitEthernet1/2现在变为GigabitEthernet2/1/2,之前的接口GigabitEthernet2/3现在变为GigabitEthernet2/2/3,之前的接口TenGigabitEthernet5/4现在变为TenGigabitEthernet2/5/4;除此之外,最重要的就是之前双方都配置好的EtherChannel,现在只剩Active交换机65-1的TenGigabitEthernet1/5/4和TenGigabitEthernet1/5/5还正常存在,而Standby交换机65-2的EtherChannel配置在经过VSS合并之后被清空,所以必须手工添加交换机65-2上应有的EtherChannel配置和VSL配置,否则双方的VSL将不能正常工作,那么VSS也就不能正常工作。
5,手工添加交换机65-2上应有的EtherChannel配置和VSL配置:
switch-1(config)#int range tenGigabitEthernet 2/5/4 - 5
 switch-1(config-if-range)#channel-group 20 mode on
 switch-1(config-if-range)#no shutdown
 % Range command terminated because it failed on TenGigabitEthernet2/5/4
 switch-1(config-if-range)#exit
 00:10:36: %EC-5-STAYDOWN: Te2/5/4 will remain down as its port-channel Po20 is admin-down
 switch-1(config)#
 switch-1(config)#int port-channel 20?
 switch-1(config-if)#switch virtual link 2
 switch-1(config-if)#no shutdown
注:虽然是配置65-2的EtherChannel和VSL,但还是在VSS的Active交换机上配置的,因为65-2工作在Standby状态,是不能进入enable进行配置和管理的。
再次查看交换机65-1的工作模式:
 switch-1#show switch virtual
 Switch mode                  : Virtual Switch
 Virtual switch domain number : 100
 Local switch number          : 1
 Local switch operational role: Virtual Switch Active
 Peer switch number           : 2
 Peer switch operational role : Virtual Switch Standby
 Conversion completed         : No
 Perform exec command 'switch accept mode virtual' to complete the VSS conversion
 switch-1#
 注:交换机65-1当前工作在VSS模式,并显示域名为100,本地交换机号码为1,本地交换机的角色为Active,即具有控制权限的主交换机,而对端交换机号码为2,并且对端交换机角色为Standby。
 
配置Multichassis EtherChannel (MEC)
配置VSS核心交换机与接入交换机2960之间的Multichassis EtherChannel (MEC)。
1.配置Multichassis EtherChannel (MEC)
 (1)在VSS核心交换机上配置Multichassis EtherChannel (MEC):
 switch-1(config)#interface gigabitEthernet 1/1/1 , g2/1/1
 switch-1(config-if-range)#switchport
 switch-1(config-if-range)#no shutdown
 % Range command terminated because it failed on TenGigabitEthernet5/4
switch-1(config-if-range)#channel-group 100 mode desirable
 switch-1(config-if-range)#exit
 ?
 switch-1(config)#interface port-channel 100
 switch-1(config-if)#switchport mode access
 switch-1(config-if)#switchport access vlan 100
 switch-1(config-if)#no shutdown
 switch-1(config-if)#exit
 注:在VSS核心交换机上将连接接入交换机2960的两个光接口gigabitEthernet 1/1/1和gigabitEthernet 2/1/1配置为Multichassis EtherChannel (MEC),并且配置为2层access接口,然后划入VLAN 100中。
 (2)在接入交换机2960上配置普通EtherChannel:
 2960(config)#interface gigabitEthernet 0/21 - 22
 2960(config-if-range)#no shutdown
 2960(config-if-range)#channel-group 1 mode desirable
 2960(config-if-range)#exit
 ?
 2960(config)#interface port-channel 1
 2960(config-if)#switchport mode access
 2960(config-if)#switchport access vlan 100
 2960(config-if)#exit
 注:在接入交换机2960上将连接VSS核心交换机两个光接口gigabitEthernet 0/21和gigabitEthernet 0/22配置为普通EtherChannel即可,并且划入VLAN 100中。
2.测试交换机之间的EtherChannel连通性
 (1)在VSS核心交换机上创建SVI接口,并配置IP地址:
 switch-1(config)#int vlan 100
 switch-1(config-if)#ip add 100.1.1.1 255.255.255.0
 switch-1(config-if)#no shutdown
 说明:在VSS核心交换机上创建与2960之间的SVI接口,以作测试。
 ?
 (2)在接入交换机2960上创建SVI接口,并配置IP地址:
 2960(config)#int vlan 100
 2960(config-if)#ip add 100.1.1.2 255.255.255.0
 2960(config-if)#no shutdown
 说明:在接入交换机2960上创建与VSS核心交换机之间的SVI接口,以作测试。
 ?
 (3)测试VSS核心交换机与2960之间的连通性:
 switch-1#ping 100.1.1.2
 ?
 Type escape sequence to abort.
 Sending 5, 100-byte ICMP Echos to 100.1.1.2, timeout is 2 seconds:
 !!!!!
 Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
 switch-1#
 说明:VSS核心交换机与2960之间的通信正常。
 ?
 (4)测试2960与VSS核心交换机之间的连通性:
 2960#ping 100.1.1.1
 ?
 Type escape sequence to abort.
 Sending 5, 100-byte ICMP Echos to 100.1.1.1, timeout is 2 seconds:
 !!!!!
 Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
 2960#
 说明:2960与VSS核心交换机之间的通信正常。
 ?
 注:当VSS中Active交换机出现故障之后,Standby交换机在接替Active工作时,接入交换机与核心交换机之间的通信可能出现毫秒级的中断,如果使用ICMP作ping测试,会出现1个丢包,也有时会不丢包,因为中断是毫秒级的。
在配置完VSS时,只有正常的ACtive的交换机的Etherchannel存在。而合并后的standby交换机的Etherchannel被清空
所以必须手工添加交换机65-2上应有的EtherChannel配置和VSL配置,否则双方的VSL将不能正常工作,那么VSS也就不能正常工作。