2.2 华为交换机:命令行:通过FTP升级与备份交换机系统版本(cc文件)、设置系统启动文件
2.2 华为交换机:命令行:通过FTP升级与备份交换机系统版本(cc文件)
华为交换机:通过FTP备份交换机系统版本(cc文件)
(1)电脑上配置好ftp服务并启动服务
(2)保证交换机与ftp服务器通信正常。
(3)查看交换机上的文件名称,使用dir查看
(4)登录ftp服务器:ftp 172.20.20.126
(5)输入ftp帐号的用户名
(6)输入ftp帐号的密码
(7)上传文件到ftp服务器上:put s5700-p-li-v200r003c00spc300.cc
<huaweiSW>dir
Directory of flash:/
Idx Attr Size(Byte) Date Time FileName
0 -rw- 685,821 Jan 07 2015 16:55:18 web.7z
1 -rw- 368,210 Jan 07 2015 16:55:46 s5700li-v200r003sph006.pat
2 -rw- 22,045,068 Jan 07 2015 16:58:02 s5700-p-li-v200r003c00spc300.cc
3 drw- - Dec 01 2015 20:26:46 user
4 -rw- 1,724 Aug 20 2021 13:54:44 private-data.txt
5 -rw- 836 Aug 20 2021 13:54:58 rr.dat
6 -rw- 836 Aug 20 2021 13:55:00 rr.bak
7 drw- - Dec 01 2015 20:27:28 dhcp
8 -rw- 36 Dec 01 2015 20:28:42 $_patchstate_reboot
9 -rw- 3,684 Dec 01 2015 20:28:42 $_patch_history
10 drw- - Aug 20 2021 13:57:08 syslogfile
11 drw- - Sep 03 2021 00:00:44 resetinfo
12 -rw- 955 Mar 15 2021 20:08:26 vrpcfg.zip
204,556 KB total (181,620 KB free)
<huaweiSW>
<huaweiSW>ftp 172.20.20.126
Trying 172.20.20.126 ...
Press CTRL+K to abort
Connected to 172.20.20.126.
220 3Com 3CDaemon FTP Server Version 2.0
User(172.20.20.126:(none)):123456(输入ftp帐号的用户名)
331 User name ok, need password
Enter password:(输入ftp帐号的密码)
230 User logged in
[ftp]?
FTP Client view commands:
ascii Set the file transfer type to ASCII, and it is the default type
binary Set the file transfer type to support the binary image
bye Terminate the FTP connection to the remote server, and exit FTP
cd Change the remote working directory
cdup Change the remote directory to parent directory
close Terminate the FTP connection to the remote server, and return to
the FTP command mode
debugging Enable system debugging functions
delete Delete a file on the remote machine
dir List the contents of the current or remote directory, and
optionally output the contents to a local file
disconnect Terminate the FTP connection to the remote server, and return to
the FTP command mode
feat Extended Features of FTP Server
get Download the remote file to the local host
lcd Display the current working directory
ls List the contents of the current or remote directory, and
optionally output the contents that vary with the remote host system to a
local file
mget Download the remote file list to the local host
mkdir Create a directory on the remote host
mput Upload a local file list to the remote host
open Establish an FTP connection
passive Set the toggle passive mode, the default is off
prompt Enable or disable prompt
put Upload a local file to the remote host
pwd Print the name of the current working directory on the remotehost
quit Terminate the FTP connection to the remote server, and exit FTP
remotehelp Print an informative message about the meaning of commands
rmdir Delete a directory from the remote host
undo Cancel current configuration
user Identify the remote FTP user
verbose Set the toggle verbose mode, the default is on
[ftp]pwd
257 "/" is current directory
[ftp]
[ftp]binary
200 Type set to I.
#put,为上传文件到ftp服务器上。(备注:如果用get, 则是从ftp服务器上下载到交换机上)
[ftp]put s5700-p-li-v200r003c00spc300.cc
200 PORT command successful.
150 File status OK ; about to open data connection
1%
……
98%
99%
100%
226 Closing data connection; File transfer successful.
FTP: 220
华为交换机:通过FTP升级交换机系统版本(cc文件)
(1)电脑上配置好ftp服务并启动服务
(2)保证交换机与ftp服务器通信正常。
(3)查看交换机上的文件名称,使用dir查看
(4)登录ftp服务器:ftp 172.20.20.126
(5)输入ftp帐号的用户名
(6)输入ftp帐号的密码
(7)上传文件到ftp服务器上:get s5700-p-li-v200r003c00spc300.cc
(8)设置交换机下次启动使用的系统软件startup system-software S5720HI-V200R010C00SPC600.cc
(9)检查下次启动的启动项 display startup
(10)重启设备 reboot fast
(11)检查启动文件
(12)删除旧的文件
<Quidway>display version
Huawei Versatile Routing Platform Software
VRP (R) software, Version 5.170 (S5700 V200R010C00SPC600)
Copyright (C) 2000-2016 HUAWEI TECH CO., LTD
Quidway S5700S-52P-LI-AC Routing Switch uptime is 0 week, 0 day, 0 hour, 32 minutes
LS52T52S 0(Master) : uptime is 0 week, 0 day, 0 hour, 31 minutes
DDR Memory Size : 256 M bytes
FLASH Memory Size : 200 M bytes
Pcb Version : VER.C
BootROM Version : 020a.0001
CPLD Version : 0109
Software Version : VRP (R) Software, Version 5.170 (V200R010C00SPC600)
<Quidway>
<Quidway>dir
Directory of flash:/
Idx Attr Size(Byte) Date Time FileName
0 -rw- 26,793,884 Mar 20 2018 14:17:46 s5700s-p-li-v200r010c00spc600.cc
1 -rw- 2,469,387 Mar 20 2018 14:18:14 s5700s-li-v200r010sph008.pat
2 drw- - Jun 22 2018 17:40:08 $_install_mod
3 drw- - Jun 22 2018 17:41:34 logfile
4 drw- - Jun 22 2018 17:40:20 user
5 -rw- 1,706 Sep 03 2021 18:03:28 private-data.txt
6 -rw- 836 Sep 03 2021 17:48:00 rr.dat
7 -rw- 836 Sep 03 2021 17:48:00 rr.bak
8 drw- - Sep 03 2021 18:03:26 localuser
9 drw- - Jun 22 2018 17:41:08 dhcp
10 -rw- 36 Jun 22 2018 17:43:10 $_patchstate_reboot
11 -rw- 3,684 Jun 22 2018 17:43:10 $_patch_history
12 -rw- 4 Jun 22 2018 17:43:12 snmpnotilog.txt
13 drw- - May 10 2019 00:00:38 resetinfo
14 -rw- 1,767,985 May 06 2019 10:50:50 help.web
15 drw- - May 06 2019 13:00:32 $_backup
16 -rw- 854 Sep 03 2021 18:03:26 vrpcfg.zip
204,556 KB total (172,296 KB free)
<Quidway>
<Quidway>ftp 172.20.20.126
Trying 172.20.20.126 ...
Press CTRL+K to abort
Connected to 172.20.20.126.
220 3Com 3CDaemon FTP Server Version 2.0
User(172.20.20.126:(none)):123456
331 User name ok, need password
Enter password:
230 User logged in
[ftp]bi
[ftp]binary
200 Type set to I.
[ftp]
[ftp]put s5700s-p-li-v200r010c00spc600.cc
200 PORT command successful.
150 File status OK ; about to open data connection
226 Closing data connection; File transfer successful.
FTP: 26793884 byte(s) sent in 87.907 second(s) 304.79Kbyte(s)/sec.
[ftp]get s5700-p-li-v200r003c00spc300.cc
200 PORT command successful.
150 File status OK ; about to open data connection
226 Closing data connection; File transfer successful.
FTP: 22045068 byte(s) received in 128.873 second(s) 171.06Kbyte(s)/sec.
[ftp]quit
221 Service closing control connection
<Quidway>dir
Directory of flash:/
Idx Attr Size(Byte) Date Time FileName
0 -rw- 26,793,884 Mar 20 2018 14:17:46 s5700s-p-li-v200r010c00spc600.cc
1 -rw- 2,469,387 Mar 20 2018 14:18:14 s5700s-li-v200r010sph008.pat
2 drw- - Jun 22 2018 17:40:08 $_install_mod
3 drw- - Jun 22 2018 17:41:34 logfile
4 drw- - Jun 22 2018 17:40:20 user
5 -rw- 1,706 Sep 03 2021 18:03:28 private-data.txt
6 -rw- 836 Sep 03 2021 17:48:00 rr.dat
7 -rw- 836 Sep 03 2021 17:48:00 rr.bak
8 drw- - Sep 03 2021 18:03:26 localuser
9 drw- - Jun 22 2018 17:41:08 dhcp
10 -rw- 36 Jun 22 2018 17:43:10 $_patchstate_reboot
11 -rw- 3,684 Jun 22 2018 17:43:10 $_patch_history
12 -rw- 4 Jun 22 2018 17:43:12 snmpnotilog.txt
13 drw- - May 10 2019 00:00:38 resetinfo
14 -rw- 1,767,985 May 06 2019 10:50:50 help.web
15 drw- - May 06 2019 13:00:32 $_backup
16 -rw- 22,045,068 Sep 03 2021 18:17:50 s5700-p-li-v200r003c00spc300.cc
17 -rw- 854 Sep 03 2021 18:03:26 vrpcfg.zip
204,556 KB total (150,764 KB free)
<Quidway>
<Quidway>startup system-software s5700-p-li-v200r003c00spc300.cc
Upgrading BootROM, please wait for a moment...
Info: BootROM upgrade is ok.
Info: Succeeded in setting the software for booting system.
<Quidway>
<Quidway> display startup
MainBoard:
Configured startup system software: flash:/s5700s-p-li-v200r010c00spc600.cc
Startup system software: flash:/s5700s-p-li-v200r010c00spc600.cc
Next startup system software: flash:/s5700-p-li-v200r003c00spc300.cc
Startup saved-configuration file: NULL
Next startup saved-configuration file: flash:/vrpcfg.zip
Startup paf file: default
Next startup paf file: default
Startup license file: default
Next startup license file: default
Startup patch package: flash:/s5700s-li-v200r010sph008.pat
Next startup patch package: flash:/s5700s-li-v200r010sph008.pat
<Quidway>
<Quidway>reboot ?
fast Reboot system fast
save Save system information
<cr>
<Quidway>reboot fast
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
<Quidway>display startup
MainBoard:
Configured startup system software: flash:/s5700-p-li-v200r003c00spc300.cc
Startup system software: flash:/s5700-p-li-v200r003c00spc300.cc
Next startup system software: flash:/s5700-p-li-v200r003c00spc300.cc
Startup saved-configuration file: flash:/vrpcfg.zip
Next startup saved-configuration file: flash:/vrpcfg.zip
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: flash:/s5700s-li-v200r010sph008.pat
<Quidway>
<Quidway>dir
Directory of flash:/
Idx Attr Size(Byte) Date Time FileName
0 -rw- 26,793,884 Mar 20 2018 14:17:46 s5700s-p-li-v200r010c00spc600.cc
1 -rw- 2,469,387 Mar 20 2018 14:18:14 s5700s-li-v200r010sph008.pat
2 drw- - Jun 22 2018 17:40:08 $_install_mod
3 drw- - Jun 22 2018 17:41:34 logfile
4 drw- - Jun 22 2018 17:40:20 user
5 -rw- 1,706 Sep 03 2021 18:24:54 private-data.txt
6 -rw- 836 Sep 03 2021 18:25:04 rr.dat
7 -rw- 836 Sep 03 2021 18:25:04 rr.bak
8 drw- - Sep 03 2021 18:03:26 localuser
9 drw- - Jun 22 2018 17:41:08 dhcp
10 -rw- 36 Jun 22 2018 17:43:10 $_patchstate_reboot
11 -rw- 3,684 Jun 22 2018 17:43:10 $_patch_history
12 -rw- 4 Sep 03 2021 18:21:10 snmpnotilog.txt
13 drw- - Sep 03 2021 18:27:10 resetinfo
14 -rw- 1,767,985 May 06 2019 10:50:50 help.web
15 drw- - May 06 2019 13:00:32 $_backup
16 -rw- 22,045,068 Sep 03 2021 18:17:50 s5700-p-li-v200r003c00spc300.cc
17 -rw- 751 Sep 03 2021 18:26:10 vrpcfg.zip
18 drw- - Sep 03 2021 18:27:08 syslogfile
204,556 KB total (150,724 KB free)
<Quidway>
<Quidway>
<Quidway>delete flash:/s5700s-p-li-v200r010c00spc600.cc
Delete flash:/s5700s-p-li-v200r010c00spc600.cc?[Y/N]:y
Info: Deleting file flash:/s5700s-p-li-v200r010c00spc600.cc...succeeded.
<Quidway>dir
Directory of flash:/
Idx Attr Size(Byte) Date Time FileName
0 -rw- 2,469,387 Mar 20 2018 14:18:14 s5700s-li-v200r010sph008.pat
1 drw- - Jun 22 2018 17:40:08 $_install_mod
2 drw- - Jun 22 2018 17:41:34 logfile
3 drw- - Jun 22 2018 17:40:20 user
4 -rw- 1,706 Sep 03 2021 18:24:54 private-data.txt
5 -rw- 836 Sep 03 2021 18:25:04 rr.dat
6 -rw- 836 Sep 03 2021 18:25:04 rr.bak
7 drw- - Sep 03 2021 18:03:26 localuser
8 drw- - Jun 22 2018 17:41:08 dhcp
9 -rw- 36 Jun 22 2018 17:43:10 $_patchstate_reboot
10 -rw- 3,684 Jun 22 2018 17:43:10 $_patch_history
11 -rw- 4 Sep 03 2021 18:21:10 snmpnotilog.txt
12 drw- - Sep 03 2021 18:27:10 resetinfo
13 -rw- 1,767,985 May 06 2019 10:50:50 help.web
14 drw- - May 06 2019 13:00:32 $_backup
15 -rw- 22,045,068 Sep 03 2021 18:17:50 s5700-p-li-v200r003c00spc300.cc
16 -rw- 751 Sep 03 2021 18:26:10 vrpcfg.zip
17 drw- - Sep 03 2021 18:27:08 syslogfile
204,556 KB total (150,720 KB free)
<Quidway>
<Quidway>
搭建FTP升级环境
通过Console通信电缆和网线,将交换机与PC直连,实现组网的搭建。Console通信电缆与交换机Console口相连,网线与任意以太网口相连(本文以GigabitEthernet 0/0/1为例),如图1所示。
在PC上打开终端仿真软件,新建连接,设置连接的COM接口以及通信参数。设置终端软件的通信参数与设备的缺省值保持一致,分别为:传输速率为9600bit/s、8位数据位、1位停止位、无校验和无流控。
输入用户名和密码。V200R0010C00之前版本首次登录,系统会提示用户设置登录密码。V200R010C00及之后版本首次登录时缺省的用户名为admin,密码为admin@huawei.com。登录后必须修改密码。
Login authentication Username:admin Password:
配置交换机的管理IP,使交换机和PC之间处于同一网段,可以ping通。
<HUAWEI> system-view [HUAWEI] interface vlanif 1[HUAWEI-vlanif1] ip address 10.10.1.1 24 //10.10.1.1/24为配置的VLANIF接口IP地址,按照实际现网情况进行选择,确保与PC处于同一网段。 [HUAWEI-vlanif1] quit
版本升级操作
交换机作为FTP Client,通过FTP服务与PC实现文件传输。
<HUAWEI> ftp 10.10.1.2 //10.10.1.2为终端PC的IP地址。 <HUAWEI> get S5720HI-V200R010C00SPC600.cc //加载系统软件到交换机中,S5720HI-V200R010C00SPC600.cc为系统软件的文件名。 <HUAWEI> get S5720HI-V200R010SPH013.pat //加载补丁文件到交换机中,S5720HI-V200R010SPH013.pat为系统补丁的文件名。
检查加载内容是否成功。
<HUAWEI> dir flash: //执行dir命令查看加载文件大小和PC的文件是否相同。如果不相同,删除该文件重新加载。 Directory of flash:/ Idx Attr Size(Byte) Date Time FileName 0 -rw- 106,395,444 Jul 22 2017 23:44:18 S5720HI-V200R010C00SPC600.cc 1 -rw- 84210 Jun 28 2017 05:16:29 S5720HI-V200R010SPH013.pat 2 drw- - Jan 01 2017 00:00:44 dhcp 3 drw- - Dec 03 2013 09:22:27 user 4 -rw- 13,432 Jan 01 2017 00:00:45 default_ca.cer
设置交换机下次启动使用的系统软件和补丁。
<HUAWEI> startup system-software S5720HI-V200R010C00SPC600.cc //设置下次启动的系统软件。 <HUAWEI> startup patch S5720HI-V200R010SPH013.pat //设置下次启动的补丁。
检查下次启动的启动项。
<HUAWIE> display startup MainBoard: Configured startup system software: flash:/defaultdevicesoft.cc Startup system software: flash:/defaultdevicesoft.cc Next startup system software: flash:/S5720HI-V200R010C00SPC600.cc Startup saved-configuration file: flash:/vrpcfg.zip Next startup saved-configuration file: flash:/vrpcfg.zip Startup paf file: default Next startup paf file: default Startup license file: default Next startup license file: default Startup patch package: flash:/patch.pat Next startup patch package: flash:/S5720HI-V200R010SPH013.pat
重启设备。
<HUAWEI> reboot fast Info: If want to reboot with saving diagnostic information, input 'N' and then e xecute 'reboot save diagnostic-information'. System will reboot! Continue?[Y/N]: y
网络设备的安装、升级、恢复出厂、重置密码(列表、list、全)升级list、管理list、登录list、重置list
http://www.zh-cjh.com/wenzhangguilei/922.html
文章归类、所有文章列表、LISTLIST
http://www.zh-cjh.com/wangzhangonggao/2195.html
2、本资源基本为原创,部分来源其他付费资源平台或互联网收集,如有侵权请联系及时处理。
3、本站大部分文章的截图来源实验测试环境,请不要在生产环境中随意模仿,以免带来灾难性后果。
转载请保留出处: www.zh-cjh.com珠海陈坚浩博客 » 2.2 华为交换机:命令行:通过FTP升级与备份交换机系统版本(cc文件)、设置系统启动文件
作者: cjh
手机扫一扫,手机上查看此文章: |
一切源于价值!
其他 模板文件不存在: ./template/plugins/comment/pc/index.htm