最佳答案
可以但是比较慢,建议使用ftp tftp
本文档介绍使用TFTP方式升级集中式路由器软件版本的典型配置举例。
本文档适用于使用Comware V7软件版本的MSR系列路由器,如果使用过程中与产品实际情况有差异,请参考相关产品手册,或以设备实际情况为准。
本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺省配置。如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的配置不冲突。
本文档假设您已了解TFTP的特性。
如图1所示,Host连接Router的GigabitEthernet0/0接口,Router作为TFTP客户端,Host作为TFTP服务器。
现要求:通过TFTP方式为Router升级软件版本。
为了使路由器在重启后使用新版本软件,需要指定下次启动时所用的主用启动文件为升级后的软件版本。
本举例是在R0106版本上进行配置和验证的。
· 当设备剩余的存储空间不够,请使用delete /unreserved file-url命令删除部分暂时不用的文件后再执行升级软件操作。
· 软件升级时需要重启设备,建议使用save命令保存设备的当前配置。
# 配置Host的IP地址为192.168.100.14/24,使得与Router路由可达,具体配置方法略。
# 启动Host上的TFTP服务器(以3CDaemon软件为例),设置TFTP服务器下载路径等参数,并开启服务。
图2 配置TFTP服务器
# 配置Router接口IP地址。
<Router> system-view
[Router] interface gigabitethernet 0/0
[Router-GigabitEthernet0/0] ip address 192.168.100.66 255.255.255.0
[Router-GigabitEthernet0/0] quit
[Router] quit
# 在Router ping TFTP服务器地址,能够ping通。
<Router> ping 192.168.100.14
PING 192.168.100.14: 56 data bytes, press CTRL_C to break
Reply from 192.168.100.14: bytes=56 Sequence=0 ttl=128 time=2 ms
Reply from 192.168.100.14: bytes=56 Sequence=1 ttl=128 time=1 ms
Reply from 192.168.100.14: bytes=56 Sequence=2 ttl=128 time=1 ms
Reply from 192.168.100.14: bytes=56 Sequence=3 ttl=128 time=1 ms
Reply from 192.168.100.14: bytes=56 Sequence=4 ttl=128 time=1 ms
--- 192.168.100.14 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 1/1/2 ms
# 将TFTP服务器上的msr36.ipe文件下载到路由器上,以缺省文件名msr36.ipe保存。
<Router> tftp 192.168.100.14 get msr36.ipe
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 58.7M 100 58.7M 0 0 1193k 0 0:00:50 0:00:50 --:--:-- 1127k
# 指定Router下次启动时所用的主用启动文件为msr36.ipe。
<Router> boot-loader file cfa0:/msr36.ipe main
Verifying the IPE file and the images.....Done.
H3C MSR36-40 images in IPE:
msr36-cmw710-boot-r0106.bin
msr36-cmw710-system-r0106.bin
msr36-cmw710-security-r0106.bin
msr36-cmw710-voice-r0106.bin
msr36-cmw710-data-r0106.bin
This command will set the main startup software images. Continue? [Y/N]:y
Add images to the device.
Decompressing file msr36-cmw710-boot-r0106.bin to cfa0:/msr36-cmw710-boot-r0106.bin.........Done.
Decompressing file msr36-cmw710-system-r0106.bin to cfa0:/msr36-cmw710-system-r0106.bin.................................Done.
Decompressing file msr36-cmw710-security-r0106.bin to cfa0:/msr36-cmw710-security-r0106.bin...Done.
Decompressing file msr36-cmw710-voice-r0106.bin to cfa0:/msr36-cmw710-voice-r0106.bin...Done.
Decompressing file msr36-cmw710-data-r0106.bin to cfa0:/msr36-cmw710-data-r0106.bin...Done.
The images that have passed all examinations will be used as the main startup so
ftware images at the next reboot on the device.
# 指定Router的备用主控板下次启动时所用的备用启动文件为msr36-old.ipe。
<Router> boot-loader file cfa0:/msr36-old.ipe backup
This command will set the backup startup software images. Continue? [Y/N]:y
The images that have passed all examinations will be used as the backup startup
software images at the next reboot.
# 重启设备。
<Router> reboot
# 设备重启后,使用display version命令查看设备版本信息。
<Router> display version
H3C Comware Software, Version 7.1.049, Release 0106
Copyright (c) 2004-2014 Hangzhou H3C Tech. Co., Ltd. All rights reserved.
H3C MSR36-40 uptime is 0 weeks, 0 days, 0 hours, 2 minutes
Last reboot reason : User reboot
Boot image: cfa0:/msr36-cmw710-boot-r0106.bin
Boot image version: 7.1.049P04, Release 0106
Compiled Feb 08 2014 17:43:51
System image: cfa0:/msr36-cmw710-system-r0106.bin
System image version: 7.1.049, Release 0106
Compiled Feb 08 2014 17:43:51
Feature image(s) list:
cfa0:/msr36-cmw710-security-r0106.bin, version: 7.1.049
Compiled Feb 08 2014 17:44:41
cfa0:/msr36-cmw710-voice-r0106.bin, version: 7.1.049
Compiled Feb 08 2014 17:44:42
cfa0:/msr36-cmw710-data-r0106.bin, version: 7.1.049
Compiled Feb 08 2014 17:44:44
CPU ID: 0x2
2G bytes DDR3 SDRAM Memory
8M bytes Flash Memory
PCB Version: 2.0
CPLD Version: 2.0
Basic BootWare Version: 1.20
Extended BootWare Version: 1.20
[SLOT 0]AUX (Hardware)2.0, (Driver)1.0, (CPLD)2.0
[SLOT 0]GE0/0 (Hardware)2.0, (Driver)1.0, (CPLD)2.0
[SLOT 0]GE0/1 (Hardware)2.0, (Driver)1.0, (CPLD)2.0
[SLOT 0]GE0/2 (Hardware)2.0, (Driver)1.0, (CPLD)2.0
[SLOT 0]CELLULAR0/0 (Hardware)2.0, (Driver)1.0, (CPLD)2.0
[SLOT 0]CELLULAR0/1 (Hardware)2.0, (Driver)1.0, (CPLD)2.0
[SLOT 2]SIC-4FSW (Hardware)2.0, (Driver)1.0, (CPLD)2.0
[SLOT 6]HMIM-4GEE (Hardware)2.0, (Driver)1.0, (CPLD)0.0
[SLOT 8]HMIM-2SAE (Hardware)3.0, (Driver)1.0, (CPLD)4.0
# 显示本次启动和下次启动所采用的启动软件包的名称。
<Router> display boot-loader
Software images on the device:
Current software images:
cfa0:/msr36-cmw710-boot-r0106.bin
cfa0:/msr36-cmw710-system-r0106.bin
cfa0:/msr36-cmw710-security-r0106.bin
cfa0:/msr36-cmw710-voice-r0106.bin
cfa0:/msr36-cmw710-data-r0106.bin
Main startup software images:
cfa0:/msr36-cmw710-boot-r0106.bin
cfa0:/msr36-cmw710-system-r0106.bin
cfa0:/msr36-cmw710-security-r0106.bin
cfa0:/msr36-cmw710-voice-r0106.bin
cfa0:/msr36-cmw710-data-r0106.bin
Backup startup software images:
cfa0:/msr36-cmw710-boot-r000703.bin
cfa0:/msr36-cmw710-system-r000703.bin
cfa0:/msr36-cmw710-security-r000703.bin
cfa0:/msr36-cmw710-voice-r000703.bin
cfa0:/msr36-cmw710-data-r000703.bin
ip address 192.168.100.66 255.255.255.0
(0)
能提供一下方法吗
已提供
1. 通过Xmodem方式升级启动软件包
通过Console口利用Xmodem传输文件速度较慢,而集成了BootRom文件的启动软件包通常较大,推荐您使用以太网口升级启动软件包。
(1)
(2)
(3)
(4)
1. Set TFTP protocol parameters
2. Set FTP protocol parameters
3. Set XMODEM protocol parameters
0. Return to boot menu
Enter your choice(0-3):
(5)
Please select your download baudrate:
1.* 9600
2. 19200
3. 38400
4. 57600
5. 115200
0. Return to boot menu
Enter your choice(0-5):5
(6)
Download baudrate is 115200 bps
Please change the terminal's baudrate to 115200 bps and select XMODEM protocol
Press enter key when ready
由于交换机Console口的波特率已经修改为115200bps,而终端的波特率还为9600bps,双方是无法通信的。因此,根据系统的提示,需要改变终端设置的波特率,使其与交换机选择的下载波特率一致。
如果下载波特率选择为9600bps,用户不用修改超级终端的波特率,不用进行下面的第(5)至(7)步操作,直接进入第(8)步的操作。
(7)
图1 [呼叫/断开]菜单项
(8)
(9)
图4 [呼叫/呼叫]菜单项
(10)
Are you sure to download file to flash? Yes or No (Y/N):Y
(11)
Now please start transfer file with XMODEM protocol
If you want to exit, Press <Ctrl+X>
Loading ...CCCCCCCCCCCCCCCCCCCCCCCCC
此时,若想退出程序下载,请键入<Ctrl+X>,否则继续进行如下操作。
(12)
图5 [传送/发送文件]菜单项
图6 [发送文件]对话框
(13)
(14)
Please input the file attribute (Main/Backup/None) m
The boot.bin image is self-decompressing...
Load File name : default_file boot-update.bin 设置已下载的Boot
Free space: 470519808 bytes
Writing flash...................................................................
.............Done!
The system-update.bin image is self-decompressing...
Load File name : default_file system-update.bin 设置已下载的System
Free space: 461522944 bytes
Writing flash...................................................................
.............Done!
Your baudrate should be set to 9600 bps again!
Press enter key when ready
如果在设置启动软件包的属性前设备中已经存在同样属性的启动软件包,则在用户的设置生效后,原有启动软件包的属性将会变为“无属性”。
(15)
如果下载的速率选择为9600 bps,用户不用重新调整超级终端的速率,请跳过此步骤。
EXTENDED BOOT MENU
1. Download image to flash
2. Select image to boot
3. Display all files in flash
4. Delete file from flash
5. Restore to factory default configuration
6. Enter BootRom upgrade menu
7. Skip current system configuration
8. Set switch startup mode
9. Set The Operating Device
0. Reboot
Ctrl+Z: Access EXTENDED ASSISTANT MENU
Ctrl+F: Format file system
Ctrl+P: Change authentication for console login
Ctrl+R: Download image to SDRAM and run
Enter your choice(0-8): 0
(16)
(0)
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
已提供