Cisco 路由器的基本配置百余例
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
目录
1.用户通过 DDN 专线接入 ISP
2.远程用户拨号连入局域网
3.远程用户间对拨
4.Cisco HSRP 的配置
5.Cisco 2500
6.
路由器初始配置向导
7.ISDN
8.CISCO
9.Cisco 路由器寄存器配置
10.Cisco HSRP 的最新配置实录
11.Cisco router show interface e0
12.将 Cisco 路由器配成 X.25 交换机
13.策略路由配置实例
14.关于 Flash 格式化操作的尝试
15.关于定时访问列表的操作
16.show Intface 与 show ip intface 的操作
17.Cisco
18.
调试路由器做中继代理的小插曲
19.
调试路由器做中继代理的小插曲
20.Cisco As 5800 ppp_Authentication Config
21.Cisco 2621 adsl config
22.Cisco Catalyst 4003
23.AS 5300
24.Cisco
25.DHCP 配置
26.神奇恢复 Cisco 路由器口令
27.焊了几条 CONSOLE 线
28.网络配置与 IP 路由实例
29.用 Cisco 路由器实现异网路由
30.通信接口及调制解调器
31.Cisco 路由器 VOIP 设置命令详解
32.配置 Cisco 路由器中的 Modem
33.一份关于 EASE-IP 的配置
34.怎样实现路由器回拨电话
35.路由上配 trunk 全过程
36.CISCO7200 路由器 MultiChanne
37.3620 上同时配置了 8 个口 BRI 和 8 个内置 MODEM 用作拔入
38.BGP+Eigrp Configurition
39.3662+isdn pri 作为拨号服务器
40.ADSL
41.
基于源地址的策略路由
系列升级指南
拨号备份
路由器的一般配置与调试
路由器配置实例(反转多路复用的妙用
(1)
(2)
的第三层配置
配置实例
路由器基本配置命令
l 配置介绍
非固定IP配置
(new ver)
)
42.通过 Xmodem 升级 2610 的 IOS 实例 ( 02/4/3)
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
43.
44.
45.浅谈路由器的安全配置 ( 02/4/7)
46.路由器配成桥的实例 ( 02/4/7)
47.CISCO 2505 路由器 HUB 端口的安全性配置
48.Cisco ADSL 配置说明
49.Cisco 2620
50.Cisco
51.ISDN PRI DDR
52.ISDN
53.NAT 和 PAT 的应用配置
54.NT 下 Cisco 2620 拨号访问服务器的建立
55.show controller e1 命令详解
56.Cisco 路由器 Callback 配置示例
57.复杂的 VOIP 配置
58.关键业务数据包优先发送及其在 Cisco 路由器中的实现
59.广域网路由基本技术
60.解决 CISCO 路由器 Y2K 的快捷方法
61.
62.
63.
64.
65.
66.
67.
68.Call
69.张家口交通局及其收费站信息化案例
70.APPN 配置方法(包括 DLSW)
71.Cisco 2511 拨入配置
72.SNA 透过帧中继传输实例
73.通过 SSH 实现 Cisco 路由器登录
74.一个 Snapshot 配置的实例
75.一个典型的 PRI 信令落地网关的配置(基于 AS5300)
76.一个典型的 R2(中国一号 )信令上车网关的配置(基于 AS5300)
77.Cisco 路由器动态和静态地址转换
78.两端口路由器地址转换的例子
79.Cat 6509 NAT 实例
80.实战手记之高级 NAT( Checkpoint)
81.实战手记之 PPOE+NAT
82.代理服务器、路由器配置案例
83.配置 Cisco 路由器中的 Modem
84.Cisco
85.Cisco
VOIP
完整的
3640的VOIP
一个
Cisco2611
利用
IPSec -
配置
桥接技术巧解路由器配置IP问题
双机热备的全面配置示例
用路由器构建网络安全体系
远程异步登陆
路由器内的安全认证
Back
应用实例 (
路由器的配置与维护
路由器在
拨号备份的示例
路由器
路由器备份配置语句说明
UNIX
配置实例
路由器实现类
路由器到
Cisco
命令解析
AUX
02/4/7
02/4/7
配置 (
下的备份恢复和更新
163
PIX
防火墙
路由器
背对背 配置实例
)
)
拨号拨入、拨出功能
86.MPLS 配置实例
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
87.Tunnel
88.IP Sec VPN
89.STM-1 的配置及有关 SDH
90.透明桥的配置实例
91.VOIP 配置解析
92.CISCO7200 路由器 MultiChannel 配置介绍
93.Call Back
94.3550
95.3550 EMI DHCP
96.3640的CE1
97.3640 远程接入配置
98.Cisco 2500 远程接入服务器配置
99.Cisco 路由器安全基础
100.BGP 配置案例
101.Cisco 7010 与 5509 的 HSRP 配置实例
102.IP 路由协议的配置实例
103.7206 路由器升级
104.7500 路由器升级
105.7507
106.在IOS
107.Native IOS
的具体配置
配置实例
配置语句解析
配置清单
服务器配置
划分绑定及做3层
路由器内存升级
环境下配置
使用心得
DHCP服务(6500)
1.用户通过 DDN 专线接入 ISP
对于一个局域网的外连,有很多种方式 DDN 专线就是其中的一种(具体外连方式请见网络基础部分).在下
面的实例中介绍了蓝色家园内部局域网接入当地 ISP 的配置.
蓝色家园内部局域网:10.1.8.0/24
蓝色家园路由器的 Ethernet 0:10.1.8.1/24
Seri
al 0: 192.168.0.1/30
ISP 路由器 Serial 0: 192.168.0.2/30
具体拓扑图如下:
也许 Cisco 操作系统的玄虚性以及其在市场中的占有率,决定了人们对其技术的一种仰慕,甚
至想把自己的技术奋斗目标与 Cisco 绑定.但是,技术总归是技术,一切都是从头开始的.
下面给出蓝色家园路由器的基本配置
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
1.route>en 进入特权状态
2.route#config t 通过端口进行配置
3.在配置状态下
给出 E0/S0 的 IP 地址
#int e0/0
#ip add 10.1.8.1 255.255.255.0
#no shut
#int s0/0
#ip add 192.168.0.1 255.255.255.252
#en ppp (允许在专线上发送 ppp 包,如果不写,对于两端都是 C
isco 路由器是没问题的,会默认为 Cisco 自己的打包方式)
# no shut
4.给出蓝色家园到 ISP 的路由,因为蓝色家园只有一个出路,所以给出静态路由
#ip route 0.0.0.0 0.0.0.0 192.168.0.2
或者
#ip route 0.0.0.0 0.0.0.0 serial 0
5.为了保证远程管理的 Telnet 必须给出登陆用户
#line vty 0 4
#password bluegarden
6.Ctrl+Z 退出特权配置状态 wr 将配置写入路由器即可
当然以上只是一个基本配置,能够保证数据通道的畅通.但是并没有充分利用路由器的功能,
例如:NAT、安全等等。
下面给出一个完整的配置 with NAT(为了明确例子,广域网连接中的子网变成 192.168.1.0
/24)
hostname bluegarden
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
!
enable password bluegarden
!
no ip name-server
!
ip subnet-zero
no ip domain-lookup
ip routing
!
interface Ethernet 0
no shutdown
ip address 10.1.8.1 255.255.255.0
ip address 192.16.1.1 255.255.255.0
ip nat inside
!
interface Serial 0
no shutdown
ip address 192.168.1.2 255.255.255.0
ip nat outside
encapsulation hdlc
ip nat pool bluegarden 192.16.1.10 192.168.50 prefix-length 24
ip nat inside source list 1 pool bluegarden
router rip
version 2
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
network 10.1.8.0 255.255.255.0
passive-interface Serial 0
access-list 1 permit 10.1.8.0 0.0.0.255
!
ip classless
!
ip route 0.0.0.0 0.0.0.0 Serial 0
no ip http server
snmp-server community public RO
no snmp-server location
no snmp-server contact
!
line console 0
password bluegarden
login
!
line vty 0 4
password bluegarden
login
!
end
>Ctrl Z
#wr
对于远程用户拨入蓝色家园是远程用户共享家园的资源的很好方式,在下面的实例中介绍了远程用户拨入
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
的配置.
蓝色家园内部局域网:10.1.8.0/24
蓝色家园路由器的 Ethernet 0:10.1.8.1/24
hostname bluegarden
!
enable password bluegarden
username bluegarden password bluegarden
!
no ip name-server
!
ip subnet-zero
no ip domain-lookup
ip routing
!
interface Ethernet 0
no shutdown
ip address 10.1.8.1 255.255.255.0
!
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
interface Serial 0
no ip address
shutdown
!
interface Serial 1
no ip address
shutdown
!
interface Group-Async 1
no shutdown
ip unnumbered Ethernet 0(这样可以节省一个地址)
ip tcp header-compression passive
encapsulation ppp
async mode dedicated
group-range (端口范围)
ppp authentication chap
no cdp enable
peer default ip address pool bluegarden
!
router rip
version 2
network 10.1.8.0 255.255.255.0
no auto-summary
!
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
ip local pool bluegarden 10.1.8.10 10.1.8.50
ip classless
no ip http server
snmp-server community public RO
no snmp-server location
no snmp-server contact
!
line console 0
password bluegarden
login
!
line vty 0 4
password bluegarden
login
!
end
3.
远程用户间对拨
对于蓝色家园总部与分部之间通过两个路由器实现对拨,实现数据资源的互相交流.具体拓扑图及子网划分
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
情况如下:
蓝色家园总部局域网:10.1.8.0/24
E0: 10.1.8.1 255.255.255.0
蓝色家园分部局域网: 10.1.9.0/24
E0: 10.1.9.1 255.255.255.0
总部路由器配置
version 11.2
service udp-small-servers
service tcp-small-servers
!
hostname shanghai
!
enable secret bluegarden
!
username bluegarden password bluegarden
ip subnet-zero
no ip domain-lookup
!
interface Ethernet0
ip address 10.1.8.1 255.255.255.0
!
interface Serial0
no ip address
shutdown
!
interface Async1
no ip address
encapsulation ppp
async default routing
async mode dedicated
dialer in-band
dialer rotary-group 0
no cdp enable
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
!
interface Dialer0
ip unnumbered Ethernet0
ip tcp header-compression passive
encapsulation ppp
dialer in-band
dialer map snapshot 1 name Beijing 01055520089
dialer map ip 10.1.9.1 name Beijing broadcast 01055520089
dialer-group 1
snapshot server 5 dialer
no cdp enable
ppp authentication chap
!
router rip
version 2
network 10.1.8.0 255.255.255.0(如果不加掩码,则默认为 10.0.0.0)
no auto-summary
!
ip classless
dialer-list 1 protocol ip permit
!
line con 0
password Bluegarden
login
line vty 0 4
password Bluegarden
login
!
end
分部(北京)路由器设置
service udp-small-servers
service tcp-small-servers
!
hostname Beijing
!
enable secret Bluegarden
!
username Bluegarden password Bluegarden
ip subnet-zero
no ip domain-lookup
!
interface Ethernet0
ip address 10.1.9.1 255.255.255.0
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
!
interface Serial0
no ip address
shutdown
!
interface Async1
no ip address
encapsulation ppp
async default routing
async mode dedicated
dialer in-band
dialer rotary-group 0
no cdp enable
!
interface Dialer0
ip unnumbered Ethernet0
encapsulation ppp
dialer in-band
dialer map snapshot 1 name Shanghai 02155520089
dialer map ip 10.1.8.1 name Shanghai broadcast 02155520089
dialer-group 1
snapshot client 5 360 dialer
no cdp enable
ppp authentication chap
!
router rip
version 2
network 10.1.9.0 255.255.255.0
no auto-summary
!
ip classless
dialer-list 1 protocol ip permit
!
line con 0
password Bluegarden
login
line vty 0 4
password Bluegarden
login
!
end
4Cisco HSRP
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
version 12.0
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname r1
!
enable password cisco
!
ip subnet-zero
!
!
!
!
interface Ethernet0
ip address 136.147.107.101 255.255.0.0
no ip redirects
no ip directed-broadcast
standby 150 timers 5 15 /* 定义 150 组 5 秒交换一次 hello 信息,15 秒没收到 hello 信息就开始切换 */
standby 150 priority 110 /* 定义 150 组的主路由器权值,值越大,为主路由器希望越大 */
standby 150 preempt /* enable 150 组的 hsrp 抢占功能 */
standby 150 authentication cisco /* 设置 150 组的 router 身份验证串 */
standby 150 ip 136.147.107.100 /* 定义 150 组的浮动地址,也是这台 router 连接的网络的网关 */
standby 150 track Ethernet0 /* 定义监控的端口 */
!
interface Serial0
no ip address
no ip directed-broadcast
no ip mroute-cache
shutdown
no fair-queue
!
ip classless
!
!
的配置
line con 0
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
transport input none
line 1 16
line aux 0
line vty 0 4
password cisco
login
!
end
5.Cisco 2500
Cisco 2500
1,准备:
PC 机一台,安装网卡,TFTP 软件
PC 机一台,运行 WINDOWS 或 WIN95 仿真终端程序
2, 步骤:
① 设备连接:使用 Cisco 设备所带的 Console 线(黑色),连接 2500 的 Console 口
和 PC 机的 COM 口,使用 Cisco 设备所带的双绞线(灰色),连接 2500 的 AUI 口(需要
有 AUI-AJ45 的收发器)和 TFTP SERVER 的网卡 RJ-45 口 。
② 将升级软件拷贝至 TFTP SERVER 的相关目录下,启动 TFTP SERVER。
③ 在 PC 机上通过终端仿真方式进入 Cisco 2500 的控制台
系列升级指南
系列升级指南(使用
TFTP SERVER
)
在控制台方式下不要进入 AUTOINSTALL 方式,选择手动配置方式。
④ 在控制台状态下键入:
router>en {进入特
权模式}
router#sh flash all {记录 syst
em images 文
件名}
router#copy flash tftp {备份原有 sys
tem imag
es 到 tftp server}
按提示输入 TFTP SERVER 的 IP 地址
按提示输入 SYSTEM IMAGES 的文件名
router#conf t {进入
全局配置模式}
router(config)#config-reg 0x2101 {修改寄存器值为 210
1}
router(config)#interface e0 {进入以太口配置
模式
}
router(config-if)#ip address ##.##.##.## 255.255.255.0 {ip 地址应与 tft
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
p server ip 在同一网段}
router(config-if)#no shutdown {激活端口}
router(config-if)#^z
router#reload {重新加
载系统}
router(boot)>en
router(boot)#copy tftp flash {从 tftp ser
ver 升级
IOS 软件}
按提示输入 TFTP SERVER 的 IP 地址
按提示输入升级 IOS 源文件名
按提示输入升级 IOS 目标文件名
回车确认后,系统删除旧的 IOS,开始从 tftp server 向 router 传输新的 IOS 文
件.
传输完成后键入:
router(boot)#config t
router(boot)(config)#config-reg 0x2102 {将寄存器值改回 2
102}
router(boot)(config)#^z
router(boot)#reload
路由器初始配置向导
一、路由器开机初始序列
当路由器进行初始化时,路由器进行以下操作:
1)自 ROM 执行上电自检,检测 CPU,内存、接口电路的基本操作。
2)自 ROM 进行引导,将操作系统装下载到主存。
3)引导操作系统由配置寄存器的引导预确定由 FLASH 或网络下载,则配置文件的
boot system 命令确定其确切位置。
4)操作系统下载到低地址内存,下载后由操作系统确定路由器的工作硬件和软件
部分并在屏幕上显示其结果。
5)NVRAM 中存储的配置文件装载到主内存并通过执行,配置启动路由进程,提供接
口地址、设置介质特性。如果 NVRAM 中设有有效的配置文件,则进入 Setup 会话模
式。
6)然后进入系统配置会话,显示配置信息,如每个接口的配置信息。
二、Setup 会话
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
当 NVRAM 里没有有效的配置文件时,路由器会自动进入 Setup 会话模式。以后也可
在命令行敲入 Setup 进行配置。
Setup 命令是一个交互方式的命令,每一个提问都有一个缺省配置,如果用缺省
配置则敲回车即可。如果系统已经配置过,则显示目前的配置值。如果是第一次
配置,则显示出厂设置。当屏幕显示 "------ More ------",键入空格键继续;
若从 Setup 中退出,只要键入 Ctrl-C 即可。
1、Setup 主要参数:
配置它的一般参数,包括:
主机名 :hostname
特权口令 :enable password
虚终端口令 :virtual terminal password
SNMP 网管 :SNMP Network Management
IP :IP
IGRP 路由协议:IGRP Routing
RIP 路由协议 :RIP Routing
DECnet : DECnet . 等
其中 Console 的 secret、 password 的设置:
enable secret <string>
enable password <string>
Virtual Terminor 的 password 的设置:
Line vty <number>
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
Password <string>
Host name 的设置:
Hostname <string>
2、Setup 接口参数:
设置接口参数,如以太网口、TokenRing 口、同步口、异步口等。包括 IP 地址、子
网屏蔽、TokengRing 速率等。
3、Setup 描述:
在设置完以上参数后,该命令提示是否要用以上的配置,如果回答是"YES"则系统
会存储以上的配置参数,系统就可以使用了。
4、 Setup 相关命令:
Show config
write memory
write erase
reload
setup
5、路由器丢失 PASSWORD 的恢复
以下办法可以恢复:
enable secret password (适合 10。3(2)或更新的版本)
enable password
console password
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
通过修改 Configuration Register(出厂为 0x2102),使路由器忽略 PASSWORD,这
样就可以进入路由器,就可以看到 enable password 和 Console password,但 ena
ble secret password 以被加密,只能替换。可以进入的 configuration Registe
r 值为 0x142.
· 运行 password 恢复可能会使系统 DOWN 掉一个半小时;
· 将 Console terinal 连在路由器的 Console 口上,确认终端设置为 9600bps、8
Data bit 、No parity、1 stop bit;
· show version 显示 Configuration Register 0x2102;
· 关机再开,按"Ctrl+ Break",进入 ROM MONITOR 状态,提示符为">";
· 键入"> o/r 0x142",修改 Configuration Register 到 0x142,可以忽略原先的
password;
· 键入"> initialize",初始化路由器,等一段时间后,路由器会出现以下提示
:
"system configuration Diaglog ……"
Enter "NO"
提示"Press RETURN to get started!" ,Press "Enter"
· 进入特权模式
Router>enable
Router#show startup-config
这样就可以得到 password(enable&console password)
· 修改 password
"Router#config ter"
"Router(config)# enable secret cisco"
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
"Router(config)# enable password cisco1"
"Router(config)# line con 0"
"Router(config)# password cisco"
"Router(config)# config-register 0x2102"
"ctrl + Z"
"Router#copy running-config startup-config"
"reload"
· 以 password cisco 进入特权用户。
三、路由器配置
1)路由器模式
在 Cisco 路由器中,命令解释器称为 EXEC,EXEC 解释用户键入的命令并执行相应
的操作,在输入 EXEC 命令前必须先登录到路由器上。基于安全原因,EXEC 设置了
两个访问权限:用户级和特权级,用户级可执执行的命令是特权级命令的子集。
在特权级,可以使用:configuration,interface,subinterface,line,rout
er,router-map 等命令。
2)配置模式
使用 Config 命令可进入配置模式,进入该模式后,EXEC 提示用户可用的配置方式
如终端、NVRAM、网络三种,缺省是终端方式。
3)IP 路由协议模式
在配置模式下输入 Router 命令,可进入 IP 路由协议模式,可选的路由协议一般有
:bgp、egp、igrp、eigrp、rip 等动态路由和静态路由。
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
4)接口配置模式
在每一个端口上可以设置很多特性,接口配置命令修改以太网、令牌环网、FDDI
或同步、异步口等操作。
5)口令配置
可以采用口令来限制对路由器的访问,口令可以设定到具体的线路上或是特权E
XEC模式。
Line console 0 命令设置控制台终端口令
Line vty 0 命令设置 Telnet 虚终端口令
Enable-password 命令设置特权 EXEC 访问权限
6)路由器命名
在配置模式下用 hostname,如:
hostname RouterA
四、用户帮助提示
1、在用户提示符下键入?可以列出常用命令,通常有以下命令:
connect 打开一个中端连接
disconnect 关闭一个已有的 telnet 会话
enable 进入特权级
exit 退出 EXEC
help 交互求助系统描述
lock 终端锁定
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
login 以特定用户登录
logout 退出 EXEC
ping 发送 echo 信息
resume 恢复一个激活的 telnet 连接
show 显示正在运行的系统信息
systat 显示正在运行的系统信息
telnet 打开一个 telnet 连接
terminal 设置终端线路参数
where 列出激活的 telnet 连接
2、上下相关帮助
上下相关帮助包括:
符号转换 :键入命令有错时提示;
关键字完成 :键入命令字的一部分即可;
命令记忆 :可用" "调出以前的命令;
命令提示 :当命令记不完全时,可用"?"替代.
7.ISDN
拨号备份
ISDN
拨号备份
在本例中,网络使用一对二方式.其中一个远端 A 与 Internet 互连,中心点与另外一个远端 B 通过
该远端 A 连入 Internet. 并且三点之间内部互通.现三地之间用三台 Cisco 互连,能正常工作.但是现需要
备份中心点与两个远端之间的通信线路.
计划采用 ISDN 拨号备份.
ISDN Configuration Example - IP
Sample Configuration for C2503
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
C2503#wr t
######
Current configuration:
!
version 10.2
!
hostname C2503
!
enable password test
!
username C4000 password cisco (See username explanation in the followi
ng
section.)
isdn switch-type basic-dms100
!
interface Ethernet0
ip address 172.16.10.1 255.255.255.0
!
interface Serial0
no ip address
shutdown
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
!
interface Serial1
no ip address
shutdown
!
interface BRI0
ip address 172.16.20.1 255.255.255.0
encapsulation ppp
bandwidth 56
dialer idle-timeout 300
dialer map ip 172.16.20.2 name C4000 speed 56 broadcast 14155551234
dialer map ip 172.16.20.2 name C4000 speed 56 broadcast 14155556789
dialer hold-queue 5
dialer load-threshold 100
dialer-group 1
isdn spid1 408555432101 5554321
isdn spid2 408555987601 5559876
ppp authentication chap
!
router igrp 1
network 172.16.0.0
!
ip route 192.168.24.0 255.255.255.0 172.16.20.2
access-list 100 deny ip 0.0.0.0 255.255.255.255 255.255.255.255 0.0.0.
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
0
access-list 100 permit ip 0.0.0.0 255.255.255.255 0.0.0.0 255.255.255.
255
!
!
dialer-list 1 list 100
!
line con 0
line aux 0
line vty 0 4
password test
login
!
end
Explanation of C2503 Configuration
C2503#wr t
######
Current configuration:
!
version 10.2
!
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
hostname C2503
!
enable password test
!
username C4000 password cisco
The username "C4000" is the hostname of the remote router and is used
by the dialer map command below. The username is case sensitive and mu
st match the remote router's hostname exactly.
The password, which is used by the CHAP authentication process, is cas
e sensitive and must match the remote router's password exactly.
Note: To avoid confusion, the unencrypted form of the password cisco i
s shown in this sample configuration. In the actual configuration, the
password would appear in its encrypted form: 7 13061E010803, where 7
denotes the encryption type and 13061E010803 is the encrypted form of
the password cisco. When entering or making changes to the username co
mmand, always type the password in its unencrypted form and do not ent
er the encryption type (7). It is set automatically.
isdn switch-type basic-dms100
The ISDN switch type must match your carrier's equipment. If you chang
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
e the switch-type, you must reload the router for the new switch type
to take effect.
interface Ethernet0
ip address 172.16.10.1 255.255.255.0
interface Serial0
no ip address
shutdown
!
interface Serial1
no ip address
shutdown
!
interface BRI0
ip address 172.16.20.1 255.255.255.0
encapsulation ppp
PPP encapsulation is recommended over HDLC in order to allow the use o
f CHAP authentication.
bandwidth 56
The default bandwidth setting for a BRI interface is 64k. If you confi
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
gured your dialer map statements with the speed 56 option, you should
include the bandwidth statement.
Note: This command does not control the speed of your ISDN line. It se
ts the correct reference point for the BRI port's show interface stati
stics, for the dialer load-threshold command, and for IGRP/EIGRP routi
ng metrics.
dialer idle-timeout 300
This command sets the number of seconds the ISDN connection will remai
n open if no interesting traffic is being routed. The timer is reset e
ach time an interesting packet is forwarded.
dialer map ip 172.16.20.2 name C4000 speed 56 broadcast 14155551234
dialer map ip 172.16.20.2 name C4000 speed 56 broadcast 14155556789
The dialer map command is used with CHAP authentication to place the i
nitial call to the remote router when interesting traffic is forwarded
to the BRI interface. Once the connection is active, the dialer idle-
timeout command determines how long it will remain active. A dialer ma
p statement is required for each ISDN phone number that will be called
. Be aware though, that two dialer map statements pointing to the same
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
location might activate both B channels when you may only want to use
one channel.
Note: The command parameters for this example are:
172.16.20.2 = the IP address of the remote router's BRI interface. To
determine this address, type show interface bri 0 at the remote router
's console prompt.
name C4000 = the hostname of the remote router. The name is case sensi
tive and should match the name configured for the username command abo
ve.
speed 56 = sets the dialer speed to 56k for ISDN circuits that are not
64k end-to-end, and should be included in both routers' dialer map st
atements. Most installations in North America must be configured for 5
6K.
broadcast = allows the forwarding of broadcast packets. Unless broadca
st packets are specified as interesting packets by the dialer-list com
mand, they will only be forwarded when the ISDN link is active.
14155551234
14155556789 = the remote router's ISDN telephone numbers.
dialer hold-queue 5
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
This command allows interesting packets to be queued until the ISDN co
nnection is established. In this example, five interesting packets wil
l be queued.
dialer load-threshold 100
This command is used to configure bandwidth on demand by setting the m
aximum load before the dialer places another call through the second B
channel. The load is the calculated weighted average load
he interface, where 1 is unloaded and 255 is fully loaded. The actual
load
value
particular network. In this example, the second B channel will be act
ivated when the load reaches 39% of maximum utilization, which is 100
divided by 255.
dialer-group 1
you should configure depends on the characteristics of your
value
for t
The dialer-group 1 command enables the dialer-list 1 on the BRI interf
ace, which determines which packets will be interesting and activate t
he ISDN connection.
isdn spid1 408555432101 5554321
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
isdn spid2 408555987601 5559876
The isdn spid commands are used if your carrier assigns spids to your
ISDN lines.
ppp authentication chap
This command enables CHAP authentication.
router igrp 1
network 172.16.0.0
ip route 192.168.24.0 255.255.255.0 172.16.20.2
This IP route command creates a static route to the remote router's ne
twork via the remote router's BRI interface. This is required because
dynamic routes are lost when the ISDN link is down.
Note: The command parameters for this example are:
192.168.24.0 = the target network.
255.255.255.0 = the target network mask. A 255 in an octet's position
specifies an exact match for that octet is required, anda0inanoct
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
et's position specifies any
172.16.20.2 = the address of the next hop that can be used to reach th
e target network.
access-list 100 deny ip 0.0.0.0 255.255.255.255 255.255.255.255 0.0.0.
0
access-list 100 permit ip 0.0.0.0 255.255.255.255 0.0.0.0 255.255.255.
255
value
will match.
This access list determines which IP packets will be interesting and a
ctivate the ISDN link. The access-list you should create depends on yo
ur particular network design.
Note: The command parameters for this example are:
access-list 100 deny ip 0.0.0.0 255.255.255.255 255.255.255.255 0.0.0.
0
defines all broadcast packets as uninteresting.
access-list 100 permit ip 0.0.0.0 255.255.255.255 0.0.0.0255.255.255.2
55
defines all other IP packets as interesting.
dialer-list 1 list 100
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
This command points to access-list 100, which determines which IP pack
ets will be interesting.
line con 0
line aux 0
line vty 0 4
password test
login
!
end
Sample Configuration for C4000
C4000#wr t
######
Current configuration:
!
version 10.2
!
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
hostname C4000
!
enable password test
!
username C2503 password cisco (See username explanation in the followi
ng
section.)
isdn switch-type basic-dms100
!
interface Ethernet0
ip address 192.168.24.65 255.255.255.0
!
interface Serial0
no ip address
shutdown
!
interface Serial1
no ip address
shutdown
!
interface BRI0
ip address 172.16.20.2 255.255.255.0
encapsulation ppp
bandwidth 56
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
dialer idle-timeout 300
dialer map ip 172.16.20.1 name C2503 speed 56 broadcast 14085554321
dialer map ip 172.16.20.1 name C2503 speed 56 broadcast 14085559876
dialer hold-queue 5
dialer load-threshold 100
dialer-group 1
isdn spid1 415555123401 5551234
isdn spid2 415555678901 5556789
ppp authentication chap
!
router igrp 1
network 172.16.0.0
network 192.168.24.0
!
ip route 172.16.10.0 255.255.255.0 172.16.20.1
access-list 100 deny ip 0.0.0.0 255.255.255.255 255.255.255.255 0.0.0.
0
access-list 100 permit ip 0.0.0.0 255.255.255.255 0.0.0.0 255.255.255.
255
!
!
dialer-list 1 list 100
!
line con 0
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
line aux 0
line vty 0 4
password test
login
!
end
Explanation of C4000 Configuration
C4000#wr t
######
Current configuration:
!
version 10.2
!
hostname C4000
!
enable password test
!
username C2503 password cisco
The username "C2503" is the hostname of the remote router and is used
by the dialer map command below. The username is case sensitive and mu
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
st match the remote router's hostname exactly.
The password, which is used by the CHAP authentication process, is cas
e sensitive and must match the remote router's password exactly.
Note: To avoid confusion, the unencrypted form of the password cisco i
s shown in this sample configuration. In the actual configuration, the
password would appear in its encrypted form: 7 13061E010803, where 7
denotes the encryption type and 13061E010803 is the encrypted form of
the password cisco. When entering or making changes to the username co
mmand, always type the password in its unencrypted form and do not ent
er the encryption type (7). It is set automatically.
isdn switch-type basic-dms100
The ISDN switch type must match your carrier's equipment. If you chang
e the switch-type you must reload the router for the new switch type t
o take effect.
interface Ethernet0
ip address 192.168.24.65 255.255.255.0
interface Serial0
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
no ip address
shutdown
!
interface Serial1
no ip address
shutdown
!
interface BRI0
ip address 172.16.20.2 255.255.255.0
encapsulation ppp
PPP encapsulation is recommended over HDLC in order to allow the use o
f CHAP authentication.
bandwidth 56
The default bandwidth setting for a BRI interface is 64k. If you confi
gured your dialer map statements with the speed 56 option, you should
include the bandwidth statement.
Note: This command does not control the speed of your ISDN line. It se
ts the correct reference point for the BRI port's show interface stati
stics, for the dialer load-threshold command, and for IGRP/EIGRP routi
ng metrics.
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
dialer idle-timeout 300
This command sets the number of seconds the ISDN connection will remai
n open if no interesting traffic is being routed. The timer is reset e
ach time an interesting packet is forwarded.
dialer map ip 172.16.20.1 name C2503 speed 56 broadcast 14085554321
dialer map ip 172.16.20.1 name C2503 speed 56 broadcast 14085559876
The dialer map command is used with CHAP authentication to place the i
nitial call to the remote router when interesting traffic is forwarded
to the BRI interface. After the connection is active, the dialer idle
-timeout command determines how long it will remain active. A dialer m
ap statement is required for each ISDN phone number that will be calle
d. Be aware though, that two dialer map statements pointing to the sam
e location might activate both B channels when you may only want to us
e one channel.
Note: The command parameters for this example are:
172.16.20.1 = the IP address of the remote router's BRI interface. To
determine this address, type show interface bri 0 at the remote router
's console prompt.
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
name C2503 = the hostname of the remote router. The name is case sensi
tive and should match the name configured for the username command abo
ve.
speed 56 = sets the dialer speed to 56k for ISDN circuits that are not
64k end-to-end, and should be included in both routers' dialer map st
atements. Most installations in North America must be configured for 5
6K.
broadcast = allows the forwarding of broadcast packets. Unless broadca
st packets are specified as interesting packets by the dialer-list com
mand, they will only be forwarded when the ISDN link is active.
14085554321
14085559876 = the remote router's ISDN telephone numbers.
dialer hold-queue 5
This command allows interesting packets to be queued until the ISDN co
nnection is established. In this example, five interesting packets wil
l be queued.
dialer load-threshold 100
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
This command is used to configure bandwidth on demand by setting the m
aximum load before the dialer places another call through the second B
channel. The load is the calculated weighted average load
he interface, where 1 is unloaded and 255 is fully loaded. The actual
load
value
particular network. In this example, the second B channel will be act
ivated when the load reaches 39% of maximum utilization, which is 100
divided by 255.
dialer-group 1
The dialer-group 1 command enables the dialer-list 1 on the BRI interf
you should configure depends on the characteristics of your
value
for t
ace, which determines which packets will be interesting and activate t
he ISDN connection.
isdn spid1 415555123401 5551234
isdn spid2 415555678901 5556789
The isdn spid commands are used if your carrier assigns spids to your
ISDN lines.
ppp authentication chap
This command enables CHAP authentication.
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
router igrp 1
network 172.16.0.0
network 192.168.24.0
ip route 172.16.10.0 255.255.255.0 172.16.20.1
This ip route command creates a static route to the remote router's ne
twork via the remote router's BRI interface. This is required because
dynamic routes are lost when the ISDN link is down.
Note: The command parameters for this example are:
172.16.0.0 = the target network.
255.255.0.0 = the target network mask. A 255 in an octet's position sp
ecifies an exact match for that octet is required, anda0inanoctet
's position specifies any
value
will match.
172.16.20.1 = the address of the next hop that can be used to reach th
e target network.
access-list 100 deny ip 0.0.0.0 255.255.255.255 255.255.255.255 0.0.0.
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
0
access-list 100 permit ip 0.0.0.0 255.255.255.255 0.0.0.0 255.255.255.
255
This access list determines which IP packets will be interesting and a
ctivate the ISDN link. The access-list you should create depends on yo
ur particular network design.
Note: The command parameters for this example are:
access-list 100 deny ip 0.0.0.0 255.255.255.255 255.255.255.255 0.0.0.
defines all broadcast packets as uninteresting.
access-list 100 permit ip 0.0.0.0 255.255.255.255 0.0.0.0 255.255.255.
255
defines all other IP packets as interesting.
dialer-list 1 list 100
This command points to access-list 100, which determines which IP pack
ets will be interesting.
line con 0
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
line aux 0
line vty 0 4
password test
login
!
end
---
备份的话,用静态路由足矣!下面是我公司在北京的工程配置:Current config
uration:
!
version 11.3
service timestamps debug uptime
service timestamps log uptime
service password-encryption
!
hostname feihua
!
enable secret 5 $1$011Y$UBLyBOlDTa6ZKRnMnoyU0.
enable password 7 011F0F110A5A565B
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
!
username feihua password 7 141B1B1E5D557A7F
username jianhua1 password 7 00081A13550A5B52
no ip source-route
isdn switch-type basic-net3
!
!
!
interface Ethernet0
ip address 10.10.0.1 255.255.255.0
!
!
interface Serial0
backup delay 5 30
backup interface BRI0
ip address 10.10.10.1 255.255.255.0
!
interface Serial1
no ip address
shutdown
!
interface BRI0
ip address 10.10.20.1 255.255.255.0
encapsulation ppp
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
dialer idle-timeout 300
dialer map ip 10.10.20.2 name jianhua1 broadcast 86521075
dialer load-threshold 128 outbound
dialer-group 1
isdn switch-type basic-net3
ppp authentication chap
ppp multilink
hold-queue 75 in
!
ip classless
ip route 10.10.1.0 255.255.255.0 10.10.10.2
ip route 10.10.1.0 255.255.255.0 10.10.20.2
ip route 10.10.2.0 255.255.255.0 10.10.10.2
ip route 10.10.2.0 255.255.255.0 10.10.20.2
!
dialer-list 1 protocol ip permit
!
line con 0
line aux 0
line vty 0
password 7 045702135E701C1A
login
line vty 1 4
login
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
!
end
被叫端的配置:(建国门广发证券)
urrent configuration:
!
version 11.3
service timestamps debug uptime
service timestamps log uptime
service password-encryption
!
hostname jianhua1
!
enable secret 5 $1$011Y$UBLyBOlDTa6ZKRnMnoyU0.
enable password 7 011F0F110A5A565B
!
username feihua password 7 141B1B1E5D557A7F
username jianhua1 password 7 00081A13550A5B52
no ip source-route
isdn switch-type basic-net3
!
!
!
interface Ethernet0
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
ip address 10.10.1.1 255.255.255.0
!
!
interface Serial0
ip address 10.10.10.2 255.255.255.0
!
interface Serial1
no ip address
shutdown
!
interface BRI0
ip address 10.10.20.2 255.255.255.0
encapsulation ppp
dialer idle-timeout 300
dialer map ip 10.10.20.1 name feihua broadcast
dialer load-threshold 128 outbound
dialer-group 1
isdn switch-type basic-net3
ppp authentication chap
ppp multilink
hold-queue 75 in
!
ip classless
ip route 10.10.0.0 255.255.255.0 10.10.10.1
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
ip route 10.10.0.0 255.255.255.0 10.10.20.1
ip route 10.10.2.0 255.255.255.0 10.10.1.2
!
dialer-list 1 protocol ip permit
!
line con 0
line aux 0
line vty 0
password 7 045702135E701C1A
login
line vty 1 4
login
!
end
8.CISCO 路由器的一般配置与调试
CISCO 路由器的一般配置与调试
-
-路由器是计算机网络的桥梁,通过它不仅可以连通不
同的网络,还能选择数据传送的路经,并能阻隔非法的访
问。路由器的配置对初学者来说,并不是件容易的事。现
将路由器的一般配置和简单调试介绍给大家,供朋友
们在配置路由器时参考。
---- 一 . CISCO2501、2522硬件结构
---- CISCO 2501有一个Ethernet 网 口(AUI), 一 个 Console 口(RJ45), 一 个
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
AUX 口(RJ45),和两个同步串口,支持DTE和DCE设备;支持EIA/TI
A-232、 EIA/TIA-449、 V.35 、X.21 和 EIA-530 接 口。
---- CISCO 2522有一个Ethernet 网 口(AUI), 一 个 ISDN BRI 口, 一 个 Consol
e 口(RJ45), 一 个 AUX 口(RJ45),两个高速同步串口,8个同步
/异步底速口,支持DTE和DCE设备;支持EIA/TIA-232 、EIA/TIA-449、 V.
35 X.21 和 EIA-530 接 口。
----二.配置
----1.配置以太网(Enthernet) 端 口
# conf t
从终端配置路由器。
# int e0
指定 E0 口。
# ip addr ABCD XXXX
ABCD 为以太网地址,XXXX 为子网掩码。
# ip addr ABCD XXXX secondary
E0 口同时支持两个地址类型。如果第一个
为 A 类地址,则第二个为 B 或 C 类地址。
# no shutdown
激活 E0 口。
# exit
2.X.25 的配置
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
# conf t
# int S0
指定 S0 口.
# ip addr ABCD XXXX
ABCD 为以太网 S0 的 IP 地址,XXXX 为子网掩码.。
# encap X25-ABC
封装 X.25 协议。ABC 指定 X.25 为 DTC 或 DCE 操作,缺省为 DTE。
# x25 addr ABCD
ABCD 为 S0 的 X.25 端口地址,由邮电局提供。
# x25 map ip ABCD XXXX br
映射的 X.25 地址.ABCD 为对方路由器(如:S0)的
IP 地址,XXXX 为对方路由器(如:S0)的 X.25 端口地址。
# x25 htc X
配置最高双向通道数.X 的取值范围 1-4095,
要根据邮电局实际提供的数字配置。
# x25 nvc X
配置虚电路数。X 不可超过据邮电局实际
提供的数,否则,将影响数据的正常传输。
# exit
----3.专线的配置
# conf t
# int S2
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
指定 S2 口。
# ip addr ABCD XXXX
ABCD 为 S2 的 IP 地址,XXXX 为子网掩码。
# exit
4.帧中继的配置
# conf t
# int s0
# ip addr ABCD XXXX
ABCD 为 S0 的 IP 地址,XXXX 为子网掩码。
# encap frante_relay
封装 frante_relay 协议。
# no nrzi_encoding
NRZI=NO
# frame_relay lmi_type q933a
LMI 使用 Q933A 标准.LMI(Local management
Interface)有 3 种:ANSI:T1.617;CCITTY:Q933A 和 CISCO 特有的标准。
# fram-relay intf-typ ABC
ABC 为帧中继设备类型,它们分别是 DTE 设备,
DCE 交换机或 NNI(网络接点接口)支持。
# frame_relay interface_dlci 110 br
配置 DLCI(数据链路连接标识符)。
# frame-relay map ip ABCD XXXX broadcast
建立帧中继映射。ABCD 为对方
ip 地址,XXXX 为本地 DLCI 号,broadcast
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
允许广播向前转发或更新路由。
# no shutdown
激活本端口.
# exit
----5.帧中继子接口的配置
# conf t
# int s0.1 point-to-point
对应 S0 的子接口 1,点对点方式。
# ip addr ABCD XXXX
ABCD 为子口 1 的 IP 地址,XXXX 为子网掩码。
# frame-relay intreface-dlci 100 br
6.配置拨号备份
(1).配置备份主口
# conf t
# int s0
S0 为主口.
# backup int asy 1
A1 口为备份口.
# backup delay 0 1
延时 1 秒.
(2).配置虚拟接口
# conf t
# ip addr ABCD XXXX
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
ABCD 为虚拟接口 IP 地址,XXXX 为子网掩码。
# encap ppp
封装 ppp 协议.
# dialer in-band
激活随叫随拨功能.
# dialer idle-timeout 7200
# dialer map ip ABCD modem-script call
broadcast 6225481 br 映射对应的拨号口.
ABCD 为对方拨号口的 ip 地址,6225481 为对应的电话号码。
# dialer_group 1 定义拨号组成员.
(3).配置防火墙
# dialer_list 1 pro ip permit
允许 ip 协议通过。
(4).配置连接口令
# user name ABCD pass XXXX
ABCD 为对方主机名,XXXX 为连接口令.
(5).配置拨号字符串
# conf t
# chat-script call ABORT BUSY ABORT ERROR"" atdt
6335481 TIMEOUT 45 "CONNECT"
6335481 为对方电话号码。
(6).配置拨号连接密码
# conf t
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
# username ROU1 pass XXXX
ROU1 为对方路由器名,XXXX 为连接密码。
(7).配置线路
# conf t
# line aux 0
# modem inout
MODEM 双向传输。
# modem autoconfigure discovery
# transport input all
# rxspeed 51200
MODEM 的收发速率为 51200。
# txspeed 51200
# exit
7.配置同步/异步口 (适用于 2522)
# conf t
# int s2
# ph asyn
配置 S2 为异步口.
# ph sync
配置 S2 为同步口.
8.动态路由的配置
# conf t
# router eigrp 20
使用 EIGRP 路由协议。常用的路由协议有 RIP,IGRP,IS-IS 等。
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
# passive-interface serial0
若 S0 与 X.25 相连,则输入本条指令。
# passive-interface serial1
若 S1 与 X.25 相连,则输入本条指令。
# network ABCD
ABCD 为本机的以太网地址。
# network XXXX
XXXX 为 S0 的 ip 地址。
# no auto-summary
# exit
9.静态路由的配置
# ip router ABCD XXXX YYYY 90
ABCD 为对方路由器的以太网地址;XXXX
为子网掩码.;YYYY 为对方对应的广域网端口地址。
# dialer-list 1 protocol ip permail
10.备份配置文件到硬盘
# copy run tftp
在硬盘上建立一个空文件且有读写权限,才能备份成功.
11.恢复备份配置文件到路由器
# copy tftp run
12.在路由器上建一个备份
# copy run start
路由器的配置参数较多,可根据实际需要增减,
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
限于篇幅,本文仅给出了一般的常用配置。
----三.调试
---- 1.首先将路由器的Etherne
t口和所有要使用的串口都激活,方法是进入该口,执行
No Shutdown。
---- 2.将和路由器相连的主机加上缺省路由
(中心路由器的Ethernet 地 址),方法是在UNI
X系统的超级用户下执行:router add defaule XXXX 1(XXX
X为路由器的E
0口地址) 。每台主机都要加缺省路由,否则,将不能正常
通讯。
---- 3. Ping本机的路由器Ethernet 网 口( 若 不 通:(1)Ethetne
t网口没有激活(2)不在一个网上)、广域网口
(若不通:没有加缺省路由),对方广域网口
(若不通:路由器配置错误)、路由器Ethernet 网 口
(若不通:路由器配置错误)、主机Ethernet 网 口
(若不通:对方主机没有加缺省路由)。
---- 4.在专线卡(X.25)主机上加网关(静态路由),方法是在
UNIX系统的超级用户下执行:router add X.X.X.X Y.Y.Y.Y 1。 X.X.X.
X为对方Ethernet 网 地 址;Y.Y.Y.Y为对方广域网地址。
---- 5. 使 用 Tracert 对 路 由 进行跟踪,以确定不通网段。
9.Cisco
路由器寄存器配置
Cisco
路由器寄存器配置
配置目的:寄存器配置用于更改路由器启动过程。
启动位由 4 位 16 进制寄存器组成
格式:0xABCD
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
赋值范围从 0x0 到 0xFFFF
0x2102 :工业默认值
0x2142 :从 FLASH 中启动,但不使用 NVRAM 中的配置文件(用于口令恢复)
0x2101 :从 Boot RAM 中启动,应用于更新系统文件
0x2141 :从 Boot RAM 中启动,但不使用 NVRAM 中的配置文件
其中 C 位的第三位为 1 时表示关闭 Break 键,反之表示打开 Break 键。
0x141:表示关闭 Break 键,不使用 NVRAM 中的配置文件,并且从系统默认的 ROM 中
的系统中启动。
0x0040:表示允许路由气读取 NVRAM 中的配置文件。
监视命令功能
o:以位的形式显示实际配置的当前起作用的寄存器,
o Displays the virtual configuration register, currently in effect, wi
th a description of the bits
o/r:重置实际配置的寄存器为以下值:
?9600 (端口速率)
?Break 是否有效
?是否忽略 NVRAM 中的配置
?是否从 ROM 中启动
如:o/r 0x2102
表 B-1 寄存器配置定义表
位顺序 十六进制 意义
00 to 03 0x0000 to 0x000F 启动字段
06 0x0040 使得系统软件忽略 NVRAM 中的内容
07 0x0080 OEM 位开启
08 0x0100 Break 键关闭
10 0x0400 IP 广播到所有域
11 to 12 0x0800 to 0x1000 Console 口速率
13 0x2000 如果网络启动失败,默认从 ROM 中启动
14 0x4000 IP broadcasts do not have net numbers
15 0x8000 启动诊断信息同时忽略 NVRAM 内容
(1)工业默认寄存器位 0x2102。这个只有以下几个部分组成
bit 13 = 0x2000, bit 8 = 0x0100, and bits 00 到 03 (参照 TableB-2) = 0
x0002.
表 B-2 启动为注视 (配置寄存器位 00 到 03)
启动位的意义
0x0:启动后停留在 bootstrap 状态
0x1:从 ROM 中启动
0x2 到 0xF:指定默认的启动文件启动系统,
表 B-3 Console 口速率设定表
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
速率 12 位 11 位
9600 0 0
4800 0 1
1200 1 0
2400 1 1
10.Cisco HSRP
Cisco HSRP( 双机热备份)的配置
以创建一个具有虚拟 MAC 地址和虚拟 IP 地址的虚拟路由器。
0/0 的 IP 地址为 192.168.2.1/24 对应外部网络是 192.168.2.0/24。
0/0 的 IP 地址为 192.168.3.1/24 对应外部网络是 192.168.3.0/24。
器。其中给出 Bluestudy A 的优先级为 120,而 Bluestudy B 采用默认优先级 100,这样就可以使 Blues
tudy A 成为主路由器。
的最新配置实录
Cisco 的热备份路由协议(HSRP)可以在工作站 A 的确省网关失效时提供一个备份路由器,HSRP 可
假设有两个路由器 Bluestudy A 和 Bluestudy B,通过两路指向路由器 Bluestudy C:
对于 Bluestudy A,假设 E0/0 的 IP 地址为 192.168.1.1/24 对应内部网络是 192.168.1.0/24 S
对于 Bluestudy B,假设 E0/0 的 IP 地址为 192.169.1.2/24 对应内部网络是 192.168.1.0/24 S
虚拟 IP 地址为 192.168.1.3/24
对于 Bluestudy C,因与本实验无太大联系,暂时不做说明。
下面给出两只路由器的配置,其中将 Bluestudy A 作为主路由器,Bluestudy B 作为备份路由
Bluestudy A:
Interface ethernet0/0
Ip address 192.168.1.1 255.255.255.0
No ip redirects
Standby 1 priority 120
Standby 1 preempt
Standby 1 ip 192.168.1.3
!
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
interface serial0/0
ip address 192.168.2.1 255.255.255.0
no shut
!
router igrp 100
network 192.168.1.0
network 192.168.2.0
Bluestudy B:
Interface ethernet0/0
Ip address 192.168.1.2 255.255.255.0
Standby 1 preempt
Standby 1 ip 192.168.1.3
!
interface serial0/0
ip address 192.168.3.1 255.255.255.0
no shut
!
router igrp 100
network 192.168.1.0
network 192.168.3.0
只要将相应的下连主机的网关设成 192.168.1.3 就可以了.
如上是 Cisco 的双机热备份配置,如有疑问可以与站长联系共同探讨。
11.Cisco router show interface e0
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
cisco#show interface Ethernet 0
M 作 者: rootstock(根本) 2001-05-13 22:55:51 :0 :0
cisco#show interface Ethernet 0
Ethernet0 is up, line protocol is up
Hardware is QUICC Ethernet, address is 0060.5cbc.1b93 (bia 0060.5cbc.1b93)
Description: Test Router, Ethernet port: 8
Internet address is 10.0.0.7/24
MTU 1500 bytes, BW 10000 Kbit, DLY 1000 usec, rely 255/255, load 1/255
Encapsulation ARPA, loopback not set, keepalive set (10 sec)
ARP type: ARPA, ARP Timeout 04:00:00
Last input 00:00:00, output 00:00:00, output hang never
Last clearing of "show interface" counters never
Queueing strategy: fifo
Output queue 0/250, 0 drops; input queue 1/250, 0 drops
30 second input rate 0 bits/sec, 0 packets/sec
30 second output rate 0 bits/sec, 0 packets/sec
47559 packets input, 48618089 bytes, 18 no buffer
Received 748 broadcasts, 0 runts, 66 giants, 75 throttles
75 input errors, 1 CRC, 8 frame, 0 overrun, 0 ignored, 0 abort
0 input packets with dribble condition detected
35849 packets output, 3045332 bytes, 0 underruns
36 output errors, 687 collisions, 1 interface resets
0 babbles, 0 late collision, 72 deferred
0 lost carrier, 0 no carrier
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
0 output buffer failures, 0 output buffers swapped out
- DLY: 接口的延时,单位是微秒
- rely: 接口的可信任度 (255/255 是 100 可信任), 取值为 5 minutes.内
- keepalive: 标示 keepalives 的设置情况
-Last input: 最后成功进入接口的数据包. 可以帮你了解接口什么时候出现了问题
- Last output: Same as "Last input"
- no buffers: 因为没有 buffer 而丢失的数据包的数量,以太网上的广播常导至这种事.
- runts: 这个数字的意思就是因为数据包因为太小,小于 Ethernet = 64 bytes min
imum.,所以被丢弃。
- giants: 这个意思就是太大了,大于最大的 Ethernet=1518 bytes 的限制,所以要丢
弃
- CRC: Cyclic redundancy checksum , 如果从 LAN 接收的数据包和 checksum 的计算
不匹配,说明这个接口的误码或者传输问题。如果 CRC 的数值很好,说明工作站之间的数据传输有很多坏
的数据包,每一百万 bytes 中有一个 CRC 就应该考虑是否有问题了
- frame: 接收到不正确的有 CRC 错误数据包的数量和一个非整数的八位位组,在一个 LAN,
这显示有冲突或者以太网设备有故障
- overrun: 因为输入速率超过接收硬件的能力,以致接收硬件不能处理数据到硬件缓冲的
次数。
- interface resets: 接口重新复位的次数,如果数据包以经列了队,但几次都没有传出
去。但如果接口是一个 looped back 接口,或者关闭,也会导致 resets 数值的增加
12. 将 Cisco 路由器配成 X.25 交换机
:CISCO 的路由器能不能做 X.25 交换机?象 FR 一样。
可以, 例子
Current configuration:
!
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
version 11.3
no service password-encrption
!
hostname x25-switch
!
!
x25 routing
!
!
interface Ethernet 0/0
no ip address
shutdown
no lat enabled
!
interface Serial 1/0
no ip address
encapsulation x25 dce
no ip mroute-cache
clockrate 64000
!
interface Serial 1/1
no ip address
encapsulation x25 dce
no ip mroute-cache
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
clockrate 64000
!
!
ip classless
!
x25 route 311082194567 interface Serial 1/0
x25 route 311082191234 interface Serial 1/1
!
line con 0
line aux 0
line vty 0 4
login
!
end
13. 策略路由配置实例
Cisco 基于策略路由的配置实例
问题描述
您可以定义自己的规则来进行数据包的路由而不仅仅由目的地地址所决定。在这里
您可以学到怎么使用基于策略路由的办法来解决这一问题。
在具体的应用中,基于策略的路由有:
☆ 基于源 IP 地址的策略路由
☆ 基于数据包大小的策略路由
☆ 基于应用的策略路由
☆ 通过缺省路由平衡负载
这里,讲述了第一种情况的路由策略。
举例
在这个例子中,防火墙的作用是:把 10.0.0.0/8 内部网地址翻译成可路由的 172.16
.255.0/24
子网地址。
下面的防火墙配置是为了完整性而加进去的,它不是策略路由配置所必需的。在这
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
里的防火墙可以被其它类似的产品代替,如
配置如下:
!
ip nat pool net-10 172.16.255.1 172.16.255.254 prefix-length 24
ip nat inside source list 1 pool net-10
!
interface Ethernet0
ip address 172.16.20.2 255.255.255.0
ip nat outside
!
interface Ethernet1
ip address 172.16.39.2 255.255.255.0
ip nat inside
!
router eigrp 1
redistribute static
network 172.16.0.0
default-metric 10000 100 255 1 1500
!
ip route 172.16.255.0 255.255.255.0 Null0
access-list 1 permit 10.0.0.0 0.255.255.255
!
end
在我们的例子中,
P
数据包被发送到防火墙去。配置中定义了两条
10.0.0.0/8
。而第二条规则允许所有的其它数据包能按正常路由。这里的 Cisco WAN 路由器的配置如
下:
网络来的IP数据包被发送到防火墙去(我们很快会看到这里的配置有问题)
!
interface Ethernet0/0
ip address 172.16.187.3 255.255.255.0
no ip directed-broadcast
!
interface Ethernet0/1
ip address 172.16.39.3 255.255.255.0
no ip directed-broadcast
!
interface Ethernet3/0
ip address 172.16.79.3 255.255.255.0
no ip directed-broadcast
ip policy route-map net-10
!
router eigrp 1
Cisco WAN
路由器上运行策略路由来保证从
PIX
或其它类似防火墙设备。这里的防火墙的
10.0.0.0/8
net-10
策略规则。第一条策略就定义了从
网络来的
I
network 172.16.0.0
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
!
access-list 110 permit ip 10.0.0.0 0.255.255.255 172.16.36.0 0.0.0.255
access-list 111permit ip 10.0.0.0 0.255.255.255 any
!
route-map net-10 permit 10
match ip address 111
set interface Ethernet0/1
!
route-map net-10 permit 20
!
end
我们可以这样测试我们所做的配置。在名为 Cisco-1 的路由器 10.1.1.1 上发送 ping 命
令到 Internet 上的一个主机(这里就是 192.1.1.1 主机)。要查看名为 Internet Router
的路由器上的情况,我们在特权命令模式下执行 debug ip packet 101 detail 命令。(
其中,在此路由器上有 access-list 101 permit icmp any any 配置命令)。下面是输出
结果:
Results of ping from Cisco-1 to 192.1.1.1/internet taken from Internet_R
outer:
Pakcet never makes it to Internet_Router
正如您所看到的:数据包没有到达
由器上的
policy routed
期的目的呢?用 "debug arp"来看一下。
0010.7bcf.5b02
据包发向 Ethernet0/1 接口,但失败了。这要求路由器为目的地址 192.1.1.1 执行地址解
析协议操作,当执行该任务时,路由器知道了目的地址不处于该接口。接下来,路由器
发生封装错误。所以,最后数据包不能到达 192.1.1.1 。
debug
命令给出了原因:
Debug commands run from Cisco_WAN_Router:
"debug ip policy"
2d15h: IP: s=10.1.1.1 (Ethernet3/0), d=192.1.1.1, len 100, policy match
2d15h: IP: route map net-10, item 10, permit
2d15h: IP: s=10.1.1.1 (Ethernet3/0), d=192.1.1.1 (Ethernet0/1), len 100,
2d15h: IP: Ethernet3/0 to Ethernet0/1 192.1.1.1
这里,数据包确实匹配了 net-10 策略图中的第一条规则。但为什么还是没有达到预
"debug arp"
2d15h: IP ARP: sent req src 172.16.39.3 0010.7bcf.5b02,
2d15h: IP ARP rep filtered src 192.1.1.1 00e0.b064.243d, dst 172.16.39.3
wrong cable, interface Ethernet0/1
debug arp 的输出给出了原因。路由器努力完成它被指示要做的动作,而且试图把数
我们怎样避免这个问题呢?修改路由图使防火墙地址为下一跳。
Config changed on Cisco_WAN_Router:
!
Internet_Router
dst 192.1.1.1 0000.0000.0000 Ethernet0/1
路由器。下面的在
Cisco WAN
路
route-map net-10 permit 10
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
match ip address 111
set ip next-hop 172.16.39.2
!
修改后,在 Internet Router 上运行同样的命令:debug ip packet 101 detail 。这时,
数据包可以按配置前进。我们也能看到数据包被防火墙翻译成了 172.16.255.1 。192.1.
1.1 主机的回应:
Results of ping from Cisco_1 to 192.1.1.1/internet taken from Internet_R
outer:
2d15h: IP: s=172.16.255.1 (Ethernet1), d=192.1.1.1 (Serial0), g=192.1.1.
1, len 100, forward
2d15h: ICMP type=8, code=0
2d15h:
2d15h: IP: s=192.1.1.1 (Serial0), d=172.16.255.1 (Ethernet1), g=172.16.2
0.2, len 100, forward
2d15h: ICMP type=0, code=0
2d15h:
在 Cisco WAN 路由器上执行 debug ip policy 命令后,我们可以看到数据包被传递到
了防火墙,172.16.39.2 :
Debug commands run from Cisco_WAN_Router:
"debug ip policy"
2d15h: IP: s=10.1.1.1 (Ethernet3/0), d=192.1.1.1, len 100, policy match
2d15h: IP: route map net-10, item 20, permit
2d15h: IP: s=10.1.1.1 (Ethernet3/0), d=192.1.1.1 (Ethernet0/1), len 100,
policy routed
2d15h: IP: Ethernet3/0 to Ethernet0/1 172.16.39.2
14.
前几天,ocean-boy( 海之子) 遇到了这样一个问题,就是在 Format Flash 的时候,不能完成的问题,在很多
网友的回复中,提出了很多解决办法,虽然可能不适合所有场合,但是,不失为一个很好的参考,或者问
题中的一个尝试。
Liekun 说可以用 squeeze flash:
但是 ocean-boy( 海之子)的结果是:
关于
Flash
格式化操作的尝试
zx-7507-1#squeeze flash:
All deleted files will be removed, proceed? [confirm]
Squeeze operation may take a while, proceed? [confirm]
Squeeze device flash failed (file not found)
zx-7507-1#sh flash all
-#- ED --type-- --crc--- -seek-- nlen -length- -----date/time------ name
1 .D unknown EF5F54DB 7E45DC 16 8144220 Jul 21 1998 03:20:22 rsp-jsv-mz.4
2 .D unknown F54064CB 7E5C98 13 5691 May 10 2001 09:38:09 runing-confg
3 .D unknown F54064CB 7E7354 3 5691 May 10 2001 09:48:11 run
4 .D unknown 04193E7A FBF3D4 25 8224768 May 14 2001 10:20:53 rsp-a3jsv56n
3116 bytes available (16380884 bytes used)
townsky 说
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
在路由器断电的条件下,从路由器闪存插槽中取出 FALSH CARD,然后插入笔记本电脑的 PCMCIA 插槽中,
我记得笔记本上的 PCMCIA 设备是可以热插拔的,如果你觉的不保险,那么可以先将笔记本关机,然后放入
FLASH CARD,重起即可,电脑重起后在我的电脑里可发现新增加了一个驱动器,将其格式化即可。重新放
回路由器,试试看!!
ocean-boy 说
可我发现没有新驱动器但发现新硬件 MTD-A089。我找不到与之适应的驱动装了一个"快闪内存卡(系列 2) "
工作正常但无法对其操作
daewoo()说
应该先进行 delete 操作,再进行 Squeeze 操作。
ocean-boy 说
zx-7507-1#del rsp-jsv-mz.113-4
zx-7507-1#del runing-confg
zx-7507-1#del run
zx-7507-1#del rsp-a3jsv56i-mz.121-8.bin
zx-7507-1#squeeze flash:
All deleted files will be removed, proceed? [confirm]
Squeeze operation may take a while, proceed? [confirm]
Squeeze device flash failed (file not found)
zx-7507-1#dir all
No such file
3116 bytes available (16380884 bytes used)
zx-7507-1#sh flash all
-#- ED --type-- --crc--- -seek-- nlen -length- -----date/time------ name
1 .D unknown EF5F54DB 7E45DC 16 8144220 Jul 21 1998 03:20:22 rsp-jsv-mz.4
2 .D unknown F54064CB 7E5C98 13 5691 May 10 2001 09:38:09 runing-confg
3 .D unknown F54064CB 7E7354 3 5691 May 10 2001 09:48:11 run
4 .D unknown 04193E7A FBF3D4 25 8224768 May 14 2001 10:20:53 rsp-a3jsv56n
3116 bytes available (16380884 bytes used)
还有:
用 squeeze 命令可永久删除或者用
format flash 命令格掉 flash
format slot0: 行吗?
15. 关于定时访问列表的操作
在 Cisco 的路由器上有定时访问列表的功能,可以非常灵活地限定某些应用在一定的时间上可以传输。下
面是一个例子:
The following example permits SPX traffic only on Monday through Friday between the hours of
8:00 am and 6:00 pm on IPX:
time-range no-spx
periodic weekdays 8:00 to 18:00
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
!
ipx access-list extended test
permit spx any all any all time-range no spx
!
The following example denies HTTP traffic on Monday through Friday between the h
ours of
8:00 am and 6:00 pm on IP. The example allows UDP traffic on Saturday and Sun
day from noon to
8:00 pm only.
time-range no-http
periodic weekdays 8:00 to 18:00
!
time-range udp-yes
periodic weekend 12:00 to 20:00
!
ip access-list extended strict
deny tcp any any eq http time-range no-http
permit udp any any time-range udp-yes
!
interface ethernet 0
ip access-group strict in
16.show Intface与show ip intface
Cisco
在
大的不同,具体的比较如下:
router#qwareroute#show interface s0
Serial0 is up, line protocol is up
Hardware is HD64570
MTU 1500 bytes, BW 256 Kbit, DLY 20000 usec, rely 255/255, load 1/255
Encapsulation FRAME-RELAY IETF, loopback not set, keepalive set (10 sec)
LMI enq sent 203097, LMI stat recvd 203087, LMI upd recvd 0, DTE LMI up
LMI enq recvd 0, LMI stat sent 0, LMI upd sent 0
LMI DLCI 0 LMI type is ANSI Annex D frame relay DTE
FR SVC disabled, LAPF state down
Broadcast queue 0/64, broadcasts sent/dropped 33820/0, interface broadcasts 0
Last input 00:00:00, output 00:00:00, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/4 (size/max/drops); Total output drops: 0
Queueing strategy: weighted fair
Output queue: 0/1000/0 (size/max total/drops)
Conversations 0/41/64 (active/max active/threshold)
Reserved Conversations 0/0 (allocated/max allocated)
的路由器上一般对接口的操作有
的操作
show interfaces和show ip interface
,这两个命令在功能上有着很
5 minute input rate 1000 bits/sec, 1 packets/sec
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
5 minute output rate 0 bits/sec, 1 packets/sec
2069239 packets input, 779029158 bytes, 4 no buffer
Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
4 input errors, 4 CRC, 0 frame, 0 overrun, 0 ignored, 1 abort
1603933 packets output, 190108898 bytes, 0 underruns
0 output errors, 0 collisions, 6 interface resets
0 output buffer failures, 0 output buffers swapped out
0 carrier transitions
DCD=up DSR=up DTR=up RTS=up CTS=up
router#show ip interface
Serial0 is up, line protocol is up
Internet protocol processing disabled
Serial0.1 is up, line protocol is up
Internet address is a.b.c.d/30
Broadcast address is 255.255.255.255
Address determined by non-volatile memory
MTU is 1500 bytes
Helper address is not set
Directed broadcast forwarding is enabled
Outgoing access list is not set
Inbound access list is 101
Proxy ARP is enabled
Security level is default
Split horizon is enabled
ICMP redirects are always sent
ICMP unreachables are always sent
ICMP mask replies are never sent
IP fast switching is enabled
IP fast switching on the same interface is enabled
IP multicast fast switching is enabled
Router Discovery is disabled
IP output packet accounting is disabled
IP access violation accounting is disabled
TCP/IP header compression is disabled
Probe proxy name replies are disabled
Gateway Discovery is disabled
Policy routing is disabled
Network address translation is disabled
17.Cisco
Cisco
路由器配置实例(反转多路复用的妙用
路由器配置实例--反转多路复用的妙用-网络运行部 赵 岩
)
随着信息时代的发展,数字线路以其速度快,性能稳定以及价格合理等诸多优良特性,在数据传输介质中
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
方兴未艾并以惊人的速度发展,大有独占鳌头之势。然而,由于接入设备技术上的原因,数字线路的租用
费并不能按照所租线路的实际带宽成比例增长,而是远远高于实际带宽的增长比例。举个例子来说:2M 的
数字线路月租费为 100000 元/月,照此价格 8M 的数字电路月租费应为 400000 元/月,但实际上却是大相径
庭。并且由于 2M 的光子板与 8M 的光子板价格差异较大,也使得许多用户望而却步。再者,由于线路提供
商的接入设备的能力有限,他们或许根本无法提供 4M、8M 这样带宽的线路。种种情况表明,较大带宽线路
的拨分问题已严重制约了用户对更高带宽的需求。
问题的出现必然带来解决问题的相应办法。一种最简便最直接的方法就是使用多条低带宽(2M)线路用已
达到用户对较高带宽(8M)线路的需求。然而,新的问题又孕育而生,从理论上讲 4 个 2M 线路等于 1 个 8
M 线路,但在实际应用中这样的数学等式并不成立。必须加之以线路复用器来解决。但是,复用器的价格
让人瞠目,一般用户是难以接受的。
现实的问题又一次摆在了我们面前,我们必须另辟蹊径,找出解决问题的方法,在科技网用户(广州信息
中心)的鼎立支持下,我们终于在路由器的配置上找到了答案:Cisco 路由器的"Inverse MUX Applicat
ion using Multilink PPP"功能为我们解决此问题提供了最佳途径。下面我们用一简单实例,来进一步
说明此功能的用法: RouterA RouterB
hostname RouterA
username RouterB password abc
ip subnet-zero
multilink virtual-template 1
!
interface Virtual-Template1
ip unnumbered Ethernet0
ppp authentication chap
ppp multilink
!
interface Serial0
no ip address
encapsulation ppp
no fair-queue
ppp multilink
pulse-time 3
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
!
interface Serial1
hostname RouterB
username RouterA password abc
ip subnet-zero
multilink virtual-template 1
!
interface Virtual-Template1
ip unnumbered Ethernet0
ppp authentication chap
ppp multilink
!
interface Serial0
no ip address
encapsulation ppp
no fair-queue
ppp multilink
pulse-time 3
!
interface Serial1
no ip address
encapsulation ppp
no fair-queue
ppp multilink
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
pulse-time 3
!
interface Serial2
no ip address
encapsulation ppp
no fair-queue
ppp multilink
pulse-time 3
!
interface Serial3
no ip address
encapsulation ppp
no fair-queue
ppp multilink
pulse-time 3
!
interface Ethernet0
ip address 10.17.1.254 255.255.255.0
!
router ripnetwork 10.0.0.0
!
end
no ip address
encapsulation ppp
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
no fair-queue
ppp multilink
pulse-time 3
!
interface Serial2
no ip address
encapsulation ppp
no fair-queue
ppp multilink
pulse-time 3
!
interface Serial3
no ip address
encapsulation ppp
no fair-queue
ppp multilink
pulse-time 3
!
interface Ethernet0
ip address 10.17.2.254 255.255.255.0
!
router ripnetwork 10.0.0.0
!
end
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
通过此方法,我们可将多条低带宽线路合并成为一条线路,并通过虚拟端口 Virtual-Template 1 进行数
据的传输。按此方法配置完成后,我们会发现在显示端口状态(sh interface)时,凭空多出一个端口 V
irtual-Access 1,此端口的数据流量恰恰等于各实际端口的流量总和,并且通过它将数据流量均分到各
个实际端口当中去。从而达到合并低带宽线路的目的。
此外,在配置此功能时,需要注意以下几点:
1. 此功能只能封装 PPP 协议。
2. 在 interface virtual-template 1 配置中,ip unnumbered Ethernet0 可用 ip address XXX
(地址)来取代。
18.
调试路由器做中继代理的小插曲
■网络环境
我们的交换机用的是
VLAN1和VLAN2。VLAN1的IP
地址范围为
Cisco3640
与
Windows 95
是
HCP
获得IP地址的方式,通过路由器做中继代理,由
68.36.8
P
地址是
置如下:
168.68.36.XXX
的以太网口相连,2~40口被划分在
操作系统,安装
服务器,同时在
,子网掩码是
168.68.36.10
■最初的路由器配置
Cisco3640
支持子口的设置。子口就是在单个物理接口上建立并保持多条逻辑连接,最初的路由器配
Cisco Catalyst 2948G
,子网掩码为
VLAN2
255.255.255.0
,子网掩码是
(1)
地址范围为
255.255.255.0
TCP/IP
协议接入
TCP/IP
中安装
。交换机的IP地址是
255.255.255.0
,路由器用的是
协议接入
Cisco3640
168.68.35.XXX
。交换机1口设为虚拟子网间的主干路(
VLAN1中,41~48
VLAN1
VLAN2
DHCP
。
,子网掩码为
,服务器端使用的是
。逻辑示意图如下。客户端的IP地址用自动
服务器分配一个IP地址。服务器的IP地址是
168.68.36.9
。交换机按端口分为两个虚拟子网
255.255.255.0;VLAN2的IP
被划分在
Windows NT+SP4 +
,子网掩码是
VLAN2
中。客户端使用的
255.255.255.0
TRUNK
微软的
168.
。路由器
),
D
I
interface FastEthernet1/0
ip address 168.68.35.1 255.255.255.0
no ip directed-broadcast
fair-queue 64 256 0
!
interface FastEthernet1/0.1
encapsulation dot1Q 1
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
ip helper-address 168.68.36.8
no ip directed-broadcast
!
interface FastEthernet1/0.2
encapsulation dot1Q 2
ip address 168.68.36.1 255.255.255.0
no ip directed-broadcast
router eigrp 100
passive-interface Serial0/0
network 168.0.0.0
no auto-summary
■发现问题:客户端无法获得 IP 地址
硬件连接好后,在客户端用 Win95 自带的 Winipcfg 命令获取 IP 地址时,问题出现了:客户端无法获
取 IP 地址。从硬件连接看,问题可能出在网卡、网线、交换机、路由器四个方面。将客户端手工设置 IP
地址,能够 ping 通服务器、交换机、路由器,说明网卡、网线、交换机、路由器都工作正常,那问题会出
在什么地方呢?会不会是路由器的配置语句不对呢?经查阅随机文档配置语句本身没有问题。为缩小问题
的范围,我把客户端接入 VLAN2 中,这时客户端就能获取 IP 地址了,再将客户端接入 VLAN1 中,又不能获
取 IP 地址了,看来是 VLAN 在捣乱。
19.
调试路由器做中继代理的小插曲
我们知道客户端第一次获取 IP 地址,要经过四步。每一步的信息传输 都是用广播发出的,其中任何
一步在 VLAN 的传输中受阻都会使客户端无法获取 IP 地址,那么如何查看广播包在交换机中传输呢?在 TC
P/IP 协议中,传输协议分为 TCP 和 UDP,TCP 是面向连接的协议,UDP 是非面向连接的协议。从广播的性质
来分析,广播包应该是 UDP 包,广播要通过路由器,而路由器又能监测 UDP 包,这样就可通过路由器查看
广播包在 VLAN 间的传输了。输入路由器监测 UDP 包的命令 debug ip udp 后发现,IP 租用请求信息(D
HCPDISCOVER)仅发送到了 VLAN1 中,没有传送到 VLAN2 中,这应该是客户端无法获得 IP 地址的关键。
(2)
■找到问题:原来出在 IP 上
在路由器的配置中,ip helper-address 168.68.36.8 这条命令的作用是负责指明 UDP 包传输的目
的地址,IP 租用请求信息没有被传送到 VLAN2 中,就是由于这条命令没起作用。再次查看随机文档,这条
命令确实没写错。我正在百思不得其解时,猛然发现路由器以太网口的第二子口设置了 IP 地址,第一子口
未设置 IP 地址,而母口却设置了 IP 地址,也就是说第一子口的 IP 地址已由母口决定了,那 ip helper-
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
address 168.68.36.8 这条命令是否也应该设到母口上呢?我立刻动手将路由器的配置改写如下:
interface FastEthernet1/0
ip address 168.68.35.1 255.255.255.0
ip helper-address 168.68.36.8
no ip directed-broadcast
fair-queue 64 256 0
!
interface FastEthernet1/0.1
encapsulation dot1Q 1
no ip directed-broadcast
!
interface FastEthernet1/0.2
encapsulation dot1Q 2
ip address 168.68.36.1 255.255.255.0
no ip directed-broadcast
router eigrp 100
passive-interface Serial0/0
network 168.0.0.0
no auto-summary
如此设置后,客户端就能够获得 IP 地址了。从这个问题的解决,可以推测出 Cisco3640 第一子口的配
置信息都应设在母口上。事后我又查阅了一些有关书籍,证实这个推测是对的。
20.Cisco As 5800 ppp_Authentication Config
5800-NAS#show running-config
Building configuration...
Current configuration:
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
!
version 12.0
service timestamps debug datetime msec
service timestamps log datetime msec
service password-encryption
!
hostname 5800-NAS
!
aaa new-model
aaa authentication login default local
aaa authentication ppp default if-needed local
enable secret 5 $1$LKgL$tgi19XvWn7fld7JGt55p01
!
username dude password 7 045802150C2E
username admin password 7 044E1F050024
!
!
!
!
!
!
shelf-id 0 router-shelf
shelf-id 1 dial-shelf
!
!
!
resource-pool disable
!
modem-pool Default
pool-range 1/2/0-1/10/143
!
!
spe 1/2/0 1/10/11
firmware ios-bundled default
modem recovery action none
ip subnet-zero
no ip source-route
ip host guessme 172.22.100.9
ip domain-name the.net
ip name-server 172.22.11.10
ip name-server 172.22.12.11
!
async-bootp dns-server 172.30.10.1 172.30.10.2
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
isdn switch-type primary-ni
isdn voice-call-failure 0
!
!
controller T3 1/0/0
framing m23
cablelength 0
t1 4 controller
!
controller T1 1/0/0:4
framing esf
pri-group timeslots 1-24
!
!
voice-port 1/0/0:4:D
!
!
process-max-time 200
!
interface Loopback0
ip address 172.22.99.1 255.255.255.255
no ip directed-broadcast
!
interface Loopback1
ip address 172.22.90.1 255.255.255.0
no ip directed-broadcast
!
interface FastEthernet0/1/0
ip address 172.22.66.23 255.255.255.0
no ip directed-broadcast
!
interface Serial1/0/0:4:23
no ip address
no ip directed-broadcast
isdn switch-type primary-ni
isdn incoming-voice modem
no cdp enable
!
interface Group-Async0
ip unnumbered FastEthernet0/1/0
no ip directed-broadcast
encapsulation ppp
async mode interactive
peer default ip address pool addr-pool
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
no cdp enable
ppp authentication chap pap
group-range 1/2/00 1/10/143
!
ip local pool addr-pool 172.22.90.2 172.22.90.254
ip classless
ip route 0.0.0.0 0.0.0.0 172.22.66.1
no ip http server
!
!
banner login ^C
AS5800 Austin
THEnet Dial Access Server
^C
!
line con 0
transport input none
line aux 0
transport input telnet
line vty 0 4
line 1/2/00 1/10/143
autoselect during-login
autoselect ppp
modem InOut
no modem log rs232
!
end
未完 ..待续 ...
21.Cisco 2621 adsl config
环境:2621+wic-1adsl+yb2 结束的 ios, 电信过来的线路 to 通过 rj11 直接插到 wic-1adsl 里面
Current configuration : 1241 bytes
!
version 12.1
no service single-slot-reload-enable
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
!
hostname AVS_Ex_Router
!
logging rate-limit console 10 except errors
enable secret 5 $1$FDoW$0waMwY5MJ7X60MZu86Jr
enable password 3456789
!
!
!
ip subnet-zero
!
!
no ip finger
!
ip audit notify log
no ip dhcp-client network-discovery
no mgcp timer receive-rtcp
!
!
call rsvp-sync
!
!
!
!
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
!
!
!
!
!
interface ATM0/0
ip address 61.132.126.194 255.255.255.252
atm vc-per-vp 256
no atm ilmi-keepalive
pvc 8/35
encapsulation aal5snap
!
dsl operating-mode auto
no fair-queue
interface FastEthernet0/0
ip address 61.155.16.190 255.255.255.240
speed auto
half-duplex
!
interface Serial0/0
no ip address
shutdown
!
interface FastEthernet0/1
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
no ip address
shutdown
duplex auto
speed auto
!
interface Serial0/1
no ip address
shutdown
!
ip classless
ip route 0.0.0.0 0.0.0.0 61.132.126.193
ip http server
line con 0
transport input none
line aux 0
line vty 0 4
password cisco
login
!
end
22.Cisco Catalyst 4003 的第三层配置
!
version 12.0
no service pad
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname bang-rp
!
!
ip subnet-zero
!
!
!
interface Port-channel1
!--- this interface is configured for dot1q routing with native vlan 1 to mat
ch supervisor configuration.
no ip redirects
no ip directed-broadcast
hold-queue 300 in
!
interface Port-channel1.2
encapsulation dot1Q 2
ip address 2.2.2.2 255.255.255.0
no ip redirects
no ip directed-broadcast
!
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
interface Port-channel1.3
encapsulation dot1Q 3
ip address 1.1.1.2 255.255.255.0
no ip redirects
no ip directed-broadcast
!
interface FastEthernet1
!--- this is the out of band interface that you can use for management
no ip address
no ip directed-broadcast
shutdown
!
interface GigabitEthernet1
ip address 3.3.3.2 255.255.255.0
no ip directed-broadcast
!
interface GigabitEthernet2
no ip address
no ip directed-broadcast
shutdown
!
interface GigabitEthernet3
no ip address
no ip directed-broadcast
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
no negotiation auto
channel-group 1
!--- both port gig 3 and gig 4 are part of the channel-group 1
!
interface GigabitEthernet4
no ip address
no ip directed-broadcast
no negotiation auto
channel-group 1
!--- both port gig 3 and gig 4 are part of the channel group 1
!
router eigrp 1
passive-interface FastEthernet1
network 1.0.0.0
network 2.0.0.0
network 3.0.0.0
!
ip classless
!
arp 127.0.0.2 0050.732a.f300 ARPA
!
line con 0
transport input none
line aux 0
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
line vty 0 4
login
!
end
bang-rp#sh cdp nei
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
S - Switch, H - Host, I - IGMP, r - Repeate
r
Device ID Local Intrfce Holdtme Capability
Platform Port ID
liki Gig 1
160 T S
WS-C3508G-Gig 0/1
Liki is connected to gig 1 on the router. We only see liki from the route
r, we do not see it from the supervisor.
JAB02380AYG(bang)Port-channel1 148 T S WS-C400
3 3/2
JAB02380AYG(bang)Port-channel1 147 T S WS-C400
3 3/1
23.AS 5300
xx53a#sh run
Building configuration...
配置实例
Current configuration:
!
version 12.0
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
service timestamps debug uptime
service timestamps log uptime
service password-encryption
!
hostname xx53a
!
aaa new-model
aaa authentication login default local
aaa authentication login xxlogin group radius
aaa authentication ppp default local
aaa authentication ppp xxdialin local group radius
enable secret 5 $1$VqVj$nAFgXleo5lie4JSC2td9X.
enable password 7 083645401D1615
!
username cisco password 7 03135205120031
username xxadmin password 7 110E03061F1705
username x126DDRcisco password 7 0611062F5841190D161443595F
username x226DDRcisco password 7 00131A0810541B121C221D1C5A
username x326DDRcisco password 7 0611062F5841190D161443595F
username x426DDRcisco password 7 095B47070D0A0706180F557878
username cisco26 password 7 02110D551F091F731A
spe 1/0 1/2
firmware location mica-modem-pw.2.6.2.0.bin
spe 1/3 1/9
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
firmware location system:/ucode/mica_port_firmware
spe 2/0 2/6
firmware location mica-modem-pw.2.6.2.0.bin
spe 2/7 2/9
firmware location system:/ucode/mica_port_firmware
!
!
resource-pool disable
!
!
!
!
!
modem answer delay 1
modem country mica china
ip subnet-zero
no ip domain-lookup
!
!
!
controller E1 0
framing NO-CRC4
clock source line primary
ds0-group 0 timeslots 1-15,17-30 type r2-digital r2-compelled
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
cas-custom 0
unused-abcd0111
country china
answer-signal group-b 1
dnis-digits min 1 max 7
!
controller E1 1
clock source line secondary 1
!
controller E1 2
clock source line secondary 2
!
controller E1 3
clock source line secondary 3
!
process-max-time 200
!
interface Loopback0
ip address 100.237.140.1 255.255.255.0
no ip directed-broadcast
!
interface Ethernet0
ip address 100.237.139.132 255.255.255.128
no ip directed-broadcast
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
no ip proxy-arp
!
interface Serial0
no ip address
no ip directed-broadcast
shutdown
no fair-queue
clockrate 2015232
!
interface Serial1
no ip address
no ip directed-broadcast
shutdown
no fair-queue
clockrate 2015232
!
interface Serial2
no ip address
no ip directed-broadcast
shutdown
no fair-queue
clockrate 2015232
!
interface Serial3
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
no ip address
no ip directed-broadcast
shutdown
no fair-queue
clockrate 2015232
!
interface FastEthernet0
ip address 100.237.139.28 255.255.255.128
ip access-group 10 out
no ip directed-broadcast
no ip proxy-arp
!
interface Group-Async0
physical-layer async
no ip address
no ip directed-broadcast
no group-range
!
interface Group-Async1
ip unnumbered Loopback0
no ip directed-broadcast
encapsulation ppp
no ip mroute-cache
dialer in-band
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
dialer map ip 100.237.140.2 name x126DDRcisco
dialer map ip 100.237.140.3 name x226DDRcisco
dialer map ip 100.237.140.4 name x326DDRcisco
dialer map ip 100.237.140.5 name x426DDRcisco
dialer map ip 100.237.140.8 name cisco26
async default routing
async mode interactive
peer default ip address pool wt
no fair-queue
ppp authentication pap chap callin xxdialin
no ppp chap wait
group-range 1 120
!
ip local pool wt 100.237.140.32 100.237.140.95
no ip http server
ip classless
!
access-list 10 permit 100.237.139.252
access-list 20 permit 100.237.139.0 0.0.0.255
snmp-server engineID local 00000009020000024BA3A772
snmp-server community public RO
snmp-server community private RW
radius-server host 100.237.139.252 auth-port 1645 acct-port 1646
radius-server host 100.237.139.251 auth-port 1645 acct-port 1646
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
radius-server key radius
!
line con 0
transport input none
line 1 120
autoselect during-login
autoselect ppp
modem InOut
modem autoconfigure type mica
rotary 1
autocommand ppp
transport preferred pad telnet rlogin udptn
transport input all
transport output pad telnet rlogin udptn
autohangup
line aux 0
line vty 0 4
access-class 20 in
password 7 095B47070D0A07
!
end
24.Cisco
cisco
路由器基本配置命令
路由器基本命令配置
一·CISCO 路由器简介
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
1.1 CISCO IOS 操作环境。
有三种:
ROM monitor > Failure of password recovery
BootROM router(boot) > Flash image upgrade
Cisco IOS router > Normal operation
1.2 Command Modes 命令模式。
User EXEC Router> 普通级别
Privileged EXEC Router# 系统管理级别(超级用户)
Configuration mode Router(config)# 修改配置
二、 配置前的准备工作
2.1 用终端或仿真终端接入 CONSOLE 口 。
终端或仿真终端配置信息如下:
9600 baud 8 data bits no parity 2 stop bits (9600,8/N/2)
2.2 用 TELNET 命令在网上进行设置。
系统管理员可在网上用 telnet address 命令进行远程配置。
三、 配置 IP 地址
3.1 config 命令行方式进行设置
3.1.1 首先启动 ROUTER 进入 router > 模式。
键入 Enable 进入 router # 模式
然后键入 config 进入 router(config)# 模式
3.1.2 选择要配置的路由器端口
Router(config) # interface 端口号
进入端口设置状态 Router(config-if)
此时用命令 IP address <IP 地址> <掩码>
设定路由器端口 IP 地址
四、 配置 ip 路由协议 (RIP ,OSPF ,BGP ,STATICS)
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
在图中有路由器 A 和 B,广域网通过 router A 的 s0/0/0 和 router B 的 s2/0/0 相连,IP 如下:
router A:
E1:202.101.1.1/24
S0/0/0:202.101.3.1/30
router B:
E1:202.101.2.1/24
S2/0/0:202.101.3.2/30
当我们设置路由器协议时,可根据方案的规定设置一种或多种协议。以下动态协议都是按最简单设置,复
杂的配置可参考具体手册。
4.1 静态路由
IP route 目的网络地址 子网掩码 端口号
在 router A 上配 router B 的路由:
IP route 202.101.2.0 255.255.255.0 202.101.3.2
在 router A 上配 router B 的路由:
IP route 202.101.1.0 255.255.255.0 202.101.3.1
4.2 RIP2 设置
router A 进行如下设置:
router rip ;enable rip
version 2 ;选择版本 2
network 202.101.1.0 ;相关子网地址
network 202.101.3.0
router B 进行如下设置:
router rip ;enable rip
version 2 ;选择版本 2
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
network 202.101.2.0 ;相关子网地址
network 202.101.3.0
4.3 OSPF 设置
router A:
router ospf 200 ;enable ospf 进程号为 200
network 202.101.1.0 0.0.0.255 area 0 ; 相关子网地址及区域号
network 202.101.3.0 0.0.0.3 area 0
router B:
router ospf 200 ;enable ospf 进程号为 200
network 202.101.2.0 0.0.0.255 area 0 ; 相关子网地址及区域号
network 202.101.3.0 0.0.0.3 area 0
4.4 BGP 设置
router A:
router bgp 100 ;enable bgp 设置自治域号
network 202.101.3.0 mask 255.255.255.252 ;相关子网地址及子网掩码
network 202.101.1.0 mask 255.255.255.0 ; 这些地址由 bgp 发到邻居路由器
neighbor 202.101.3.2 remote-as 200 ;设置远程相连自治域边界路由器端口
router B:
router bgp 100 ;enable bgp 设置自治域号
network 202.101.2.0 mask 255.255.255.252 ;相关子网地址及子网掩码
network 202.101.1.0 mask 255.255.255.0 ; 这些地址由 bgp 发到邻居路由器
neighbor 202.101.3.1 remote-as 200 ;设置远程相连自治域边界路由器端口
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
五、 radius 认证的设置
5.1 radius 的简述
RADIUS 的全称为(Remote Access Dail-In User Service),它是对远程拨号用户访问进行认证的一种
协议。主要进行 Authentication Authorization Accounting (AAA) 三方面的工作。
5.2 radius 的配置
具体配置如下:
aaa new-mode ;enable radius
radius-server host <address> ;指明 radius server 在网上的地址
radius-server key <string> ;建立一个网上传输密
aaa authentication login default radius local ;进行 login 认证,若 radius server 未找到
从本地数据库内查找
aaa authentication ppp default radius local
aaa authorization network radius local ;授权检测
aaa accounting network start-stop radius ;计帐检测
六、 路由器软件升级方法
6.1 改变操作环境
在 global config mode 设置: config -reg 0x2101
reload 进入 Boot Rom 模式:router(boot)>
6.2 运行 tftp server
在网上运行 tftp server,使升级文件可以传输。
6.3 升级版本
命令如下:
copy tftp flash ;将 tftp server 上的文件传入路由器的 flash memoy 中
copy flash tftp ; 将 flash 中的文件备份到 tftp server 中
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
七、 路由器配置的其它事项
7.1 拨号用户的配置。
cisco 2509/2511 的异步串行通讯口在配置 modem 时,modem 需设置成自动应答方式。具体方法如下:
用超级终端进入 modem AT 命令方式,键入 ats0=1 设置自动应答方式,然后键入 at&w 将设置写入寄
存器。
7.2 RIP & BGP 的设置
当一个运行 RIP 路由协议的子网,做为一个自治域,用 BGP 协议接入另一自治域时。此子网内所有路由器
需添加参数: ip classless 。同时在与边界路由器直接相连的路由器上需添加一个缺省网关。
7.3 v.35 电缆直连的设置
在相关的端口上设置时钟速率:clock rate < speed> .
7.4 loopback 端口的设置
loopback 端口是一个虚拟端口,端口状态始终处于 UP。通过它可以使由 BGP 相连的 AS 之间始终保持连系,
不会由于边界路由器端口状态的改变而发生变化。其具体配置如下:
interface loopback <number>
ip address IP 地址 子网掩码
八、常见问题
8.1 如何检测网络是否通畅?
在网络主机上采用命令 ping <ip 地址> 来逐端检测网端。
8.2 如何查看路由器配置信息?
在 EXEC 模式下用 show config 命令。
8.3 如何查看路由器路由信息?
在 EXEC 模式下用 show ip route 命令。
8.4 如何查看路由器端口信息?
EXEX 模式下用 show int <端口号> 命令。
8.5 为什么端口协议已经配置,状态仍然是 down?
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
在 CONFIG 模式下,选择该端口,执行 no shutdwon 命令。
8.6 config 模式有几种状态,对应那些操作?
config 模式有以下几种状态:
· globle config 全局配置操作 exec 模式键入 config t
· interface config 端口配置操作 config 模式键入 int <端口号>
· line config 线路配置操作 config 模式键入 line <线路号>
· router config 路由配置操作 config 模式键入 router<路由协议>
25.DHCP
ip dhcp pool test(name)
network 192.168.11.0 255.255.255.0
default-router 192.168.11.1
dns-server 192.168.11.X
………
interface vlan 222
ip addr 192.168.11.1 255.255.255.0
26.
一、Cisco 路由器口令类别
1.有效密码口令(enabled secret password): 是一种安全级别最高的加密口令,适用于 Cisco I
OS 10.3 (2) 以后的版本,在路由器的配置表中以密码的形式出现。
2.有效口令(enabled password):安全级别次高的非加密口令。当有效密码口令没设置时,使用该口
令。
3.终端口令(console password):用于防止非法或未授权用户修改路由器配置,在用户通过主控终端
对路由器进行设置时,使用该口令。
二、口令恢复原理
1.内部内存种类(以 2500 系列为例)。Cisco 路由器保存了几种不同的配置参数,并存放在不同的内存
模块中。
Cisco2500 系列路由器的内存:ROM、闪存(flash memory)、不可变 RAM(NVRAM)、RAM 和动态内存(D
RAM)等五种。作用如下:
内存类别
作用
配置
神奇恢复
Cisco
路由器口令
ROM
存放系统的引导程序。类似 PC 机的 BIOS,是一种只读存储器,系统掉电程序不会丢失。
闪存
更多资源请关注鸿鹄论坛:http://bbs.hh010.com
存放 Cisco IOS 的镜像,类似 PC 机的硬盘,是一种可擦写、可编程的 ROM, 系统掉电数据不会丢失。
NVRAM
存放配置文件(即 Startup-config)
RAM
存放当前系统使用配置(即 Running-config)
DRAM
主要包含路由表、ARP 缓存、fast-switch 缓存、数据包缓存等,也包含正在执行的配置文件。系统掉电该
内存数据回丢失。
一般地,路由器启动时,首先运行 ROM 中的程序,进行系统自检及引导,然后运行 FLASH 中的 IOS ,并
在 NVRAM 中寻找路由器配置,并装入 DRAM 中。
2.口令恢复的关键在于对配置登记码(Configuration Register
同的内存中调用不同的参数表进行启动。有效口令存放在 NVRAM 中,因此修改口令的实质是将登记码进
行修改,从而让路由器跳过 NVRAM 中的配置表,直接进入 ROM 模式,然后对有效口令和终端口令进行修
改或者重新设置有效加密口令( 因为有效加密口令为加密乱码,无法 进行恢复,只可以删掉或改写),
完成后再将登记码恢复(如忘记恢复路由器重起后修改的配置可能回丢失)。
Configuration Register
value
及其含义
value
)进行修改,从而让路由器从不
Configuration Register
含义
0x2102
缺省设置
bit13=0x2000
Flash 引导失败 5 次后,自动从 Rom 引导
bit8=0x0100
关闭 Break 键
Boot field=0x2
从 Flash 中引导正常运行模式
0x2101
bit13=0x2000
Flash 引导失败 5 次后,自动从 Rom 引导
value
bit8=0x0100
关闭 Break 键