初始配置 en conf t no ip domain lookup line con 0 login exec-timeout 0 30 logging synchronous exit username et password et6f enable secret et6f hostname 6F-CORE-SW (2)将核心交换机 6F-CORE-SW01上与 6F-CORE-SW02相连的接口TenGigabitEthernet5/4和TenGigabitEthernet5/5配置为EtherChannel: 6F-CORE-SW01(config)#interface range tenGigabitEthernet 5/4 - 5 6F-CORE-SW01(config-if-range)#channel-group 1 mode on 6F-CORE-SW01(config-if-range)#no shutdown % Range command terminated because it failed on TenGigabitEthernet5/4 6F-CORE-SW01(config-if-range)#exit 说明:将核心交换机 6F-CORE-SW01上与 6F-CORE-SW02相连的接口TenGigabitEthernet5/4和TenGigabitEthernet5/5配置为EtherChannel,为配置VSL作准备。 (3)配置VSS域名与VSS主机号: 6F-CORE-SW01(config)#switch virtual domain 100 Domain ID 100 config will take effect only after the exec command 'switch convert mode virtual' is issued 6F-CORE-SW01(config-vs-domain)#switch 1 6F-CORE-SW01(config-vs-domain)#switch 1 priority 200 6F-CORE-SW01(config-vs-domain)#exit 说明:这里没有配置抢占,因为找不到抢占这个命令(因为active交换几只是在控制层面起作用,实际的数据还是各自进行转发所以哪台做active无所谓)配置VSS的域名为100,范围为1-255,两台交换机必须相同;配置VSS的主机号码为1,必须一台为1,另一台为2;并配置VSS优先级为200,默认为100,数字越大,优先级越高,便能成为主VSS交换机。 (4)配置VSL链路: 6F-CORE-SW01(config)#interface port-channel 1 6F-CORE-SW01(config-if)#switch virtual link 1 6F-CORE-SW01(config-if)#no shutdown 6F-CORE-SW01(config-if)#exit 6F-CORE-SW01(config)#exit 说明:将两台交换机互连的EtherChannel配置为VSL。 (5)将交换机的工作模式改为VSS模式(确定之后,交换机将自动重启): 6F-CORE-SW01#write Building configuration... [OK] 6F-CORE-SW01# 6F-CORE-SW01#switch convert mode virtual (6)查看当前交换机的工作模式: 6F-CORE-SW01#show switch virtual Switch mode : Virtual Switch Virtual switch domain number : 100 Local switch number : 1 Local switch operational role: Virtual Switch Active 6F-CORE-SW01# 说明:交换机当前已经工作在VSS模式,并显示域名为100,本地交换机号码为1,本地交换机的角色为Active,即具有控制权限的主交换机。 (7)查看当前交换机的VSS角色: 6F-CORE-SW01#show switch virtual role Switch Switch Status Preempt Priority Role Session ID Number Oper(Conf) Oper(Conf) Local Remote ------------------------------------------------------------------ LOCAL 1 UP TRUE (Y*) 200(200) ACTIVE 0 0 Active configured preempt timer(switch 1): 5 minutes In dual-active recovery mode: No 6F-CORE-SW01# 说明:本地交换机的角色为Active,即具有控制权限的主交换机。 (8)查看当前交换机的VSL链路状态: 6F-CORE-SW01#show switch virtual link VSL Status : DOWN VSL Uptime : - VSL SCP Ping : - VSL ICC Ping : - VSL Control Link : - 6F-CORE-SW01# 说明:因为还没有配置第二台交换机,所以本地交换机当前的VSL链路状态为DOWN。 二:配置核心交换机SW02 en conf t no ip domain lookup line con 0 exec-timeout 0 0 logging synchronous exit username et password et6f enable secret et6f hostname 6FF-CORE-SW02 (2)将核心交换机 6F-CORE-SW02上与 6F-CORE-SW01相连的接口TenGigabitEthernet5/4和TenGigabitEthernet5/5配置为EtherChannel: 6F-CORE-SW02(config)#int range tenGigabitEthernet 5/4 - 5 6F-CORE-SW02(config-if-range)#channel-group 2 mode on 6F-CORE-SW02(config-if-range)#no shutdown % Range command terminated because it failed on TenGigabitEthernet5/4 6F-CORE-SW02(config-if-range)#exit 说明:将核心交换机 6F-CORE-SW02上与 6F-CORE-SW01相连的接口TenGigabitEthernet5/4和TenGigabitEthernet5/5配置为EtherChannel,为配置VSL作准备,请注意双方的EtherChannel号码不要配置相同。 (3)配置VSS域名与VSS主机号: 6F-CORE-SW02(config)#switch virtual domain 100 Domain ID 100 config will take effect only after the exec command 'switch convert mode virtual' is issued 6F-CORE-SW02(config-vs-domain)#switch 2 6F-CORE-SW02(config-vs-domain)#exit 说明:配置VSS的域名为100,范围为1-255,两台交换机必须相同;配置VSS的主机号码为2,必须一台为1,另一台为2。 (4)配置VSL链路: 6F-CORE-SW02(config)#int port-channel 2 6F-CORE-SW02(config-if)#switch virtual link 2 6F-CORE-SW02(config-if)#no shutdown 6F-CORE-SW02(config-if)#exi 6F-CORE-SW02(config)#exi 说明:将两台交换机互连的EtherChannel配置为VSL。 (5)将交换机的工作模式改为VSS模式(确定之后,交换机将自动重启): 6F-CORE-SW02#wr Building configuration... [OK] 6F-CORE-SW02# 6F-CORE-SW02#switch convert mode virtual 之后会出现一个选项:选yes 启动完成后:核心sw02:进入standby状态 说明:由于对端交换机 6F-CORE-SW01的VSS优先级高于本交换机,所以对方交换机已经工作在了VSS的Active状态,而本地交换机 6F-CORE-SW02只能工作在Standby状态;只有工作在Active模式的交换机才具有配置和管理双方交换机的权限,而工作在Standby状态的交换机则永远停留在用户模式(提示符为>),enable模式是被阻塞而不能进入的。 并且需要注意,当两台交换机通过VSS合并成单台交换机之后,主机名则沿用Active交换机的主机名。 (1)查看核心交换机 6F-CORE-SW01的EtherChannel状态: 6F-CORE-SW01#sh etherchannel summary Flags: D - down P - bundled in port-channel I - stand-alone s - suspended H - Hot-standby (LACP only) R - Layer3 S - Layer2 U - in use N - not in use, no aggregation f - failed to allocate aggregator M - not in use, no aggregation due to minimum links not met m - not in use, port not aggregated due to minimum links not met u - unsuitable for bundling d - default port w - waiting to be aggregated Number of channel-groups in use: 1 Number of aggregators: 1 Group Port-channel Protocol Ports ------+-------------+-----------+----------------------------------------------- 1 Po1(RD) - Te1/5/4(w) Te1/5/5(D) 6F-CORE-SW01# 说明:核心交换机 6F-CORE-SW01当前的EtherChannel并未工作在正常状态,所以下面需要解决此问题。 说明:由于两台核心交换机之间配置了VSS,所以两台交换机的配置信息将合并为一台, 6F-CORE-SW01之前的接口GigabitEthernet1/2现在变为GigabitEthernet1/1/2,之前的接口GigabitEthernet2/3现在变为GigabitEthernet1/2/3,之前的接口TenGigabitEthernet5/4现在变为TenGigabitEthernet1/5/4,而 6F-CORE-SW02之前的接口GigabitEthernet1/2现在变为GigabitEthernet2/1/2,之前的接口GigabitEthernet2/3现在变为GigabitEthernet2/2/3,之前的接口TenGigabitEthernet5/4现在变为TenGigabitEthernet2/5/4;除此之外,最重要的就是之前双方都配置好的EtherChannel,现在只剩Active交换机 6F-CORE-SW01的TenGigabitEthernet1/5/4和TenGigabitEthernet1/5/5还正常存在,而Standby交换机 6F-CORE-SW02的EtherChannel配置在经过VSS合并之后被清空,所以必须手工添加交换机 6F-CORE-SW02上应有的EtherChannel配置和VSL配置,否则双方的VSL将不能正常工作,那么VSS也就不能正常工作。(也有些型号的设备不需要做这一步vsl就up了) (3)手工添加交换机 6F-CORE-SW02上应有的EtherChannel配置和VSL配置: 6F-CORE-SW01(config)#int range tenGigabitEthernet 2/5/4 - 5 6F-CORE-SW01(config-if-range)#channel-group 2 mode on 6F-CORE-SW01(config-if-range)#no shutdown % Range command terminated because it failed on TenGigabitEthernet2/5/4 6F-CORE-SW01(config-if-range)#exit 00:10:36: %EC-5-STAYDOWN: Te2/5/4 will remain down as its port-channel Po2 is admin-down 6F-CORE-SW01(config)# 6F-CORE-SW01(config)#int port-channel 2 6F-CORE-SW01(config-if)#switch virtual link 2 6F-CORE-SW01(config-if)#no shutdown 6F-CORE-SW01(config-if)#exit 6F-CORE-SW01(config)#exit 6F-CORE-SW01# 00:11:03: %SYS-5-CONFIG_I: Configured from console by consolewr 6F-CORE-SW01#write Building configuration... 00:14:16: %PFINIT-SW1_SP-5-CONFIG_SYNC: Sync'ing the startup configuration to the standby Router. [OK] 6F-CORE-SW01# 说明:虽然是配置 6F-CORE-SW02的EtherChannel和VSL,但还是在VSS的Active交换机上配置的,因为 6F-CORE-SW02工作在Standby状态,是不能进入enable进行配置和管理的。 (4)再次查看交换机 6F-CORE-SW01的工作模式: 6F-CORE-SW01#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 6F-CORE-SW01# 说明:交换机 6F-CORE-SW01当前工作在VSS模式,并显示域名为100,本地交换机号码为1,本地交换机的角色为Active,即具有控制权限的主交换机,而对端交换机号码为2,并且对端交换机角色为Standby。 查看交换机当前的SSO状态: 6F-CORE-SW01# 6F-CORE-SW01#show redundancy states my state = 13 -ACTIVE peer state = 8 -STANDBY HOT Mode = Duplex Unit = Primary Unit ID = 21 Redundancy Mode (Operational) = sso Redundancy Mode (Configured) = sso Redundancy State = sso Maintenance Mode = Disabled Communications = Up client count = 72 client_notification_TMR = 30000 milliseconds keep_alive TMR = 9000 milliseconds keep_alive count = 1 keep_alive threshold = 18 RF debug mask = 0x0 6F-CORE-SW01# 6F-CORE-SW01# 说明:本地交换机当前的SSO状态为ACTIVE,而对端为STANDBY HOT,表明工作正常,如果对端不是工作在STANDBY HOT,则必须解决该问题,除STANDBY HOT之外的任何状态都为不正常。 双活检测:使用 fast-hello(双活一定要做,这样 网络才能稳定) ACTIVE了,已经开始发生冲突了。不过BFD检测会很快,应该慢的时间不会太长(取决于BFD时间间隔的设置)。 ● Fast-hello Fast-hello和IP-BFD差不多,但FAST-hello是二层的。最多可以配置4个非VSL-link作为fast-hello用。两个交换机间会定期的交互FAST-HELLO心跳信息,信息中包含交本换机状态。当VSL 出现故障后,VSS中两台交换机都不再收到FAST-HELLO信息,说明已经出现双活。 注:FAST-Hello 检测会比IP-BFD快,因为在VSL正常的情况下,FAST-hello就在周期性的发送探测包。而IP-BFD要等故障出现后才发探测包。 配置命令: vss(config)# interface range gigabitEthernet 1/2/47-48 vss(config-if)# dual-active fast-hello vss(config)# interface range gigabitEthernet 2/2/47-48 vss(config-if)# dual-active fast-hello vss(config-if)# no shutdown vss(config)# switch virtual domain 100 vss(config-vs-domain)# dual-active detection fast-hello ●当检测到Dual-Active 后所采取动作 当检测到双活后,原active switch进入recovery mode 同时会down掉所有接口(除VSL和管理口),有效的将该交换设备从网络中移除;原standby switch 进入acvtive mode 管理口是通过以下命令指定的:(看实际情况配置) vss(config)#switch virtual domain 10 vss(config-vs-domain)#dual-active exclude interface gigabitEthernet 1/5/3 WARNING: This interface should only be used for access to the switch when in dual-active recovery mode and should not be configured for any other purpose ●从双活状态恢复为正常 当VSL重新UP后,recovery mode的换换机会重启,重启后会进行VSS协商,最终进入HOT-STANDBY状态。但很有可能重启完成后VSL链路由DOWN了,这样就无法通过VSL发现对端交换机了,这时会再次启用双活检测机制…….。 5) Active chassis 故障 处理方式同 active switch 引擎故障,但是原主交换机不会再起来。 6) Standby chassis故障 处理方式同 standby switch 引擎故障,但是原备交换机不会再起来。 (这个只是vss的配置,如果有需要全部配置的加我qq:1101088275,我会继续上传)文档有借用别人资料的:但是都是在实际项目中应用的真实配置 |