[ 永遠的UNIX::UNIX技術資料的寶庫 ]   GB | BIG5

首頁 > 網絡管理 > 網絡設備 > 正文
Cisco路由器配置手冊 第一章 預備知識
不詳 (2001-05-01 22:04:54)
一、 設 置 方 式 

 
---- 一 般 來 說, 可 以 用5 種 方 式 來 設 置 路 由 器: 

Console 口 接 終 端 或 運 行 終 端 仿 真 軟 件 的 微 機; 

AUX 口 接MODEM, 通 過 電 話 線 與 遠 方 的 終 端 或 運 行 終 端 仿 真 軟 件 的 微 機 相 連; 

通 過Ethernet 上 的TFTP 服 務 器; 

通 過Ethernet 上 的TELNET 程 序; 

通 過Ethernet 上 的SNMP 網 管 工 作 站。 
但 路 由 器 的 第 一 次 設 置 必 須 通 過 第 一 種 方 式 進 行; 這 時 終 端 的 硬 件 設 置 
為 波 特 率:9600, 數 據 位:8, 停 止 位:1, 無 校 驗。 

二、 命 令 狀 態 
router > 
路 由 器 處  用 戶 命 令 狀 態, 這 時 用 戶 可 以 看 路 由 器 的 連 接 狀 態, 訪 問 其 
它 網 絡 和 主 機, 但 不 能 看 到 和 更 改 路 由 器 的 設 置 內 容。 

router# 
路 由 器 處  特 權 命 令 狀 態, 這 時 不 但 可 以 執 行 所 有 的 用 戶 命 令, 還 可 以
看 到 和 更 改 路 由 器 的 設 置 內 容。 

router(config)# 
路 由 器 處  全 局 設 置 狀 態, 這 時 可 以 設 置 路 由 器 的 全 局 參 數。 

router(config-if)#; router (config-line)#; router(config-router)# … … 
路 由 器 處  局 部 設 置 狀 態, 這 時 可 以 設 置 路 由 器 某 個 局 部 的 參 數。 

只 有 > 
路 由 器 處 RXBOOT 狀 態, 在 開 機 60 秒 內 按ctrl-break 可 進 入 此 狀 態, 這 時 路 
由 器 不 能 完 成 正 常 的 功 能, 只 能 進 行 軟 件 升 級 和 手 工 引 導。 

設 置 對 話 狀 態 
這 是 一 台 新 路 由 器 開 機 時 自 動 進 入 的 狀 態, 在 特 權 命 令 狀 態 使 用SETUP 命 
令 也 可 進 入 此 狀 態。 這 時 可 通 過 對 話 方 式 對 路 由 器 進 行 設 置。 
三、 設 置 對 話 過 程 
利 用 設 置 對 話 過 程 可 以 避 免 手 工 輸 入 命 令 的 煩 瑣, 但 它 還 不 能 完 全 代 
替 手 工 設 置, 一 些 特 殊 的 設 置 還 必 須 通 過 手 工 輸 入 的 方 式 完 成。 
進 入 設 置 對 話 過 程 , 路 由 器 首 先 會 顯 示 一 些 提 示 信 息: 

---System Configuration Dialog--- 

At any point you may enter a question mark '?' for help. 
Use ctrl-c to abort configuration dialog at any prompt. 
Default settings are in square brackets '[]'. 
這 是 告 訴 你 在 設 置 對 話 過 程 中 的 任 何 地 方 都 可 以 鍵 入“ ?” 得 到 系 統 
的 幫 助, 按ctrl-c 可 以 退 出 設 置 過 程, 缺 省 設 置 將 顯 示 在'[]' 中。 然  路 
由 器 會 問 是 否 進 入 設 置 對 話: 

Would you like to enter the initial configuration dialog?[yes]: 


如 果 按y 或 回 車, 路 由 器 就 會 進 入 設 置 對 話 過 程。 首 先 你 可 以 看 到 各 端 
口 當 前 的 狀 況: 
First, would you like to see the current interface summary?[yes]: 
Any interface listed with OK? Value "NO" does not have a valid configuration 
Interface IP-Address OK? Nethod Status Protocol  
Ethernet0 unassigned NO unset up up  
Serial0 unassigned NO unset up up  
…… …… … …… … …  


然 , 路 由 器 就 開 始 全 局 參 數 的 設 置: 
Configuring global parameters: 

設 置 路 由 器 名: 
Enter host name [Router]: 

設 置 進 入 特 權 狀 態 的 密 文(secret), 此 密 文 在 設 置 以  不 會 以 明 文 方 式 
顯 示: 
The enable secret is a one-way cryptographic secret used instead of the enable password 
when it exists. 
-- Enter enable secret:cisco 

設 置 進 入 特 權 狀 態 的 密 碼(password), 此 密 碼 只 在 沒 有 密 文 時 起 作 用, 並 
且 在 設 置 以  會 以 明 文 方 式 顯 示: 
The enable password is used when there is no enable secret and when using older software 
and some boot images. 
-- Enter enable password: pass 

設 置 虛 擬 終 端 訪 問 葉 的 密 碼: 
-- Enter virtual terminal password: cisco 

詢 問 是 否 要 設 置 路 由 器 支 持 的 各 種 網 絡 協 議: 
-- Configure SNMP Network Management?[yes]: 
-- Configure DECnet?[no]: 
-- Configure AppleTalk?[no]: 
-- Configure IPX?[no]: 
-- Configure IP?[yes]: 
-- Configure IGRP routing?[yes]: 
-- Configure RIP routing?[no]: 
-- … … 

