面向初學者的 Cisco 路由器從開機到基本配置的完整教程,涵蓋啟動序列、交互式 Setup、密碼找回、CLI 模式層級與常用命令。
boot system 命令指定具體映像檔。startup-config 載入運行內存,啟動路由進程、介面地址/介質屬性。若無有效配置 → 進入 Setup 模式。無啟動配置或手動 setup 進入。每項提示含預設值(回車接受),已配置顯示當前值。Space 翻頁,Ctrl+C 退出。
hostnameenable secret / enable passwordline vty 0 4 → passwordline console 0 → password以太網、Token Ring、同步/異步串口:IP、掩碼、速率、封裝等。
提示保存,輸入 YES 寫入 NVRAM。相關命令:show running-config、write memory、write erase、reload。
出廠配置寄存器 0x2102。修改為 0x2142 忽略 NVRAM 配置(含密碼)啟動。注意:enable secret 加密不可逆,只能重設。
show version 確認寄存器 0x2102。>)。confreg 0x2142 修改寄存器。reset 或 i 重啟,跳過啟動配置進入 Setup 提示,輸入 no 進入用戶模式。enable 進入特權(無密碼),show startup-config 查看舊密碼(enable password 可見,enable secret 顯示加密串)。config t
enable secret NewSecret123
enable password NewEnable123
line console 0
password NewConsole123
config-register 0x2102
end
copy running-config startup-config
reload
以新密碼登入。操作可能導致系統中斷 ~90 分鐘,請安排維護窗口。
ping、show 部分)。enable 進入。可用 configure terminal、interface、router、line 等配置命令。config terminal(終端,預設)、config memory(NVRAM)、config network(TFTP)。
router <protocol>:動態路由進程(BGP/EIGRP/OSPF/RIP/Static)。interface <type> <num>:介面參數(IP、封裝、帶寬、QoS 等)。line console/vty/aux:終端線路密碼、傳輸協議、逾時等。hostname RouterA。
? 列出當前模式可用命令。命令 ? 獲取參數提示。