路由器/交換器管理密碼遺失、啟動配置 (startup-config) 遺失是網管必遇的兩大經典故障。本文針對華為/華三 (Comware VRP) 體系設備,詳細說明密碼恢復流程與啟動配置檔 TFTP 遠端恢復操作步驟,並提供跨廠商通用原則。
save),正常重啟。7. Skip current configuration file (跳過當前配置啟動) 8. Clear password (清除密碼,部分舊版本支援)。<Huawei>)。system-view。aaa
local-user admin password irreversible-cipher
local-user admin privilege level 15
local-user admin service-type terminal ssh http https
user-interface console 0
authentication-mode password
set authentication password cipher
user-interface vty 0 4
authentication-mode aaa
save force 儲存配置 (覆蓋舊啟動配置)。reboot 正常重啟驗證新密碼生效。Failed to load startup configuration 或進入初始配置對話。tftpd-hpa)。10.10.10.2/24),啟動 TFTP Server,根目錄放置備份的 startup.cfg (或 vrpcfg.zip)。# 1. 配置管理介面 IP (假設 MEth 0/0/0)
interface Meth 0/0/0
ip address 10.10.10.1 255.255.255.0
quit
# 2. 從 TFTP 伺服器下載啟動配置檔
copy tftp://10.10.10.2/startup.cfg flash:/startup.cfg
# 或舊版指令
tftp 10.10.10.2 get startup.cfg
# 3. 指定下次啟動使用此配置檔
startup saved-configuration flash:/startup.cfg
# 4. 驗證配置檔完整性
more flash:/startup.cfg
# 5. 重啟生效
reboot
| 廠商/OS | 進入恢復模式 | 密碼重置 | 配置恢復 |
|---|---|---|---|
| Cisco IOS/IOS-XE | Break 鍵 → ROMMON → confreg 0x2142 → reset | config-register 0x2102 → enable secret 新密碼 | copy tftp: startup-config / copy usb0: startup-config |
| Huawei VRP (Comware) | Ctrl+B → BootROM → Skip config / Clear password | aaa local-user ... / user-interface password | copy tftp://... flash:/startup.cfg → startup saved-configuration |
| H3C Comware 7/9 | 同華為 (同源) | 同華為 | 同華為 |
| Juniper JunOS | 單用戶模式 (啟動時按 Space → boot -s) | configure → set system root-authentication plain-text-password | load override /var/tmp/backup.conf → commit |
| Arista EOS | 輸入 'bash' 進 Shell → 修改 /mnt/flash/startup-config | configure → username admin secret 新密碼 | copy scp://... flash:startup-config |
running-config、startup-config 存入 Git/版本庫。密碼與配置是網路設備的「大腦記憶」。建立自動化備份、集中密管、標準化恢復 SOP、定期實戰演練四位一體的韌性體系,才能在故障降臨時從容應對,將 MTTR 壓縮至分鐘級。