03-H3C MSR系列路由器 作为FTP server升级版本典型配置举例
本章节下载: 03-H3C MSR系列路由器 作为FTP server升级版本典型配置举例 (217.50 KB)
H3C MSR系列路由器
作为FTP server升级软件版本配置举例
Copyright © 2022 新华三技术有限公司 版权所有,保留一切权利。
非经本公司书面许可,任何单位和个人不得擅自摘抄、复制本文档内容的部分或全部,并不得以任何形式传播。
除新华三技术有限公司的商标外,本手册中出现的其它公司的商标、产品标识及商品名称,由各自权利人拥有。
本文档中的信息可能变动,恕不另行通知。
目 录
本文档介绍使用FTP方式升级分布式路由器软件版本的典型配置举例。
本文档适用于使用Comware V9软件版本的MSR系列路由器,如果使用过程中与产品实际情况有差异,请参考相关产品手册,或以设备实际情况为准。
本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺省配置。如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的配置不冲突。
本文档假设您已了解FTP的特性。
如图3-1所示,主机Host连接Router的GigabitEthernet0/0/1接口,Router作为FTP服务器,Host作为FTP客户端。
现要求:
· 通过FTP方式为Router升级软件版本,将存储在FTP客户端上的文件msr26e.ipe上传到FTP服务器。
· 配置FTP客户端登录FTP服务器的用户名为abc,密码为123456。
· 为了使设备的主用主控板和备用主控板都能够升级版本,在使用FTP方式将软件版本put到主用主控板后,需要将软件版本复制到备用主控板的根目录下,主用主控板和备用主控板都进行升级。
· 为了使路由器在重启后使用新软件版本,需要指定下次启动时所用的主用启动文件为升级后的软件版本。
本举例是在MSR2630E-X1设备的R9119P16版本上进行配置和验证的。
· 当设备剩余的内存空间不够,请使用delete /unreserved file-url命令删除部分暂时不用的文件后再执行升级软件操作。
· 确保主机和Router的FTP用户名、密码及文件名等参数保持一致。
· 在Router和主机之间进行FTP传输,需要选择binary方式传输文件。
# 配置Router接口IP地址。
<Router> system-view
[Router] interface gigabitethernet 0/0/1
[Router-GigabitEthernet0/0/1] ip address 192.168.100.66 255.255.255.0
[Router-GigabitEthernet0/0/1] quit
# 在Router上添加一个FTP用户abc,并设置其认证密码为123456。
[Router] local-user abc
[Router-luser-abc] password simple 123456
# 配置用户角色为network-admin。
[Router-luser-abc] authorization-attribute user-role network-admin
# 为保证FTP用户仅使用授权的用户角色network-admin,删除缺省用户角色network-operator。
[Router-luser-abc] undo authorization-attribute user-role network-operator
# 配置服务类型为FTP。
[Router-luser-abc] service-type ftp
[Router-luser-abc] quit
# 启动Router的FTP服务功能。
[Router] quit
# 配置主机Host的IP地址为192.168.100.14/24,使得到Router路由可达,具体配置方法略。
# 从FTP client登录FTP server,本例以Windows命令提示符界面为例。
C:\Documents and Settings\Administrator> ftp 192.168.100.66
Connected to 192.168.100.66.
220 FTP service ready.
# 以用户名abc、密码123456登录FTP服务器。
User (192.168.100.66:(none)): abc
331 Password required for abc.
Password:
230 User logged in.
# 使用lcd命令,将FTP客户端本地的工作路径切换到软件版本所在的目录下。
ftp> lcd E:\
Local directory now E:\
# 将传输模式设置为binary方式。
ftp> binary
200 TYPE is now 8-bit binary
# 将本地msr26e.ipe文件上传到FTP服务器上,缺省以文件名msr26e.ipe保存。
ftp> put msr26e.ipe
200 PORT command successful
150 Connecting to port 2903
226 File successfully transferred
ftp: 发送 70445056 字节,用时 1.05Seconds 67282.77Kbytes/sec.
# 使用ls命令查看FTP服务器上是否有文件。
ftp> ls msr26e.ipe
200 PORT command successful
150 Connecting to port 3391
msr26e.ipe
226 1 matches total
ftp: 收到 24 字节,用时 0.00Seconds 24000.00Kbytes/sec.
# 终止与FTP服务器的连接,并退回到用户视图。
ftp> bye
# 将Router主用主控板的文件msr26e.ipe拷贝到备用主控板的根目录下。
<Router> copy flash:/msr26e.ipe slot1#flash:/msr26e.ipe
Copy flash:/msr26e.ipe to slot1#flash:/msr26e.ipe[Y/N]:y
Copying file flash:/msr26e.ipe to slot1#flash:/msr26e.ipe.
........................................................................ Done.
# 指定Router的主用主控板下次启动时所用的主用启动文件为msr26e.ipe。
<Router> boot-loader file flash:/msr26e.ipe slot 0 main
Verifying the IPE file and the images......Done.
H3C MSR2600 images in IPE:
msr26e-cmw910-boot-r9119p16.bin
msr26e-cmw910-system-r9119p16.bin
msr26e-cmw910-security-r9119p16.bin
msr26e-cmw910-voice-r9119p16.bin
msr26e-cmw910-data-r9119p16.bin
This command will set the main startup software images. Continue? [Y/N]:Y
Add images to slot 0.
Decompressing file msr26e-cmw910-boot-r9119p16.bin to flash:/msr26e-cmw910-boot-r9119p16.bin...............Done.
Decompressing file msr26e-cmw910-system-r9119p16.bin to flash:/msr26e-cmw910-system-r9119p16.bin..............................................Done.
Decompressing file msr26e-cmw910-security-r9119p16.bin to flash:/msr26e-cmw910-security-r9119p16.bin...Done.
Decompressing file msr26e-cmw910-voice-r9119p16.bin to flash:/msr26e-cmw910-voice-r9119p16.bin....Done.
Decompressing file msr26e-cmw910-data-r9119p16.bin to flash:/msr26e-cmw910-data-r9119p16.bin...Done.
The images that have passed all examinations will be used as the main startup software images at the next reboot on slot 0.
# 指定Router的主用主控板下次启动时所用的备用启动文件为msr26e-old.ipe。
<Router> boot-loader file slot1#flash:/msr26e-old.ipe slot 0 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 on slot 0.
# 指定Router的备用主控板下次启动时所用的主用启动文件为msr26e.ipe。
<Router> boot-loader file slot1#flash:/msr26e.ipe slot 1 main
Verifying the IPE file and the images........Done.
H3C MSR2600 images in IPE:
msr26e-cmw910-boot-r9119p16.bin
msr26e-cmw910-system-r9119p16.bin
msr26e-cmw910-security-r9119p16.bin
msr26e-cmw910-voice-r9119p16.bin
msr26e-cmw910-data-r9119p16.bin
This command will set the main startup software images. Continue? [Y/N]:y
Add images to slot 1.
Decompressing file msr26e-cmw910-boot-r9119p16.bin to slot1#flash:/msr26e-cmw910-boot-r9119p16.bin................Done.
Decompressing file msr26e-cmw910-system-r9119p16.bin to slot1#flash:/msr26e-cmw910-system-r9119p16.bin.................................................Done.
Decompressing file msr26e-cmw910-security-r9119p16.bin to slot1#flash:/msr26e-cmw910-security-r9119p16.bin...Done.
Decompressing file msr26e-cmw910-voice-r9119p16.bin to slot1#flash:/msr26e-cmw910-voice-r9119p16.bin....Done.
Decompressing file msr26e-cmw910-data-r9119p16.bin to slot1#flash:/msr26e-cmw910-data-r9119p16.bin...Done.
The images that have passed all examinations will be used as the main startup software images at the next reboot on slot 1.
# 指定Router的备用主控板下次启动时所用的备用启动文件为msr26e-old.ipe。
<Router> boot-loader file slot1#flash:/msr26e-old.ipe slot 1 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 on slot 1.
# 重启设备。
<Router> reboot
# 设备重启后,使用display version命令查看设备版本信息。
<Router> display version
H3C Comware Software, Version 9.1.041, Release 9119P16
Copyright (c) 2004-2022 Hangzhou H3C Tech. Co., Ltd. All rights reserved.
H3C MSR2600 uptime is 0 weeks, 0 days, 0 hours, 3 minutes
Last reboot reason : User reboot
Boot image: flash:/msr26e-cmw910-boot-r9119p16.bin
Boot image version: 9.1.041, Release 9119P16
Compiled Jan 15 2022 19:27:12
System image: flash:/msr26e-cmw910-system-r9119p16.bin
System image version: 9.1.041, Release 9119P16
Compiled Jan 15 2022 19:27:12
Feature image(s) list:
flash:/msr26e-cmw910-security-r9119p16.bin, version: 9.1.041
Compiled Jan 15 2022 19:28:36
flash:/msr26e-cmw910-voice-r9119p16.bin, version: 9.1.041
Compiled Jan 15 2022 19:28:37
flash:/msr26e-cmw910-data-r9119p16.bin, version: 9.1.041
Compiled Jan 15 2022 19:28:39
……略……
# 显示设备主用主控板本次启动和下次启动所采用的启动软件包的名称。
<Router> display boot-loader slot 0
Software images on slot 0:
Current software images:
flash:/msr26e-cmw910-boot-r9119p16.bin
flash:/msr26e-cmw910-system-r9119p16.bin
flash:/msr26e-cmw910-security-r9119p16.bin
flash:/msr26e-cmw910-voice-r9119p16.bin
flash:/msr26e-cmw910-data-r9119p16.bin
Main startup software images:
flash:/msr26e-cmw910-boot-r9119p16.bin
flash:/msr26e-cmw910-system-r9119p16.bin
flash:/msr26e-cmw910-security-r9119p16.bin
flash:/msr26e-cmw910-voice-r9119p16.bin
flash:/msr26e-cmw910-data-r9119p16.bin
Backup startup software images:
flash:/msr26e-cmw910-boot-r9119P16.bin
flash:/msr26e-cmw910-system-r9119P16.bin
flash:/msr26e-cmw910-security-r9119P16.bin
flash:/msr26e-cmw910-voice-r9119P16.bin
flash:/msr26e-cmw910-data-r9119P16.bin
# 显示设备备用主控板本次启动和下次启动所采用的启动软件包的名称。
<Router> display boot-loader slot 1
Software images on slot 1:
Current software images:
flash:/msr26e-cmw910-boot-r9119p16.bin
flash:/msr26e-cmw910-system-r9119p16.bin
flash:/msr26e-cmw910-security-r9119p16.bin
flash:/msr26e-cmw910-voice-r9119p16.bin
flash:/msr26e-cmw910-data-r9119p16.bin
Main startup software images:
flash:/msr26e-cmw910-boot-r9119p16.bin
flash:/msr26e-cmw910-system-r9119p16.bin
flash:/msr26e-cmw910-security-r9119p16.bin
flash:/msr26e-cmw910-voice-r9119p16.bin
flash:/msr26e-cmw910-data-r9119p16.bin
Backup startup software images:
flash:/msr26e-cmw910-boot-r9119P16.bin
flash:/msr26e-cmw910-system-r9119P16.bin
flash:/msr26e-cmw910-security-r9119P16.bin
flash:/msr26e-cmw910-voice-r9119P16.bin
flash:/msr26e-cmw910-data-r9119P16.bin
#
interface gigabitethernet0/0/1
port link-mode route
ip address 192.168.100.66 255.255.255.0
#
local-user abc class manage
password hash $h$6$YMVbbwFL/vviWcQu$+CuTbYCehNZtZo5RCXiadpYbXYWa2omt5TUtEh3UPCg
3fZjxYCp5WzbuE2GoowVi2YA/BK+mnSZJZqi5jRDuCg==
service-type ftp
authorization-attribute user-role network-admin
#
ftp server enable
#
· 《H3C MSR1000[2600][3600]路由器 配置指导(V9)》中的“基础配置指导”
· 《H3C MSR1000[2600][3600]路由器 命令参考(V9)》中的“基础配置命令参考”
不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!