• 產品與解決方案
  • 行業解決方案
  • 服務
  • 支持
  • 合作夥伴
  • 關於我們

H3C園區盒式交換機 CLI快速配置指南-6W104

  • 發布時間:2025/5/12 19:56:54
  • 瀏覽量:
  • 下載量:

03-配置文件管理快速配置指南

本章節下載  (231.66 KB)

03-配置文件管理快速配置指南

配置文件管理快速配置指南

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Copyright © 2024 bobty下载软件 版權所有,保留一切權利。

非經本公司書麵許可,任何單位和個人不得擅自摘抄、複製本文檔內容的部分或全部,並不得以任何形式傳播。

除bobty下载软件 的商標外,本手冊中出現的其它公司的商標、產品標識及商品名稱,由各自權利人擁有。

本文檔中的信息可能變動,恕不另行通知。



1  恢複出廠配置

1.1  簡介

本案例介紹使設備恢複到出廠狀態的常用方法。

1.2  配置注意事項

不同設備支持恢複到出廠狀態方法可能不同,具體以設備的實際情況為準。

恢複出廠配置後,設備會清除所有用戶的配置信息。因此,用戶需要登錄設備的Console口進行操作,不能通過SSH或Telnet方式遠程登錄設備。關於Console登錄設備的方法,請參見“通過Console登錄設備快速配置指南”。

1.3  配置步驟

·     執行restore factory-default命令行並重啟設備

# 將設備恢複到出廠狀態。

<Sysname> restore factory-default

This command will restore the system to the factory default configuration and clear the operation data. Continue [Y/N]:y

Restoring the factory default configuration. This process might take a few minutes. Please wait..........................................................................................................Done.

Please reboot the system to place the factory default configuration into effect.

# 重啟設備,請不要選擇保存當前配置。重啟完成之後,設備將恢複到出廠狀態。

<Sysname> reboot
Start to check configuration with next startup configuration file, please wait.........DONE!
Current configuration will be lost after the reboot, save current configuration? [Y/N]:n

This command will reboot the device. Continue? [Y/N]:y

Now rebooting, please wait...

·     刪除配置文件並重啟設備

# 顯示用於本次及下次啟動的配置文件的名稱。

<Sysname> display startup

MainBoard:

 Current startup saved-configuration file: flash:/startup.cfg

 Next main startup saved-configuration file: flash:/startup.cfg

 Next backup startup saved-configuration file: NULL

# 查看設備當前已存在的配置文件。

<Sysname> dir

Directory of flash:

   0 -rw-        6244 Jan 08 2013 07:26:03   startup.cfg

   1 -rw-      136628 Jan 08 2013 07:26:03   startup.mdb

   2 -rw-       58704 Jan 03 2013 07:56:22   diag_H3C_20130103-005605.tar.gz

...

# 刪除下次啟動的配置文件。

<Sysname> delete /unreserved startup.cfg

The file cannot be restored. Delete flash:/startup.cfg?[Y/N]:y

Deleting a file permanently will take a long time. Please wait...

%Delete file flash:/startup.cfg...Done.

# 重啟設備。重啟完成之後,設備將恢複到出廠狀態。

<Sysname> reboot

Start to check configuration with next startup configuration file, please wait.........DONE!

Current configuration will be lost after the reboot, save current configuration? [Y/N]:n

This command will reboot the device. Continue? [Y/N]:y

Now rebooting, please wait...

·     清除保存的配置並重啟設備

說明

·     缺省情況下,本特性會將下次啟動配置文件從所有的成員設備上徹底刪除,請謹慎使用。如果隻需從主設備上刪除下次啟動配置文件,請關閉配置文件同步功能。

·     重啟設備時,請勿保存當前配置文件。

 

# 顯示用於本次及下次啟動的配置文件的名稱。

<Sysname> display startup

MainBoard:

 Current startup saved-configuration file: flash:/startup.cfg

 Next main startup saved-configuration file: flash:/startup.cfg

 Next backup startup saved-configuration file: NULL

# 刪除下次啟動的主用配置文件。

<Sysname> reset saved-configuration

The saved configuration file will be erased. Are you sure? [Y/N]:Y

如果設備上存在備用配置文件,則需再執行reset saved-configuration backup命令,本例中不需要執行此命令。

# 重啟設備。重啟完成之後,設備將恢複到出廠狀態。

<Sysname> reboot
Start to check configuration with next startup configuration file, please wait.........DONE!

Current configuration will be lost after the reboot, save current configuration? [Y/N]:n

This command will reboot the device. Continue? [Y/N]:y

Now rebooting, please wait...

1.4  相關資料

·     產品配套“基礎配置指導”中的“配置文件管理”。

·     產品配套“基礎配置命令參考”中的“配置文件管理”。

·     產品配套“基礎配置指導”中的“設備管理”。

·     產品配套“基礎配置命令參考”中的“設備管理”。

·     產品配套“基礎配置指導”中的“文件係統管理”。

·     產品配套“基礎配置命令參考”中的“文件係統管理”。


 

2  備份配置文件

2.1  簡介

本案例介紹備份配置文件方法。

2.2  組網需求

圖1示,備份Device的當前配置文件,並保存到FTP Server上。

圖1 備份配置文件組網圖

 

2.3  配置準備

請確保Device設備與FTP Server間路由可達。

2.4  配置步驟

# 保存設備配置,配置文件名采用缺省名字startup.cfg。

