通过Commander实现手动替换故障设备示例
组网需求
如图3-21所示,在运行EasyDeploy功能的某企业网络中,SwitchA为Commander及DHCP中继,DHCP服务器和文件服务器与SwitchA之间路由可达。
现在网络中有一台设备Client5故障导致其下行业务中断。此时需要用新设备来替换Client5,并快速实现原来Client5的业务功能,将故障影响降至最小。
新Client的MAC地址是0200-0000-0000,在替换过程中还需要下载web_1.web.7z的网页文件。
配置思路
- 将web_1.web.7z文件保存至文件服务器。
- 在SwitchA上配置故障替换信息,使得新Client能够获取到原故障Client的备份配置文件。
故障替换功能的实现基于已部署EasyDeploy功能的网络,进行故障替换配置前已完成文件服务器、DHCP以及Commander的配置部署。
操作步骤
- 使用故障替换功能,应提前配置自动备份配置文件的功能,以确保新Client能获取到原故障设备的配置文件
<HUAWEI> system-view [HUAWEI] sysname SwitchA [SwitchA] easy-operation [SwitchA-easyoperation] backup configuration interval 72
- 在SwitchA上配置故障替换信息
[SwitchA-easyoperation] client 5 replace mac-address 0200-0000-0000 [SwitchA-easyoperation] client 5 replace web-file web_1.web.7z
- 检查配置结果
# 查看Client替换信息库的信息。
[SwitchA-easyoperation] display easy-operation client replace The total number of replacement information is : 1 ----------------------------------------------------------- ID Replaced Mac Replaced Esn ----------------------------------------------------------- 5 0200-0000-0000 - -----------------------------------------------------------
# 在故障设备替换流程开始后,可以执行命令display easy-operation client 5查看新Client的状态。
[SwitchA-easyoperation] display easy-operation client 5 --------------------------------------------------------------------------- Client ID : 5 Host name : HUAWEI Mac address : 0200-0000-0000 ESN : 210235182810xxxxxxxx IP address : 192.168.1.254 Model : S600-E Device Type : S600-E System-software file : flash:/S600-E.cc System-software version : V200R010C00 Configuration file : - Patch file : - WEB file : - License file : - System CPU usage : 55% System Memory usage : 44% Backup configuration file : vrpcfg-0300-0000-0000.zip Backup result : Successful Last operation result : - Last operation time : 0000-00-00 00:00:00 State : UPGRADING Aging time left (hours) : - ---------------------------------------------------------------------------
# 还可以执行命令display easy-operation download-status查看新Client的下载状态。[SwitchA-easyoperation] display easy-operation download-status The total number of client in downloading files is : 1 ------------------------------------------------------------------------------- ID Mac address IP address Method Phase Status ------------------------------------------------------------------------------- 5 0200-0000-0000 192.168.1.254 Zero-touch Web-file Upgrading
配置文件
SwitchA的配置文件
# sysname SwitchA # vlan batch 10 20 # dhcp enable # interface Vlanif10 ip address 192.168.1.6 255.255.255.0 dhcp select relay dhcp relay server-ip 192.168.3.2 # interface Vlanif20 ip address 192.168.4.2 255.255.255.0 # interface GigabitEthernet0/0/1 port link-type hybrid port hybrid pvid vlan 10 port hybrid untagged vlan 10 # interface GigabitEthernet0/0/2 port link-type hybrid port hybrid pvid vlan 10 port hybrid untagged vlan 10 # interface GigabitEthernet0/0/3 port link-type hybrid port hybrid pvid vlan 10 port hybrid untagged vlan 10 # interface GigabitEthernet0/0/4 port link-type hybrid port hybrid pvid vlan 20 port hybrid untagged vlan 20 # ip route-static 0.0.0.0 0.0.0.0 192.168.4.1 # easy-operation commander ip-address 192.168.1.6 easy-operation commander enable # easy-operation sftp-server 192.168.2.2 username admin password %^%#=.X8C_TN##%&9P>3RK503O@w-=Fr%>naT#E3P4{0%^%# backup configuration interval 72 client 5 mac-address 0300-0000-0000 # return
SwitchB的配置文件
# sysname SwitchB # vlan batch 30 # dhcp enable # ip pool easy-operation gateway-list 192.168.1.6 network 192.168.1.0 mask 255.255.255.0 option 148 ascii ipaddr=192.168.1.6; # interface Vlanif30 ip address 192.168.3.2 255.255.255.0 dhcp select global # interface GigabitEthernet0/0/1 port link-type hybrid port hybrid pvid vlan 30 port hybrid untagged vlan 30 # ip route-static 0.0.0.0 0.0.0.0 192.168.3.1 # return