四川羌族文化:Cisco路由器配置手册 第一章 预备知识 - fanqiang.com

来源:百度文库 编辑:偶看新闻 时间:2024/04/30 04:02:23

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)