Console 口是路由器管理的「生命線」。本文以 Cisco 路由器為例,圖文並茂詳述 PC 連接 Console 口的硬件準備、線序轉接、終端軟件參數設置、CLI 模式層級結構、主機名配置、模式切換全流程,助力網絡新手跨越「第一公里」。

| 參數 | 值 | PuTTY 設置路徑 | |||
|---|---|---|---|---|---|
| 連接類型 | Serial | Session → Serial | |||
| Serial line | COM3 (設備管理器確認) | Session → Serial line | |||
| Speed (波特率) | 9600 | Session → Speed | |||
| Data bits | 8 | Terminal → Keyboard → Data bits | |||
| Stop bits | 1 | Terminal → Keyboard → Stop bits | |||
| Parity | None | Terminal → Keyboard → Parity | |||
| Flow control | None | Connection → Flow control |
| 模式 | 提示符 | 權限 | 進入命令 | 退出命令 | 典型操作 |
|---|---|---|---|---|---|
| 用戶 EXEC | Router> | 監控、基礎測試 | 默認登錄 | exit / logout | ping、traceroute、show 部分 |
| 特權 EXEC | Router# | 完全控制、文件操作 | enable (+密碼) | disable | configure terminal、debug、copy、reload、show 所有 |
| 全局配置 | Router(config)# | 全局參數配置 | conf t / configure terminal | end / Ctrl+Z | hostname、interface、router、ip route、vlan |
| 接口配置 | Router(config-if)# | 單接口參數 | int 類型/編號 | exit | ip address、no shutdown、bandwidth、encapsulation |
| 路由協議 | Router(config-router)# | 協議進程參數 | router 協議 [pid] | exit | network、redistribute、neighbor、area |
| 線路配置 | Router(config-line)# | Console/VTY/AUX 參數 | line con 0 / vty 0 4 | exit | password、login、transport input、exec-timeout |
Router> enable
Router# configure terminal
Router(config)# hostname R1
R1(config)# end
R1#

Console 口連接看似基礎,實則是網絡工程師與設備建立信任的「第一次握手」。熟練掌握硬件連接、終端參數、CLI 模式、核心命令,是通往網絡世界的入場券,更是職業生涯長跑的穩健起跑姿勢。