03-軟件升級配置舉例
本章節下載: 03-軟件升級配置舉例 (254.80 KB)
H3C S6800&S6860&S6861產品軟件升級典型配置舉例
Copyright © 2019 bobty下载软件 版權所有,保留一切權利。
非經本公司書麵許可,任何單位和個人不得擅自摘抄、複製本文檔內容的部分或全部,並不得以任何形式傳播。
除bobty下载软件 的商標外,本手冊中出現的其它公司的商標、產品標識及商品名稱,由各自權利人擁有。
本文檔中的信息可能變動,恕不另行通知。
目 錄
本文檔介紹軟件升級的典型配置舉例。
本文檔不嚴格與具體軟、硬件版本對應,如果使用過程中與產品實際情況有差異,請參考相關產品手冊,或以設備實際情況為準。
本文檔中的配置均是在實驗室環境下進行的配置和驗證,配置前設備的所有參數均采用出廠時的缺省配置。如果您已經對設備進行了配置,為了保證配置效果,請確認現有配置和以下舉例中的配置不衝突。
本文檔假設您已了解軟件升級和FTP/TFTP的特性。
如圖1所示,Switch和文件服務器通過交換機相連,Switch作為TFTP客戶端,文件服務器作為TFTP服務器。現要求:通過TFTP方式將存儲在文件服務器上的文件switch.ipe下載到TFTP客戶端,為Switch升級軟件版本。
為了使交換機在重啟後使用新版本軟件,需要指定下次啟動時所用的主用啟動文件為升級後的軟件版本。
產品 |
軟件版本 |
S6800係列 S6860係列 S6861係列 |
Release 2702 |
· 當設備剩餘的存儲空間不夠,請使用delete /unreserved file-url命令刪除部分暫時不用的文件後再執行升級軟件操作。
· 軟件升級時需要重啟設備,建議使用save命令保存設備的當前配置。
# 配置文件服務器的IP地址為192.168.100.14/24,與Switch路由可達,具體配置方法略。
# 啟動文件服務器上的TFTP服務器功能(以3CDaemon軟件為例),設置TFTP服務器下載路徑等參數,並開啟服務。
圖2 配置TFTP服務器
# 配置Switch管理口的IP地址。
<Switch> system-view
System View: return to User View with Ctrl+Z.
[Switch] interface m-gigabitethernet 0/0/0
[Switch-M-GigabitEthernet0/0/0] ip address 192.168.100.66 255.255.255.0
[Switch-M-GigabitEthernet0/0/0] quit
[Switch] quit
# 在Switch 上ping TFTP服務器地址,能夠ping通。
<Switch> ping 192.168.100.14
Ping 192.168.100.14 (192.168.100.14): 56 data bytes, press CTRL_C to break
56 bytes from 192.168.100.14: icmp_seq=0 ttl=64 time=10.701 ms
56 bytes from 192.168.100.14: icmp_seq=1 ttl=64 time=2.678 ms
56 bytes from 192.168.100.14: icmp_seq=2 ttl=64 time=2.282 ms
56 bytes from 192.168.100.14: icmp_seq=3 ttl=64 time=1.617 ms
56 bytes from 192.168.100.14: icmp_seq=4 ttl=64 time=1.701 ms
--- Ping statistics for 192.168.100.14 ---
5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss
round-trip min/avg/max/std-dev = 1.617/3.796/10.701/3.474 ms
# 執行save命令保存交換機當前配置信息。
<Switch> save
The current configuration will be written to the device. Are you sure? [Y/N]:y
Please input the file name(*.cfg)[flash:/startup.cfg]
(To leave the existing filename unchanged, press the enter key):
flash:/startup.cfg exists, overwrite? [Y/N]:y
Validating file. Please wait...
Saved the current configuration to mainboard device successfully.
# 使用TFTP方式將文件服務器上的軟件版本switch.ipe文件下載到Switch上,以缺省文件名switch.ipe保存。
<Switch> tftp 192.168.100.14 get switch.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
# 指定Switch下次啟動時所用的主用啟動文件為switch.ipe。
<Switch> boot-loader file flash:/switch.ipe slot 1 main
Verifying the file flash:/switch.ipe on slot 1.....Done.
Images in IPE:
boot.bin
system.bin
This command will set the main startup software images. Continue? [Y/N]:y
Add images to slot 1.
Decompressing file switch.bin to flash:/boot.bin.........Done.
Decompressing file switch.bin to flash:/system.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.
# 重啟設備。
<Switch> reboot
# 設備重啟後,使用display version命令查看設備版本信息。
<Switch> display version
H3C Comware Software, Version 7.1.070, Release xxxx
Copyright (c) 2004-2019 New H3C Technologies Co., Ltd. All rights reserved.
H3C S6800-32Q uptime is 0 weeks, 0 days, 0 hours, 19 minutes
Last reboot reason : User reboot
Boot image: flash:/boot.bin
Boot image version: 7.1.070, Release xxxx
Compiled Jun 18 2019 17:52:09
System image: flash:/system.bin
System image version: 7.1.070, Release xxxx
Compiled Jun 18 2019 17:52:09
……略……
# 顯示本次啟動和下次啟動所采用的啟動軟件包的名稱。
<Switch> display boot-loader
Software images on slot 1:
Current software images:
flash:/boot.bin
flash:/system.bin
Main startup software images:
flash:/boot.bin
flash:/system.bin
Backup startup software images:
None
#
interface M-GigabitEthernet0/0/0
ip address 192.168.100.66 255.255.255.0
#
如圖3所示,Switch和文件服務器通過交換機相連,Switch作為FTP客戶端,文件服務器作為FTP服務器。現要求:
· 通過FTP方式為Switch升級軟件版本,將存儲在文件服務器上的文件switch.ipe下載到FTP客戶端。
· 配置FTP客戶端登錄FTP服務器的用戶名為123456,密碼為123456。
為了使交換機在重啟後使用新軟件版本,需要指定下次啟動時所用的主用啟動文件為升級後的軟件版本。
表2 適用產品及版本
產品 |
軟件版本 |
S6800係列 S6860係列 S6861係列 |
Release 2702 |
· 當設備剩餘的內存空間不夠,請使用delete /unreserved file-url命令刪除部分暫時不用的文件後再執行升級軟件操作。
· 確保主機和Switch的FTP用戶名、密碼及文件名等參數保持一致。
# 配置文件服務器的IP地址為192.168.100.14/24,使得與Switch路由可達,具體配置方法略。
# 啟動文件服務器上的FTP功能(以3CDaemon軟件為例),設置FTP服務器下載路徑、FTP用戶名和密碼,並開啟FTP服務。
圖4 配置FTP服務器
# 配置Switch接口IP地址。
<Switch> system-view
System View: return to User View with Ctrl+Z.
[Switch] interface m-gigabitethernet 0/0/0
[Switch-M-GigabitEthernet0/0/0] ip address 192.168.100.66 255.255.255.0
[Switch-M-GigabitEthernet0/0/0] quit
[Switch] quit
# 在Switch上ping文件服務器地址,能夠ping通。
<Switch> ping 192.168.100.14
Ping 192.168.100.14 (192.168.100.14): 56 data bytes, press CTRL_C to break
56 bytes from 192.168.100.14: icmp_seq=0 ttl=64 time=10.701 ms
56 bytes from 192.168.100.14: icmp_seq=1 ttl=64 time=2.678 ms
56 bytes from 192.168.100.14: icmp_seq=2 ttl=64 time=2.282 ms
56 bytes from 192.168.100.14: icmp_seq=3 ttl=64 time=1.617 ms
56 bytes from 192.168.100.14: icmp_seq=4 ttl=64 time=1.701 ms
--- Ping statistics for 192.168.100.14 ---
5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss
round-trip min/avg/max/std-dev = 1.617/3.796/10.701/3.474 ms
# 執行save命令保存交換機當前配置信息。
<Switch> save
The current configuration will be written to the device. Are you sure? [Y/N]:y
Please input the file name(*.cfg)[flash:/startup.cfg]
(To leave the existing filename unchanged, press the enter key):
flash:/startup.cfg exists, overwrite? [Y/N]:y
Validating file. Please wait...
Configuration is saved to mainboard device successfully.
# 以用戶名123456、密碼123456登錄FTP服務器。
<Switch> ftp 192.168.100.14
Connected to 192.168.100.14 (192.168.100.14).
220 3Com 3CDaemon FTP Server Version 2.0
User (192.168.100.14:(none)): 123456
331 User name ok, need password
Password:
230 User logged in
Remote system type is UNIX.
Using binary mode to transfer files.
# 將文件switch.ipe從FTP服務器下載到Switch上。
ftp> get switch.ipe
227 Entering passive mode (192,168,100,14,8,86)
125 Using existing data connection
226 Closing data connection; File transfer successful.
50445056 bytes received in 53.6 seconds (1.25 Mbyte/s)
ftp> quit
# 指定Switch下次啟動時所用的主用啟動文件為switch.ipe。
<Switch> boot-loader file flash:/switch.ipe slot 1 main
Verifying the file flash:/switch.ipe on slot 1.....Done.
Images in IPE:
boot.bin
system.bin
This command will set the main startup software images. Continue? [Y/N]:y
Add images to slot 1.
Decompressing file switch.bin to flash:/boot.bin.........Done.
Decompressing file switch.bin to flash:/system.bin.................................Done.
The images that have passed all examinations will be used as the main startup software images at the next reboot on on slot 1.
# 重啟設備。
<Switch> reboot
# 設備重啟後,使用display version命令查看設備版本信息。
<Switch> display version
H3C Comware Software, Version 7.1.070, Release xxxx
Copyright (c) 2004-2019 New H3C Technologies Co., Ltd. All rights reserved.
H3C S6800-32Q uptime is 0 weeks, 0 days, 0 hours, 19 minutes
Last reboot reason : User reboot
Boot image: flash:/boot.bin
Boot image version: 7.1.070, Release xxxx
Compiled Jun 18 2019 17:52:09
System image: flash:/system.bin
System image version: 7.1.070, Release xxxx
Compiled Jun 18 2019 17:52:09
……略……
# 顯示本次啟動和下次啟動所采用的啟動軟件包的名稱。
<Switch> display boot-loader
Software images on slot 1:
Current software images:
flash:/boot.bin
flash:/system.bin
Main startup software images:
flash:/boot.bin
flash:/system.bin
Backup startup software images:
None
#
interface M-GigabitEthernet0/0/0
ip address 192.168.100.66 255.255.255.0
#
如圖5所示,Switch和文件服務器通過交換機相連,Switch作為FTP服務器,文件服務器作為FTP客戶端。
現要求:
· 通過FTP方式為Switch升級軟件版本,將存儲在FTP客戶端上的文件switch.ipe上傳到FTP服務器。
· 配置FTP客戶端登錄FTP服務器的用戶名為abc,密碼為123456。
為了使交換機在重啟後使用新軟件版本,需要指定下次啟動時所用的主用啟動文件為升級後的軟件版本。
表3 適用產品及版本
產品 |
軟件版本 |
S6800係列 S6860係列 S6861係列 |
Release 2702 |
· 當設備剩餘的內存空間不夠,請使用delete /unreserved file-url命令刪除部分暫時不用的文件後再執行升級軟件操作。
· 確保主機和Switch的FTP用戶名、密碼及文件名等參數保持一致。
· 在Switch和主機之間進行FTP傳輸,需要選擇binary方式傳輸文件。
# 配置Switch接口IP地址。
<Switch> system-view
System View: return to User View with Ctrl+Z.
[Switch] interface m-gigabitethernet 0/0/0
[Switch-M-GigabitEthernet0/0/0] ip address 192.168.100.66 255.255.255.0
[Switch-M-GigabitEthernet0/0/0] quit
# 在Switch上添加一個FTP用戶abc,並設置其認證密碼為123456。
[Switch] local-user abc
[Switch-luser-manage-abc] password simple 123456
# 配置用戶角色為network-admin。
[Switch-luser-manage-abc] authorization-attribute user-role network-admin
# 為保證FTP客戶端僅使用授權的用戶角色network-admin,刪除缺省用戶角色network-operator。
[Switch-luser-manage-abc] undo authorization-attribute user-role network-operator
# 配置服務類型為FTP。
[Switch-luser-manage-abc] service-type ftp
[Switch-luser-manage-abc] quit
# 啟動Switch的FTP服務功能。
[Switch] ftp server enable
[Switch] quit
# 執行save命令保存交換機當前配置信息。
<Switch> save
The current configuration will be written to the device. Are you sure? [Y/N]:y
Please input the file name(*.cfg)[flash:/startup.cfg]
(To leave the existing filename unchanged, press the enter key):
flash:/startup.cfg exists, overwrite? [Y/N]:y
Validating file. Please wait...
Saved the current configuration to mainboard device successfully.
# 配置文件服務器的IP地址為192.168.100.14/24,使得到Switch路由可達,具體配置方法略。
# 從文件服務器登錄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
# 將本地switch.ipe文件上傳到FTP服務器上,缺省以文件名switch.ipe保存。
ftp> put switch.ipe
200 PORT command successful
150 Connecting to port 2903
226 File successfully transferred
ftp: 發送 50445056 字節,用時 1.05Seconds 67282.77Kbytes/sec.
# 使用ls命令查看FTP服務器上是否有文件。
ftp> ls switch.ipe
200 PORT command successful
150 Connecting to port 3391
switch.ipe
226 1 matches total
ftp: 收到 24 字節,用時 0.00Seconds 24000.00Kbytes/sec.
# 終止與FTP Server的連接,並退回到用戶視圖。
ftp> bye
# 指定Switch下次啟動時所用的主用啟動文件為switch.ipe。
<Switch> boot-loader file flash:/switch.ipe slot 1 main
Verifying the IPE file and the images.....Done.
Verifying the file flash:/switch.ipe on slot 1.....Done.
Images in IPE:
boot.bin
system.bin
This command will set the main startup software images. Continue? [Y/N]:y
Add images to slot 1.
Decompressing file switch.bin to flash:/boot.bin.........Done.
Decompressing file switch.bin to flash:/system.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.
# 重啟設備。
<Switch> reboot
# 設備重啟後,使用display version命令查看設備版本信息。
<Switch> display version
H3C Comware Software, Version 7.1.070, Release xxxx
Copyright (c) 2004-2019 New H3C Technologies Co., Ltd. All rights reserved.
H3C S6800-32Q uptime is 0 weeks, 0 days, 0 hours, 19 minutes
Last reboot reason : User reboot
Boot image: flash:/boot.bin
Boot image version: 7.1.070, Release xxxx
Compiled Jun 18 2019 17:52:09
System image: flash:/system.bin
System image version: 7.1.070, Release xxxx
Compiled Jun 18 2019 17:52:09
……略……
# 顯示本次啟動和下次啟動所采用的啟動軟件包的名稱。
<Switch> display boot-loader
Software images on slot 1:
Current software images:
flash:/boot.bin
flash:/system.bin
Main startup software images:
flash:/boot.bin
flash:/system.bin
Backup startup software images:
None
#
interface M-GigabitEthernet0/0/0
ip address 192.168.100.66 255.255.255.0
#
local-user abc class manage
password hash $h$6$YMVbbwFL/vviWcQu$+CuTbYCehNZtZo5RCXiadpYbXYWa2omt5TUtEh3UPCg3fZjxYCp5WzbuE2GoowVi2YA/BK+mnSZJZqi5jRDuCg==
service-type ftp
authorization-attribute user-role network-admin
#
ftp server enable
#
· H3C S6800[60][61](R27xx) & S6820(R630x)係列以太網交換機 基礎配置指導
· H3C S6800[60][61](R27xx) & S6820(R630x)係列以太網交換機 基礎配置命令參考
不同款型規格的資料略有差異, 詳細信息請向具體銷售和400谘詢。H3C保留在沒有任何通知或提示的情況下對資料內容進行修改的權利!