专业IT设备第三方维保_IT设备维保服务_IT备件服务_IT基础架构运维_IT设备维修-网度通信

如何导入导出华为交换机配置

2023-02-25 14:42
分享到:
在配置好华为交换机后,为防止交换机因意外停电或者人为操作疏忽,而导致设备无法正常运行,此时我们可以先前做好备份配置,以备发生故障时可以快速恢复配置。今天我们就来分享一下华为交换机配置的导出和导入。
华为CloudEngine 16800系列数据中心交换机
导出配置文件
设备作为FTP服务器,用户PC作为FTP客户端
 
配置设备的FTP功能及FTP用户信息。
system-view
[HUAWEI] ftp server enable
[HUAWEI] sysname Paul //设置主机名成为Paul
[HUAWEI] paul
[HUAWEI-paul] local-user wenglei password irreversible-cipher wl@163
[HUAWEI-paul] local-user wenglei privilege level 15
[HUAWEI-paul] local-user wenglei service-type ftp
[HUAWEI-paul] local-user wenglei ftp-directory cfcard:/  //这里注意是你交换机当前目录dir
[HUAWEI-paul] quit
[HUAWEI] quit
//保存设备当前配置。
save
 
PC端通过FTP连接设备
从终端PC通过FTP连接设备,输入用户名wenglei和密码wl@163,并采用binary模式进行文件传输。 
终端以Window10操作系统为例说明。
C:\Documents and Settings\Administrator> ftp 10.136.23.5
Connected to 10.136.23.5.
220 FTP service ready.
User (10.136.23.5:(none)): wenglei
331 Password required for wenglei.
Password: wl@163
230 User logged in.
ftp> binary
200 Type set to I.
ftp>
 
导出配置文件
ftp> get vrpcfg.zip
200 Port command okay.
150 Opening BINARY mode data connection for vrpcfg.zip.
226 Transfer complete.
ftp: 收到 1257 字节,用时 0.03秒 40.55千字节/秒。
设置恢复的配置文件为下次启动配置文件并重启设备 
C:\Users\Administrator>这是备份的配置文件的默认路径 
至此备份成功
 
导入配置文件
设备作为FTP服务器,本地PC作为FTP客户端,将备份的配置文件上传到设备中
 
配置设备的FTP服务器功能及FTP用户信息
system-view
[HUAWEI] ftp server enable
[HUAWEI] paul
[HUAWEI-paul] local-user wenglei password irreversible-cipher wl@163
[HUAWEI-paul] local-user wenglei privilege level 15
[HUAWEI-paul] local-user wenglei service-type ftp
[HUAWEI-paul] local-user wenglei ftp-directory cfcard:/
[HUAWEI-paul] quit
[HUAWEI] quit
 
PC端通过FTP连接设备
从终端PC通过FTP连接设备,输入用户名wenglei和密码wl@163,并采用binary模式进行文件传输。 
终端以Window10操作系统为例说明。
 
C:\> ftp 10.136.23.5
Connected to 10.136.23.5.
220 FTP service ready.
User (10.136.23.5:(none)): wenglei
331 Password required for wenglei.
Password: wl@163
230 User logged in.
ftp> binary
200 Type set to I.
ftp>
 
上传配置文件到设备中
ftp> put vrpcfg.zip
200 Port command okay.
150 Opening BINARY mode data connection for vrpcfg.zip.
226 Transfer complete.
ftp: 发送 1257 字节,用时 0.03秒 40.55千字节/秒。
至此上传配置文件成功了 
dir命令查看是否上传成功了
 
设置恢复的配置文件为下次启动配置文件并重启设备
startup saved-configuration config.cfg
display startup
MainBoard:
  Configured startup system software:        cfcard:/device_software.cc
  Startup system software:                   cfcard:/device_software.cc
  Next startup system software:              cfcard:/device_software.cc
  Startup saved-configuration file:          cfcard:/config_old.cfg   //设备当前的配置文件名。
  Next startup saved-configuration file:     cfcard:/config.cfg   //下次启动的配置文件名。
  Startup paf file:                          default
  Next startup paf file:                     default
  Startup license file:                      default
  Next startup license file:                 default
  Startup patch package:                     NULL
  Next startup patch package:                NULL
reboot   //重启设备。
Info: The system is now comparing the configuration, please wait.
Warning: The configuration has been modified, and it will be saved to the next startup saved-configuration file cfcard:/config.cfg. Continue? [Y/N]:N
//输入N防止设备当前的配置保存到备份的配置文件中。
Now saving the current configuration to the slot 13.
Save the configuration successfully.
Info: If want to reboot with saving diagnostic information, input 'N' and then execute 'reboot save diagnostic-information'.
System will reboot! Continue?[Y/N]:Y   //输入Y重启设备。
 
以上,就是华为交换机配置的导入和导出的方法
上一篇:思科企业级路由器license一些相关命令讲解
下一篇:IT硬件维保是什么?IT硬件维保服务都包含哪些项目和标准?