如 果 配 置 的 是 撥 號 訪 問 服 務 器, 系 統 還 會 設 置 異 步 口 的 參 數: 
-- Configure Async lines?[yes]: 
1) 設 置 線 路 的 最 高 速 度: 
-- Async line speed[9600]: 
2) 是 否 使 用 硬 件 流 控: 
-- Configure for HW flow control?[yes]: 
3) 是 否 設 置modem: 
-- Configure for modems?[yes/no]:yes 
4) 是 否 使 用 默 認 的modem 命 令: 
-- Configure for default chat script?[yes]: 
5) 是 否 設 置 異 步 口 的PPP 參 數: 
-- configure for Dial-in IP SLIP/PPP access?[no] 
6) 是 否 使 用 動 態IP 地 址: 
-- Configure for Dynamic IP addresses?[yes]: 
7) 是 否 使 用 缺 省IP 地 址: 
-- Configure Default IP addresses?[no]: yes 
8) 是 否 使 用TCP 頭 壓 縮: 
-- Configure for TCP Header Compression?[yes]: 
9) 是 否 在 異 步 口 上 使 用 路 由 表 更 新: 
-- Configure for routing updates on async links?[no]:y 
10) 是 否 設 置 異 步 口 上 的 其 它 協 議。 
接 下 來, 系 統 會 一 個 接 口 連 行 參 數 的 設 置。 

Configuring interface Ethernet0: 
1) 是 否 使 用 此 接 口: 
-- Is this interface in use?[yes]: 
2) 是 否 設 置 此 接 口 的IP 參 數: 
-- Configure IP on this interface?[yes]: 
3) 設 置 接 口 的IP 地 址: 
-- IP address for this interface:192.168.162.2 
4) 設 置 接 口 的IP 子 網 掩 碼: 
-- Number of bits in subnet field[0]: 
-- Class C network is 192.168.162.0, 0 subnet bits; maks is /24 
在 設 置 完 所 有 接 口 的 參 數 , 系 統 會 把 整 個 設 置 對 話 過 程 的 結 果 顯 
示 出 來: 
The following configuration command script was created: 
hostname Router 
enable secret 5 $1$W5Oh$6J7tIgRMBOIKVXVG53Uh1 
enable password pass 
… … … … 
請 注 意 在enable secret  面 顯 示 的 是 亂 碼, 而enable password  面 顯 示 的 是 
設 置 的 內 容。 
顯 示 結 束 , 系 統 會 問 是 否 使 用 這 個 設 置; 
Use this configuration?[yes/no]:yes 
如 果 回 答yes, 系 統 就 會 把 設 置 的 結 果 存 入 路 由 器 的NVRAM 中, 然  結 束 
設 置 對 話 過 程, 使 路 由 器 開 始 正 常 的 工 作。 

四、 常 用 命 令 
幫 助 
在IOS 操 作 中, 無 論 任 何 狀 態 和 位 置, 都 可 以 鍵 入“ ?” 得 到 系 統 的 幫 助。 

改 變 命 令 狀 態 
進 入 特 權 命 令 狀 態 enable  
退 出 特 權 命 令 狀 態 disable  
進 入 設 置 對 話 狀 態 setup  
進 入 全 局 設 置 狀 態 config terminal  
退 出 全 局 設 置 狀 態 end  
進 入 端 口 設 置 狀 態 interface type slot/number  
進 入 子 端 口 設 置 狀 態 interface type number. Subinter face 
[point-to-point|multipoint]  
進 入 線 路 設 置 狀 態 line type slot/number  
進 入 路 由 設 置 狀 態 router protocol  
退 出 局 部 設 置 狀 態 exit  




顯 示 命 令 
查 看 版 本 及 引 導 信 息 show version  
查 看 運 行 設 置 show running-config  
查 看 開 機 設 置 show startup-config  
顯 示 端 口 信 息 show interface type slot/number  
顯 示 路 由 信 息 show ip router  




拷 貝 命 令 
用 IOS 及CONFIG 的 備 份 和 升 級 
 

網 絡 命 令 
登 錄 遠 程 主 機 telnet hostname/IP address  
網 絡 偵 測 ping hostname/IP address  
路 由 跟 蹤 trace hostname/IP address  




基 本 設 置 命 令 
全 局 設 置 config terminal  
設 置 訪 問 用 戶 密 碼 username username password password  
設 置 特 權 密 碼 enable secret password  
設 置 路 由 器 名 hostname name  
設 置 靜 態 路 由 ip route destination subnet-mask next-hop  
啟 動IPX 路 由 ipx routing  
端 口 設 置 interface type slot/number  
設 置IP 地 址 ip address address subnet-mask  
設 置IPX 網 絡 ipx network network  
激 活 端 口 no shutdown  
物 理 線 路 設 置 line type number  
啟 動 登 錄 進 程 login [local|tacacs server]  
設 置 登 錄 密 碼 password password  
(http://www.fanqiang.com)
    進入【UNIX論壇

相關文章
Cisco路由器配置實例 --反轉多路復用的妙用 (2001-06-08 17:04:00)
Cisco路由器配置手冊 第六章 參考 (2001-05-02 00:20:04)
Cisco路由器配置手冊 第二章 廣域網協議設置 (2001-05-01 22:13:14)
Cisco路由器配置手冊 第三章 路由協議設置 (2001-05-01 22:06:13)
Cisco路由器配置手冊 第一章 預備知識 (2001-05-01 22:04:54)
Cisco路由器配置手冊 第五章 虛擬局域網(VLAN)路由 (2001-05-01 22:02:27)
Cisco路由器配置手冊 第四章 服務質量及訪問控制 (2001-05-01 21:57:01)
CISCO路由器配置基礎 (2001-04-19 15:42:48)
Cisco路由器配置教程 (2001-04-19 14:28:01)
 

★  樊強制作 歡迎分享  ★