<Sysname> 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):

Validating file. Please wait...

Saved the current configuration to mainboard device successfully.

以上表明設備默認保存了一個名為starup.cfg的配置文件。

# 將startup.cfg文件上傳到FTP服務器上。

<Sysname> ftp 192.168.10.1

Press CTRL+C to abort.

Connected to 192.168.10.1 (192.168.10.1).

220 WFTPD 2.0 service (by Texas Imperial Software) ready for new user

User (192.168.10.1:(none)): root

331 Give me your password, please

Password:

230 Logged in successfully

Remote system type is MSDOS.

ftp> binary

200 Type is Image (Binary)

ftp> put start.cfg

ftp: No such file or directory

ftp> put startup.cfg

227 Entering Passive Mode (192,168,10,1,235,54)

150 "D:\temp\startup.cfg" file ready to receive in IMAGE / Binary mode    

.                                                                              

226 Transfer finished successfully.

4326 bytes sent in 0.003 seconds (1.49 Mbytes/s)

2.5  驗證配置

# 查看上傳的配置文件。

ftp> dir

227 Entering Passive Mode (192,168,10,1,252,152)

1 File Listing Follows in ASCII mode

-rwxrwxrwx   1 noone    nogroup     4326 Sep  2 14:00 startup.cfg

以上表明startup.cfg文件已上傳到FTP服務器上。

2.6  相關資料

·     產品配套“基礎配置指導”中的“配置文件管理”。

·     產品配套“基礎配置命令參考”中的“配置文件管理”。

·     產品配套“基礎配置指導”中的“FTP和TFTP”。

·     產品配套“基礎配置命令參考”中的“FTP和TFTP”。


 

3  跳過自動配置

3.1  簡介

自動配置功能是指設備在啟動時自動獲取並執行配置文件。網絡管理員隻需將配置文件保存在指定的存儲介質上,啟動設備,即可實現自動配置,從而簡化了網絡配置,大大降低了網絡管理員的工作量,便於實現對設備的集中管理。應用場景是網絡規模較大,設備位置較分散。

設備空配置啟動時,首先自動檢查存儲介質的根目錄下是否存在autocfg.pyautocfg.tcl autocfg.cfg配置文件。如果存在,則直接執行此文件;如果不存在,則通過自動從文件服務器上獲取並執行配置腳本文件或配置文件,實現自動配置功能。autocfg.pyautocfg.tclautocfg.cfg配置文件同時隻能在設備上存在一個。

但是有的時候設備並不會應用在網絡規模較大的場景中,所以就需要跳過自動配置

本案例介紹跳過自動配置方法。

3.2  組網需求

圖2所示,設備空配置啟動,跳過自動配置。

圖2 跳過自動配置組網圖

 

3.3  配置準備

設備空配置啟動,需使用Console口登錄設備。關於Console登錄設備的方法,請參見“通過Console登錄設備快速配置指南”。

3.4  配置步驟

# 設備開機啟動。

Starting......                                                                 

Press Ctrl+D to access BASIC BOOT MENU                                         

Press Ctrl+T to start heavy memory test                                        

                                                                               

********************************************************************************

*                                                                              *

*                 H3C S5570S-28S-HPWR-EI  BOOTROM, Version 105                 *

*                                                                              *

********************************************************************************

Copyright (c) 2004-2021 New H3C Technologies Co., Ltd.                         

                                                                               

Creation Date         : Jul  6 2021                                            

CPU Clock Speed       : 1000MHz                                                

Memory Type           : DDR4 SDRAM                                             

Memory Size           : 1024MB                                                 

Memory Speed          : 800MHz                                                 

CPLD Version          : 001                                                    

PCB Version           : Ver.A                                                  

Mac Address           : b04414cd47a4                                           

                                                                                

                                                                               

BootRom Validating...                                                          

Press Ctrl+B to access EXTENDED BOOT MENU...0                                   

Loading the main image files...                                                

Loading file flash:/s5570s_ei-cmw710-system-e1105p09.bin........................

.......................................................Done.                    

Loading file flash:/s5570s_ei-cmw710-devkit-e1105p09.bin.....Done.             

Loading file flash:/s5570s_ei-cmw710-boot-e1105p09.bin.........Done.           

                                                                                

Image file flash:/s5570s_ei-cmw710-boot-e1105p09.bin is self-decompressing......

................................................................................

................................................................................

................................................................................

................................................................................

................................................................................

................................................................................

................................................................................

................Done.                                                          

System is starting...                                                          

Cryptographic algorithms tests passed.                                         

                                                                               

Startup configuration file doesn't exist or is invalid.                        

Performing automatic configuration... Press CTRL_C or CTRL_D to break.         

                                                                               

Automatic configuration attempt: 1.                                            

Not ready for automatic configuration: no interface available.                 

Waiting for the next...       

 

Automatic configuration attempt: 2.                                            

Not ready for automatic configuration: no interface available.                 

Waiting for the next...                    

 

可以通過按“CTRL+D”或者“Ctrl+C”中斷自動配置,進入Comware係統。

3.5  相關資料

·     產品配套“基礎配置指導”中的“自動配置”。

·     產品配套“基礎配置命令參考”中的“自動配置”。

不同款型規格的資料略有差異, 詳細信息請向具體銷售和400谘詢。H3C保留在沒有任何通知或提示的情況下對資料內容進行修改的權利!

BOB登陆
官網
聯係我們