C9K Stackwise Virtual(三)

一、Stackwise Virtual模式

单台SW默认的模式是standalone模式,如果需要将SW配置为stackwise virtual模式,必须进行配置。

1、交换机标识(Switch identity)

stackwise virtual domain中的每个交换机会被分配一个唯一的switch identity标识,该标识用作接口的命名的第一部分(例如FortyG1/0/10)。

2、转换模式

在配置将单独的交换机转换为Stackwise virtual之前,需要将SVL提前连接,以最大程度的减少SW的重启次数。如下所示,可以看到Switch1和Switch2属于stackwise virtual domain100,他们使用的是40G接口作为SVL。

 配置步骤:

①配置stackwise virtual domain

两台交换机都配置同样的domian id,这里是100

SV-1#conf t
Enter configuration commands, one per
line. End with CNTL/Z.
SV-1(config)#stackwise-virtual
Please reload the switch for StackWise
Virtual configuration to take effect
SV-1(config-stackwise-virtual)#domain 100
SV-2#conf t
Enter configuration commands, one per
line. End with CNTL/Z.
SV-2(config)#stackwise-virtual
Please reload the switch for StackWise
Virtual configuration to take effect
SV-2(config-stackwise-virtual)#domain 100

②配置SVL

默认情况下,在standalone模式下,除非明确更改为其他switch number,否则switch将用switch1标识。 在转换为StackWise Virtual的过程中,switch number会自动更改,以反映StackWise Virtual域中的两个交换机关系。

SV-1#conf t
Enter configuration commands, one per
line. End with CNTL/Z.
SV-1(config)#interface range fortyGigabitEthernet 1/0/23-24
SV-1(config-if-range)#stackwise-virtual link 1
WARNING: All the extraneous configurations will be removed for FortyGigabitEthernet1/0/23 on reboot
WARNING: All the extraneous configurations will be removed for FortyGigabitEthernet1/0/24 on reboot
SV-1(config-if-range)#end
SV-2#conf t
Enter configuration commands, one per
line. End with CNTL/Z.
SV-2(config)#interface range fortyGigabitEthernet 1/0/23-24
SV-2(config-if-range)#stackwise-virtual link 1
WARNING: All the extraneous configurations will be removed for FortyGigabitEthernet1/0/23 on reboot
WARNING: All the extraneous configurations will be removed for FortyGigabitEthernet1/0/24 on reboot
SV-2(config-if-range)#end

在range的端口内执行“ stackwise-virtual link”命令后,交换机将自动捆绑这些链路以形成Port-channel。 无需再手动配置Port-channel或指定协议。交换机将自动创建具有内部协议的Port-channel

③配置双活检测(dual-active detection)

该配置需要配置在非SVL接口上

SV-1(config)#interface fortyGigabitEthernet 1/0/12
SV-1(config-if)#stackwise-virtual dual-active-detection
WARNING: All the extraneous configurations will be removed for FortyGigabitEthernet1/0/12 on reboot.
SV-1(config-if)#end
SV-2(config)#interface fortyGigabitEthernet 1/0/12
SV-2(config-if)#stackwise-virtual dual-active-detection
WARNING: All the extraneous configurations will be removed for FortyGigabitEthernet1/0/12 on reboot.
SV-1(config-if)#end

④保存配置并重启交换机

该步骤将standalone模式的SW转换到stackwise virtual domain

SV-1#wr mem
Building configuration...
[OK]
SV-1#reload
Reload command is being issued on Active unit, this will reload the whole stack Proceed with reload? [confirm]
# Hit Enter here to proceed with the reload
SV-2#wr mem
Building configuration...
[OK]
SV-2#reload
Reload command
is being issued on Active unit, this will reload the whole stack Proceed with reload? [confirm] # Hit Enter here to proceed with the reload

在交换机重启期间,基于交换机Active角色和standby角色的选举,startup配置和running配置将同步,且将为第一个启动的SW或是Active Virtual SW分配switch identity为1,第二个启动或Secondary Virtual SW分配switch identity为2,这从SW的接口标识也能看到。

*Mar 1 23:58:27.791: %IOSXE_REDUNDANCY-6-PEER: Active detected switch 2 as standby.
*Mar 1 23:58:27.790: %STACKMGR-6-STANDBY_ELECTED: Switch 1 R0/0: stack_mgr: Switch 2 has been elected STANDBY.
*Mar 1 23:58:47.829: %REDUNDANCY-5-PEER_MONITOR_EVENT: Active detected a standby insertion (raw-event=PEER_FOUND(4))
*Mar 1 23:58:47.829: %REDUNDANCY-5-PEER_MONITOR_EVENT: Active detected a standby insertion (raw-event=PEER_REDUNDANCY_STATE_CHANGE(5))
*Mar 1 23:59:22.369: %HA_CONFIG_SYNC-6-BULK_CFGSYNC_SUCCEED: Bulk Sync succeeded
*Mar 1 23:59:23.371: %RF-5-RF_TERMINAL_STATE: Terminal state reached for (SSO)

当完成之后,可能就会注意到不管是console还是management接入任何一台SW,都是一台逻辑的SW(呈现的关键是Active那台SW)

SV-1#show switch
Switch/Stack Mac Address : 00a3.d145.2300 - Local Mac Address
Mac persistency wait time: Indefinite

H/W Current
Switch#  Role   Mac Address   Priority   Version   State
-------------------------------------------------------------------------------------
*1    Active  00a3.d145.2300   15       V01     Ready
 2    Standby  00a3.d145.1e00   14       V01     Read

通过show switch命令可以看到两台SW作为一个逻辑的SW在运行。

 

posted @ 2020-05-01 10:13  剪刀石头布Cheers  阅读(1179)  评论(0编辑  收藏  举报