20 12
发新话题
打印

[原创] Cisco系列之CCNP Lab Exercise

Cisco系列之CCNP Lab Exercise

本文网址:http://bbs.bitscn.com/73395 复制

Cisco系列之CCNP Lab Exercise(AAA)

【实验拓扑】

【配置AAA服务器】
加管理员帐号,点“Administration Control按钮,在添加管理员帐号

配置cisco secure acs HTML interface,点interface configuration。在选择所需的服务,对这次实验,选shell exec)即可。

Network configuration,添加对应的AAA client,设置其IP地址及Key。如下图:

配置用户信息,点“User Setup,设置用户密码,选中shellexec),设置Privilege Level

【路由器上的配置】
            1enable AAA
Router(config)#aaa new-model


2Configuring TACACS+ and RADIUS clients
TACACS+:
Router(config)#tacacs-server host ip-address
Router(config)#tacacs-server key word
RADIUS
Router(config)#radius-server host ip-address
Router(config)#radius-server key word
3Configuring AAA authentication
Router(config)#aaa authentication type {default|list-name} method1 […[method4]]
type分为:loginenableppplocal-overridearapnasipassword-promptusername-prompt,其中常用的为前面四个。
login:为想进入到EXEC命令行模式的用户认证。
enable:决定用户是否可以访问特权级命令级。
ppp:在运行PPP的串行口上指定认证。
local-override:用于某些特殊用户(如系统管理员)快速登录,先使用本地数据库,如果失败再使用后面的认证方式。
List type分两种,一种是default,一种是命名list。用来指代后面的认证方式列表method1 […[method4]]
不同的type对应不同的Method,后面的认证方式只有当前面的认证方式返回了一个出错信息时使用(最多四种Method),而不是在前面的认证失败时使用。一般分为以下几种:
enable
使用enable口令进行认证
krb5
使用Kerberos 5进行认证
line
使用线路口进行认证
local
使用本地用户数据库进行认证
none
不认证
group radius
使用RADIUS进行认证
group tacacs+
使用TACACS+进行认证
krb5-telnet
当用Telnet连接路由器时,使用Kerberos 5 Telnet认证协议
if-neede
如果用户已在TTY上进行了认证,就不再进行认证(用于enable type

4Configuring AAA authorization
Router(config)#aaa authorization type {default|list-name} method1 […[method2]]
type分为:
network
所有网络服务,包括SLIPPPPARAP
Exec
EXEC进程
commands level
所指定级别(015)的所有EXEC命令
config-commands
配置命令
reverse-access
用于反向Telnet

Method分为:
if-authenticated
如果用户已经通过认证,则允许该用户使用所要求的功能
local
使用本地用户数据库进行授权
none
不进行授权
group radius
使用RADIUS进行授权
group tacacs+
使用TACACS+进行授权
krb5-instance
使用由“kerberos instance map”命令所定义的例子

List typeauthentication一样分两种:default和命名list
5Configuring AAA accounting
Router(config)#aaa accounting type {default|list-name} Record-type method1 […[method2]]
type分为:
commonds level
监察所指定特权级(015)的所有命令
Connection
监察所有外出连接,例如Telnetrlogin
Exec
监察EXEC进程
Network
监察所有网络请求服务,如SLIPPPPARAP
System
监察所有系统级事件,例如系统重启

Recordtype分为:
Start-stop
在一个进程开始和结束分别发送一个开始统计和停止统计的通知
Stop-only
只在用户所请求的进程结束后发送一个停止统计通知
wait-start
和“start-stop不同在于开始统计通知被服务器确认之前,用户所请求的服务不会开始

Method分为:group tacacs+group radius
List typeauthentication一样,分为:default和命名list
【配置示例】 (RADIUSauthentication配置与下相似,可选做,但其不能实行authorization
Building configuration...
Current configuration : 4102 bytes
!
version 12.2
aaa new-model
!
!
aaa authentication login TELNET group tacacs+ local enable none
aaa authorization exec TELNET group tacacs+ local
aaa accounting exec TELNET start-stop group tacacs+
aaa accounting commands 15 TELNET start-stop group tacacs+
aaa accounting network TELNET start-stop group tacacs+
aaa accounting connection TELNET start-stop group tacacs+
aaa accounting system default start-stop group tacacs+
aaa session-id common
enable password 7 070C285F4D060D00161F
!
tacacs-server host 10.2.0.1
tacacs-server key ciscoteam
privilege configure level 7 snmp-server host
privilege configure level 7 snmp-server enable
privilege configure level 7 snmp-server



privilege exec level 7 ping
privilege exec level 7 configure terminal
privilege exec level 7 configure
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
insecure
authorization exec TELNET
accounting connection TELNET
accounting commands 15 TELNET
accounting exec TELNET
logging synchronous
login authentication TELNET
transport input telnet
!
no scheduler allocate
end




[ 本帖最后由 heart_dream_fly 于 2006-12-30 15:18 编辑 ]

不抛弃也不放弃,所以我们就叫钢七连

Cisco系列之CCNP Lab Exercise(DHCP)

. 实验目的
本实验的目的是让学员掌握在路由器上配置DHCP服务器的方法,并通过配置帮助地址将客户向DHCP服务器发出的广播转发成定点广播,以通过路由器到达服务器。
. 实验设备
Cisco路由器两部(1600系列一部,1700系列一部),带超级终端的PC机两台。
. 实验拓朴

. 实验步骤
1. 配置路由器端口的IP地址:
1Cisco1600的配置:
Cisco1600#config t
Cisco1600 (config)#int e0
Cisco1600 (config-if)#ip address 192.168.1.1 255.255.255.0
Cisco1600 (config-if)#no shut
Cisco1600 (config-if)#int s0
Cisco1600 (config-if)#ip address 192.168.3.1 255.255.255.0
Cisco1600 (config-if)#clock rate 56000
Cisco1600(config-if)#no shut
2Cisco1700的配置:
Cisco1700#config t
Cisco1700 (config)#int e0
Cisco1700 (config-if)#ip address 192.168.2.1 255.255.255.0
Cisco1700 (config-if)#no shut
Cisco1700 (config-if)#int s0
Cisco1700 (config-if)#ip address 192.168.3.2 255.255.255.0
Cisco1700(config-if)#no shut

2.使用RIP协议作为该网络的路由协议,实现网络的动态路由配置。完成配置后使用show ip route,show interface,show running-configuration查看路由配置的正确性或者使用ping命令验证网络之间是否完全互连。
1Cisco1600的配置:
Cisco1600#config t
Cisco1600 (config)#router rip
Cisco1600(config-router)#network 192.168.1.0
Cisco1600(config-router)#network 192.168.3.0
2Cisco1700的配置:
Cisco1700#config t
Cisco1700(config)#router rip
Cisco1700(config-router)#network 192.168.2.0
Cisco1700(config-router)#network 192.168.3.0

3.在Cisco1700路由器上配置DHCP服务:
1)配置192.168.1.0网段的DHCP服务:
Cisco1700#config t
Cisco1700(config)#ip dhcp pool Host1
Cisco1700(dhcp-config)#network 192.168.1.0 255.255.255.0
Cisco1700(dhcp-config)#default-router 192.168.1.1
Cisco1700(dhcp-config)#dns-server 202.116.64.1
Cisco1700(config)#ip dhcp excluded-address 192.168.1.1
2)配置192.168.2.0网段的DHCP服务:
Cisco1700#config t
Cisco1700(config)#ip dhcp pool Host2
Cisco1700(dhcp-config)#network 192.168.2.0 255.255.255.0
Cisco1700(dhcp-config)#default-router 192.168.2.1
Cisco1700(dhcp-config)#dns-server 202.116.64.1
Cisco1700(config)#ip dhcp excluded-address 192.168.2.1

4.在Cisco1600路由器上配置IP helper address
Cisco1600#config t
Cisco1600(config)#int e0
Cisoc1600(config-if)ip helper-address 192.168.3.2

5.验证DHCPIP helper address:
Host1Host2两台主机的网络IP/TCP属性上分别设置为自动获取IP地址,然后在主机的MS-DOS下执行ipconfig /all命令,可以查看到Host1Host2自动获取到的IP地址,DHCP服务器地址,DNS服务器地址等信息



不抛弃也不放弃,所以我们就叫钢七连

Cisco系列之CCNP Lab Exercise(Eigrp Troubleshooting)

【实验拓扑】

说明:以RTE为界分为内部网络(左边)和外部网络(右边),内部网络运行EIGRP协议,外部网络运行RIP协议。
【实验目的】
1. 网络可以正常工作,所有路由器可以看以网络172.168.1.0/24, 172.168.2.0/24, 172.168.2.0/24, 172.168.4.0/24, 162.16.1.0/24, 150.150.0.0/16。
2. RTD上有两条到达网络172.168.2.0/24的路径,而只有一条到达网络172.168.4.0/24的路径(事先已经配置好让RTC不在以太网口发布这个网络)。
3. 外部网络除150.150.0.0/16外全部不能被内部网络看到,内部网络只能通过缺省网络访问其它外部网络。
【错误设计】
一、二层出错,帧中继交换机被配成单向链路(即少一条frame-relay map)
RTA#sh ip route
172.168.0.0/24 is subnetted, 3 subnets
C 172.168.1.0 is directly connected, FastEthernet0
C 172.168.2.0 is directly connected, Serial0.1
D 172.168.3.0 [90/21026560] via 172.168.2.3, 00:34:08, Serial0.1
162.16.0.0/24 is subnetted, 1 subnets
D 162.16.1.0 [90/20514560] via 172.168.2.3, 00:37:34, Serial0.1
D EX 150.150.0.0/16 [170/21282560] via 172.168.2.3, 00:24:00, Serial0.1
RTA#sh ip eigrp neighbors
IP-EIGRP neighbors for process 1
H Address Interface Hold Uptime SRTT RTO Q Seq Type
(sec) (ms) Cnt Num
1 172.168.2.3 Se0.1 13 00:38:21 308 1848 0 23
RTA#sh frame-relay pvc
PVC Statistics for interface Serial0 (Frame Relay DTE)
Active Inactive Deleted Static
Local 1 0 1 0
Switched 0 0 0 0
Unused 0 0 0 0
DLCI = 101, DLCI USAGE = LOCAL, PVC STATUS = DELETED, INTERFACE = Serial0.1
input pkts 886 output pkts 97 in bytes 73955
out bytes 7548 dropped pkts 0 in FECN pkts 0
in BECN pkts 0 out FECN pkts 0 out BECN pkts 0
in DE pkts 0 out DE pkts 0
out bcast pkts 40 out bcast bytes 2560
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
pvc create time 01:04:01, last time pvc status changed 00:01:42
DLCI = 201, DLCI USAGE = LOCAL, PVC STATUS = ACTIVE, INTERFACE = Serial0.1
input pkts 874 output pkts 97 in bytes 70019
out bytes 7068 dropped pkts 0 in FECN pkts 0
in BECN pkts 0 out FECN pkts 0 out BECN pkts 0
in DE pkts 0 out DE pkts 0
out bcast pkts 42 out bcast bytes 2688
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
pvc create time 01:03:55, last time pvc status changed 01:00:26
RTB#sh frame-relay pvc
PVC Statistics for interface Serial0 (Frame Relay DTE)
Active Inactive Deleted Static
Local 0 1 0 0
Switched 0 0 0 0
Unused 0 0 0 0
DLCI = 102, DLCI USAGE = LOCAL, PVC STATUS = INACTIVE, INTERFACE = Serial0.1
input pkts 97 output pkts 891 in bytes 7548
out bytes 74544 dropped pkts 0 in FECN pkts 0
in BECN pkts 0 out FECN pkts 0 out BECN pkts 0
in DE pkts 0 out DE pkts 0
out bcast pkts 863 out bcast bytes 72401
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
pvc create time 01:17:38, last time pvc status changed 00:02:43
RTB#sh ip route
172.168.0.0/24 is subnetted, 3 subnets
D 172.168.1.0 [90/20517120] via 162.16.1.3, 00:03:03, FastEthernet0
D 172.168.2.0 [90/20514560] via 162.16.1.3, 00:03:03, FastEthernet0
D 172.168.3.0 [90/2172416] via 162.16.1.1, 00:36:45, FastEthernet0
162.16.0.0/24 is subnetted, 1 subnets
C 162.16.1.0 is directly connected, FastEthernet0
D EX 150.150.0.0/16 [170/2428416] via 162.16.1.1, 00:26:38, FastEthernet0
二、共亨链路带宽问题,让B和C到帧中继网络有不同的带宽,但必须让D有两条到A的路由。
RTB#conf t
Enter configuration commands, one per line. End with CNTL/Z.
RTB(config)#int s0.1
RTB(config-subif)#bandwidth 2040
RTC(config)#int s0.1
RTC(config-subif)#bandwidth 2048
RTD#sh ip route
172.168.0.0/24 is subnetted, 3 subnets
D 172.168.1.0 [90/1789952] via 162.16.1.3, 00:00:03, FastEthernet0/0
D 172.168.2.0 [90/1787392] via 162.16.1.3, 00:00:03, FastEthernet0/0
C 172.168.3.0 is directly connected, Serial0/0
162.16.0.0/24 is subnetted, 1 subnets
C 162.16.1.0 is directly connected, FastEthernet0/0
D EX 150.150.0.0/16 [170/2425856] via 172.168.3.2, 00:00:03, Serial0/0
RTD#sh ip eigrp topology 172.168.2.0 255.255.255.0
IP-EIGRP (AS 1): Topology entry for 172.168.2.0/24
State is Passive, Query origin flag is 1, 1 Successor(s), FD is 1787392
Routing Descriptor Blocks:
162.16.1.3 (FastEthernet0/0), from 162.16.1.3, Send flag is 0x0
Composite metric is (1787392/1761792), Route is Internal
Vector metric:
Minimum bandwidth is 2048 Kbit
Total delay is 21000 microseconds
Reliability is 255/255
Load is 1/255
Minimum MTU is 1500
Hop count is 1
162.16.1.2 (FastEthernet0/0), from 162.16.1.2, Send flag is 0x0
Composite metric is (1792256/1766656), Route is Internal
Vector metric:
Minimum bandwidth is 2040 Kbit
Total delay is 21000 microseconds
Reliability is 255/255
Load is 1/255
Minimum MTU is 1500
Hop count is 1
加入Variance 2
RTD#sh ip route
172.168.0.0/24 is subnetted, 3 subnets
D 172.168.1.0 [90/1789952] via 162.16.1.3, 00:00:03, FastEthernet0/0
D 172.168.2.0 [90/1787392] via 162.16.1.3, 00:00:03, FastEthernet0/0
[90/1792256] via 162.16.1.2, 00:00:03, FastEthernet0/0
C 172.168.3.0 is directly connected, Serial0/0
162.16.0.0/24 is subnetted, 1 subnets
C 162.16.1.0 is directly connected, FastEthernet0/0
D EX 150.150.0.0/16 [170/2425856] via 172.168.3.2, 00:00:03, Serial0/0
三、水平分割问题,A的多少接口上的水平分割让网络172.168.4.0/25只能被A收到,当然还要配分发列表。
RTC(config)#int loopback 0
RTC(config-if)#ip addr 172.168.4.1 255.255.255.0
RTC(config-if)#exit
RTC(config)#router eigrp 1
RTC(config-router)#distribute-list 1 out fastEthernet 0
RTC(config-router)#exit
RTC(config)#access
RTC(config)#access-list 1 deny 172.168.4.0 0.0.0.255
RTC(config)#access-
RTC(config)#access-list 1 permit any
RTA#sh ip rout
172.168.0.0/24 is subnetted, 4 subnets
D 172.168.4.0 [90/20640000] via 172.168.2.3, 00:01:47, Serial0.1
C 172.168.1.0 is directly connected, FastEthernet0
C 172.168.2.0 is directly connected, Serial0.1
D 172.168.3.0 [90/21026560] via 172.168.2.2, 00:01:06, Serial0.1
[90/21026560] via 172.168.2.3, 00:01:06, Serial0.1
162.16.0.0/24 is subnetted, 1 subnets
D 162.16.1.0 [90/20514560] via 172.168.2.3, 00:12:05, Serial0.1
[90/20514560] via 172.168.2.2, 00:12:06, Serial0.1
D EX 150.150.0.0/16 [170/21282560] via 172.168.2.2, 00:01:07, Serial0.1
[170/21282560] via 172.168.2.3, 00:01:07, Serial0.1
RTB#sh ip route
172.168.0.0/24 is subnetted, 3 subnets
D 172.168.1.0 [90/1769216] via 172.168.2.1, 00:02:21, Serial0.1
C 172.168.2.0 is directly connected, Serial0.1
D 172.168.3.0 [90/2172416] via 162.16.1.1, 00:12:38, FastEthernet0
162.16.0.0/24 is subnetted, 1 subnets
C 162.16.1.0 is directly connected, FastEthernet0
D EX 150.150.0.0/16 [170/2428416] via 162.16.1.1, 00:12:38, FastEthernet0
RTA(config-subif)#no ip split-horizon eigrp 1
RTB#sh ip route
172.168.0.0/24 is subnetted, 4 subnets
D 172.168.4.0 [90/21152000] via 172.168.2.1, 00:00:06, Serial0.1
D 172.168.1.0 [90/1769216] via 172.168.2.1, 00:00:06, Serial0.1
C 172.168.2.0 is directly connected, Serial0.1
D 172.168.3.0 [90/2172416] via 162.16.1.1, 00:00:06, FastEthernet0
162.16.0.0/24 is subnetted, 1 subnets
C 162.16.1.0 is directly connected, FastEthernet0
D EX 150.150.0.0/16 [170/2428416] via 162.16.1.1, 00:00:06, FastEthernet0
四、是否允许广播,当在多点接口上不加入关键字broadcast时,会出现hello包无法发送
因为它使用了组播地址。
RTA(config-subif)#no frame-relay map ip 172.168.2.2 101 broadcast
RTA(config-subif)#frame-relay map ip 172.168.2.2 101
RTA(config-subif)#no frame-relay map ip 172.168.2.3 201 broadcast
RTA(config-subif)#frame-relay map ip 172.168.2.3 201
RTA(config-subif)#
RTA#sh ip eigrp nei
IP-EIGRP neighbors for process 1
为空,加入后的输出:
RTA#sh ip eigrp nei
IP-EIGRP neighbors for process 1
H Address Interface Hold Uptime SRTT RTO Q Seq Type
(sec) (ms) Cnt Num
1 162.16.1.3 Fa0 11 00:00:18 4 200 0 104
0 162.16.1.1 Fa0 10 00:00:18 8 200 0 106
五、不连续子网问题,B、C、D之间的网络把172.168.0.0/16分开,如果不在这些路由器中配置no auto-summary命令会造成有的网络收不到。
RTD(config)#router eigrp 1
RTD(config-router)#auto-summary
RTB#sh ip route
172.168.0.0/16 is variably subnetted, 4 subnets, 2 masks
D 172.168.4.0/24 [90/21152000] via 172.168.2.1, 00:02:15, Serial0.1
D 172.168.0.0/16 [90/1794816] via 162.16.1.1, 00:00:32, FastEthernet0
D 172.168.1.0/24 [90/1769216] via 172.168.2.1, 00:02:15, Serial0.1
C 172.168.2.0/24 is directly connected, Serial0.1
162.16.0.0/24 is subnetted, 1 subnets
C 162.16.1.0 is directly connected, FastEthernet0
D EX 150.150.0.0/16 [170/2428416] via 162.16.1.1, 00:00:35, FastEthernet0
六、不共同子网,当配错D的以太网口时,无法建立邻居关系,而且有错误提示。
RTD(config-if)#ip addr 162.16.11.1 255.255.255.0
RTD(config-if)#
02:32:24: IP-EIGRP: Neighbor 162.16.1.2 not on common subnet for FastEthernet0/0 (162.16.11.1 255.255.255.0
七、K不同也会造成邻居问题
RTD(config)#router eigrp 1
RTD(config-router)#metric weights 0 1 1 1 1 0
RTD(config)#^Z
RTD#
02:36:36: %SYS-5-CONFIG_I: Configured from console by consoleear
RTD#sh ip eigrp nei
IP-EIGRP neighbors for process 1
RTD(config-router)#metric weights 0 1 0 1 0 0
RTD(config-router)#exit
RTD(config)#exit
RTD#
02:37:57: %SYS-5-CONFIG_I: Configured from console by console
RTD#clear ip eigrp nei
RTD#sh ip eigrp nei
IP-EIGRP neighbors for process 1
H Address Interface Hold Uptime SRTT RTO Q Seq Type
(sec) (ms) Cnt Num
2 162.16.1.3 Fa0/0 14 00:00:02 1 3000 2 167
1 162.16.1.2 Fa0/0 13 00:00:03 1 3000 2 191
0 172.168.3.2 Se0/0 14 00:00:05 26 200 0 70
八、发布列表,在E上不进行路由发布过滤时会让内部路由器看到所有路由。
RTD#sh ip route
D EX 170.170.0.0/16 [170/2425856] via 172.168.3.2, 00:00:06, Serial0/0
172.168.0.0/24 is subnetted, 4 subnets
D 172.168.4.0 [90/21177600] via 162.16.1.2, 00:01:33, FastEthernet0/0
D 172.168.1.0 [90/1794816] via 162.16.1.3, 00:01:33, FastEthernet0/0
[90/1794816] via 162.16.1.2, 00:01:33, FastEthernet0/0
D 172.168.2.0 [90/1792256] via 162.16.1.3, 00:01:33, FastEthernet0/0
[90/1792256] via 162.16.1.2, 00:01:33, FastEthernet0/0
C 172.168.3.0 is directly connected, Serial0/0
162.16.0.0/24 is subnetted, 1 subnets
C 162.16.1.0 is directly connected, FastEthernet0/0
D EX 160.160.0.0/16 [170/2425856] via 172.168.3.2, 00:00:06, Serial0/0
131.66.0.0/24 is subnetted, 1 subnets
D EX 131.66.20.0 [170/2425856] via 172.168.3.2, 00:00:07, Serial0/0
D EX 150.150.0.0/16 [170/2425856] via 172.168.3.2, 00:00:15, Serial0/0
RTE(config)#router eigrp 1
RTE(config-router)#distribute-list 1 out
Access-list 1 permit 150.150.0.0 0.0.255.255
RTD#sh ip route
172.168.0.0/24 is subnetted, 4 subnets
D 172.168.4.0 [90/21177600] via 162.16.1.2, 00:03:26, FastEthernet0/0
D 172.168.1.0 [90/1794816] via 162.16.1.3, 00:03:26, FastEthernet0/0
[90/1794816] via 162.16.1.2, 00:03:26, FastEthernet0/0
D 172.168.2.0 [90/1792256] via 162.16.1.3, 00:03:26, FastEthernet0/0
[90/1792256] via 162.16.1.2, 00:03:26, FastEthernet0/0
C 172.168.3.0 is directly connected, Serial0/0
162.16.0.0/24 is subnetted, 1 subnets
C 162.16.1.0 is directly connected, FastEthernet0/0
D EX 150.150.0.0/16 [170/2425856] via 172.168.3.2, 00:00:03, Serial0/0
九、重发布,没有default-metric命令的话重发布是不会发生。
RTD#sh ip route
172.168.0.0/24 is subnetted, 4 subnets
D 172.168.4.0 [90/21177600] via 162.16.1.2, 00:05:01, FastEthernet0/0
D 172.168.1.0 [90/1794816] via 162.16.1.3, 00:05:01, FastEthernet0/0
[90/1794816] via 162.16.1.2, 00:05:01, FastEthernet0/0
D 172.168.2.0 [90/1792256] via 162.16.1.3, 00:05:01, FastEthernet0/0
[90/1792256] via 162.16.1.2, 00:05:01, FastEthernet0/0
C 172.168.3.0 is directly connected, Serial0/0
162.16.0.0/24 is subnetted, 1 subnets
C 162.16.1.0 is directly connected, FastEthernet0/0
RTE(config)#router eigrp 1
RTE(config-router)#default-metric 10000 1000 255 1 1500
RTD#sh ip route
172.168.0.0/24 is subnetted, 4 subnets
D 172.168.4.0 [90/21177600] via 162.16.1.2, 00:06:45, FastEthernet0/0
D 172.168.1.0 [90/1794816] via 162.16.1.3, 00:06:45, FastEthernet0/0
[90/1794816] via 162.16.1.2, 00:06:45, FastEthernet0/0
D 172.168.2.0 [90/1792256] via 162.16.1.3, 00:06:45, FastEthernet0/0
[90/1792256] via 162.16.1.2, 00:06:45, FastEthernet0/0
C 172.168.3.0 is directly connected, Serial0/0
162.16.0.0/24 is subnetted, 1 subnets
C 162.16.1.0 is directly connected, FastEthernet0/0
D EX 150.150.0.0/16 [170/2425856] via 172.168.3.2, 00:00:25, Serial0/0
十、从复ID,A和E都使用环回地址192.168.1.1,所以E重发布的路由A不接爱。
RTA#sh ip route
172.168.0.0/24 is subnetted, 4 subnets
D 172.168.4.0 [90/20640000] via 172.168.2.3, 00:00:30, Serial0.1
C 172.168.1.0 is directly connected, FastEthernet0
C 172.168.2.0 is directly connected, Serial0.1
D 172.168.3.0 [90/21026560] via 172.168.2.3, 00:00:30, Serial0.1
[90/21026560] via 172.168.2.2, 00:00:30, Serial0.1
162.16.0.0/24 is subnetted, 1 subnets
D 162.16.1.0 [90/20514560] via 172.168.2.3, 00:00:30, Serial0.1
[90/20514560] via 172.168.2.2, 00:00:30, Serial0.1
C 192.168.1.0/24 is directly connected, Loopback0
RTD#sh ip route
172.168.0.0/24 is subnetted, 4 subnets
D 172.168.4.0 [90/21177600] via 162.16.1.2, 00:01:15, FastEthernet0/0
D 172.168.1.0 [90/1794816] via 162.16.1.3, 00:01:15, FastEthernet0/0
[90/1794816] via 162.16.1.2, 00:01:15, FastEthernet0/0
D 172.168.2.0 [90/1792256] via 162.16.1.3, 00:02:15, FastEthernet0/0
[90/1792256] via 162.16.1.2, 00:02:15, FastEthernet0/0
C 172.168.3.0 is directly connected, Serial0/0
162.16.0.0/24 is subnetted, 1 subnets
C 162.16.1.0 is directly connected, FastEthernet0/0
D EX 150.150.0.0/16 [170/2425856] via 172.168.3.2, 00:02:53, Serial0/0
改了E的环回地址,重启后就正常了。
RTA#sh ip route
172.168.0.0/24 is subnetted, 4 subnets
D 172.168.4.0 [90/20640000] via 172.168.2.3, 00:09:38, Serial0.1
C 172.168.1.0 is directly connected, FastEthernet0
C 172.168.2.0 is directly connected, Serial0.1
D 172.168.3.0 [90/21026560] via 172.168.2.3, 00:00:41, Serial0.1
[90/21026560] via 172.168.2.2, 00:00:41, Serial0.1
162.16.0.0/24 is subnetted, 1 subnets
D 162.16.1.0 [90/20514560] via 172.168.2.3, 00:09:38, Serial0.1
[90/20514560] via 172.168.2.2, 00:09:38, Serial0.1
C 192.168.1.0/24 is directly connected, Loopback0
D EX 150.150.0.0/16 [170/21282560] via 172.168.2.3, 00:00:27, Serial0.1
[170/21282560] via 172.168.2.2, 00:00:27, Serial0.1
十一、认证问题,当D上没有配论证,而E上配了时,它们会无法建立邻居关系。
RTE(config)#int s0/0
RTE(config-if)#ip authentication mode eigrp 1 md5
RTE(config-if)#ip authentication key-chain eigrp 1 holly
RTE(config-if)#key chain holly
RTE(config-keychain)#key 1
RTE(config-keychain-key)#key-string 123
RTE#sh ip eigrp nei
IP-EIGRP neighbors for process 1
RTD(config)#int s0/0
RTD(config-if)#ip au
RTD(config-if)#ip authentication mode ei
RTD(config-if)#ip authentication mode eigrp 1 md5
RTD(config-if)#ip au
RTD(config-if)#ip authentication key
RTD(config-if)#ip authentication key-chain eig
RTD(config-if)#ip authentication key-chain eigrp 1 mikey
RTD(config-if)#key chain mikey
RTD(config-keychain)#key 1
RTD(config-keychain-key)#key
RTD(config-keychain-key)#key-string 123
RTD(config-keychain-key)#^Z
RTD#
03:22:16: %SYS-5-CONFIG_I: Configured from console by console
RTD#sh ip eigrp nei
IP-EIGRP neighbors for process 1
H Address Interface Hold Uptime SRTT RTO Q Seq Type
(sec) (ms) Cnt Num
2 172.168.3.2 Se0/0 14 00:00:00 1 2000 1 0
1 162.16.1.2 Fa0/0 14 00:00:04 1 3000 3 291
0 162.16.1.3 Fa0/0 14 00:00:05 4 200 0 276
RTD#sh ip route
172.168.0.0/24 is subnetted, 4 subnets
D 172.168.4.0 [90/21177600] via 162.16.1.2, 00:00:10, FastEthernet0/0
D 172.168.1.0 [90/1794816] via 162.16.1.2, 00:00:10, FastEthernet0/0
[90/1794816] via 162.16.1.3, 00:00:10, FastEthernet0/0
D 172.168.2.0 [90/1792256] via 162.16.1.2, 00:00:10, FastEthernet0/0
[90/1792256] via 162.16.1.3, 00:00:10, FastEthernet0/0
C 172.168.3.0 is directly connected, Serial0/0
162.16.0.0/24 is subnetted, 1 subnets
C 162.16.1.0 is directly connected, FastEthernet0/0
D EX 150.150.0.0/16 [170/2425856] via 172.168.3.2, 00:00:06, Serial0/0
十二、默认路由问题
在EIGRP中是不能用ip route 0.0.0.0 0.0.0.0 next-hop命令来通告默认路由的,只能用ip default-network命令来进行配置,比如在RTE上使用ip default-network 150.150.0.0 255.255.0.0,这样将使其它路由器上的150.150.0.0/16网络变成缺省网络(有*号)。
2513#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default
Gateway of last resort is 161.44.192.2 to network 198.10.1.0
161.44.0.0 255.255.255.0 is subnetted, 1 subnets
C 161.44.192.0 is directly connected, Ethernet0
S 161.44.0.0 255.255.0.0 [1/0] via 161.44.192.0
S* 198.10.1.0 [1/0] via 161.44.192.2
131.108.0.0 255.255.255.0 is subnetted, 1 subnets
C 131.108.99.0 is directly connected, TokenRing0
注:上面的输出不是基于本实验拓扑,只作为说明用。在上面的结果的蓝色部分可以看到有最后的网关了。
【路由器上的错误配置】
注:蓝色为正常时要用的,排错时去掉;绿色为在设错时添加的
帧中继交换机
(Config) # frame-relay switching
(Config) # int s0
! 进入s0端口
(config-if) # enacapsulation frame-relay
(config-if) # frame-relay intf-type dce
! 设置端口类型为DCE
(config-if) # frame-relay lmi-type cisco ! 配置lmi类型
(config-if) # clock rate 56000
(config-if) # frame-relay route 101 interface s1 102 !建立一条交换记录
(config-if) # frame-relay route 201 interface s2 202 ! 建立第二条交换记
(config-if) # no shut
(config-if) # exit
(Config) # int s1 !进入s1端口
(config-if) # encapsulation frame-relay
(config-if) # frame-relay intf-type dce
(config-if) # frame-relay lmi-type cisco
(config-if) # clock rate 56000
(config-if) # frame-relay route 102 interface s0 101
(config-if) # no shut
(config-if) # exit
(Config) # int s2 !进入s2端口
(config-if) # enacapsulation frame-relay
(config-if) # frame-relay intf-type dce
(config-if) # frame-relay lmi-type cisco
(config-if) # clock rate 56000
(config-if) # frame-relay route 202 interface s0 201
(config-if) # no shut
(config-if) # exit
路由器RTA的配置
int e 0
ip addr 172.168.1.1 255.255.255.0
no shut
int s0
encapsulation frame-relay
frame-relay lmi-type cisco
int s0.1 multipoint
ip addr 172.168.2.1 255.255.255.0
frame-relay map ip 172.168.2.2 101 broadcast(frame-relay map ip 172.168.2.2 102)
frame-relay map ip 172.168.2.3 201 broadcast(frame-relay map ip 172.168.2.2 202)
no ip split-horizon eigrp 1
no shut
int loopback 0
ip addr 192.168.1.1 255.255.255.0
exit
router eigrp 1
network 172.168.0.0
exit
路由器RTB的配置
int e 0
ip addr 162.16.1.2 255.255.255.0
no shut
int s0
no ip addr
encapsulation frame-relay
frame-relay lmi-type cisco
int s0.1 point-to-point
bandwidth 2048 (bandwidth 2040)
ip addr 172.168.2.2 255.255.255.0
frame-relay interface-dlci 102
exit
no shut
router eigrp 1
network 172.168.0.0
network 162.16.0.0
no auto-summary
exit
路由器RTC的配置
int e 0
ip addr 162.16.1.3 255.255.255.0
no shut
RTC(config)#int loopback 0
RTC(config-if)#ip addr 172.168.4.1 255.255.255.0
int s0
encapsulation frame-relay
frame-relay lmi-type cisco
int s0.1 point-to-point
bandwidth 2048
ip addr 172.168.2.3 255.255.255.0
frame-relay interface-dlci 202
exit
no shut
router eigrp 1
distribute-list 1 out fastEthernet 0
network 172.168.0.0
network 162.16.0.0
no auto-summary
Exit
access-list 1 deny 172.168.4.0 0.0.0.255
access-list 1 permit any
路由器RTD的配置
int e 0
ip addr 162.16.1.1 255.255.255.0 (ip addr 162.16.11.1 255.255.255.0)
no shut
int s0
RTD(config-if)#ip authentication mode eigrp 1 md5
RTD(config-if)#ip authentication key-chain eigrp 1 mikey
RTD(config-if)#key chain mikey
RTD(config-keychain)#key 1
RTD(config-keychain-key)#key-string 123
ip addr 172.168.3.1 255.255.255.0
clock rate 56000
no shut
router eigrp 1
network 172.168.0.0
network 162.16.0.0
no auto-summary
metric weights 0 1 1 1 1 0
exit
路由器RTE的配置
int s 0
RTE(config-if)#ip authentication mode eigrp 1 md5
RTE(config-if)#ip authentication key-chain eigrp 1 holly
RTE(config-if)#key chain holly
RTE(config-keychain)#key 1
RTE(config-keychain-key)#key-string 123
ip addr 172.168.3.2 255.255.255.0
clock rate 56000
no shut
int s1
ip addr 131.66.20.1 255.255.255.0
clock rate 56000
no shut
int loopback 0
ip addr 192.168.6.1 255.255.255.0(ip addr 192.168.1.1 255.255.255.0)
exit
router eigrp 1
network 172.168.0.0
redistribute rip
default-metric 10000 100 255 1 1500
distribute-list 1 out

exit
router rip
network 131.66.0.0
access-list 1 permit 150.150.0.0 0.0.255.255
外部的配置
int s0
ip addr 131.66.20.2
clock rate 56000
no shut
int loopback 0
ip addr 150.150.0.1 255.255.0.0
int loopback 1
ip addr 160.160.0.1 255.255.0.0
int loopback 2
ip addr 170.170.0.1 255.255.0.0
router rip

不抛弃也不放弃,所以我们就叫钢七连

Cisco系列之CCNP Lab Exercise(IS-IS)

【实验目的】:掌握IS-IS路由协议的基本配置,理解在CLNS和IP两种不同的第三层协议下,IS-IS配置的不同;理解DIS选举过程;熟悉IS-IS相关的配置命令与监视命令,并懂得在同一router上配置Multiarea。
【实验设备】:2500系列路由器两台,2600路由器3台,要求IOS为支持IS-IS协议的电信级版本
【实验拓扑】:拓扑结构如下:其中图一是用于第一部分实验,图二是用于第二部分实验;图三是用于第三部分实验;






【实验步骤】:
第一部份:DIS选举过程与single area 配置;
1 按图1连接好3台2600系列路由器,并按图上标出的地址配置好各个端口;检查各个配置端口是否出于正常状态;
2 启动IS-IS路由进程:在各个路由器的全局配置模式下按如下步骤启动路由进程:
R1:
router isis //configuration of is-is process
is-type level-1
net 49.0001.1111.1111.1111.00
R2:
router isis //configuration of is-is process
is-type level-1
net 49.0001.2222.2222.2222.00
R3:
router isis //configuration of is-is process
is-type level-1
net 49.0001.3333.3333.3333.00
3 将IS-IS进程应用到端口上:在各个路由器中,分别对于 f0/0和lo0,运行IS-IS路由。在接口模式下,配置如下命令:
ip router isis //在某一接口上运行IS-IS
4 观察DIS:要查看IS-IS的数据库信息,可以用show isis database命令来查看LSP包的情况。通过该命令可查看出在LAN中哪一台路由器作为DIS。
5 改变接口优先级以便人为干涉DIS选举过程:由于DIS选举是首先基于优先级的,因此我们可以通过改变接口优先级来控制DIS的选举,所用到的命令如下:
Router(config-if)#isis priority 100 //change priority to 100
6 此时可以再用show isis database 来查看DIS的变化;
7 另外几个重要的观察IS-IS的命令是:
show isis topology //查看IS-IS所生成的拓扑结构
show ip route, show clns route, //查看IP路由和CLNS路由
show clns neighbors //查看邻居情况
第二部份:区域间路由(FOR IP and CLNS)
For IP 协议
1 按图2连接好设备并配置好IP地址;
2 类似于第一部分那样给各个路由器启动IS-IS进程,但NET有所不同,差别如下:
R1:
router isis //configuration of is-is process
is-type level-1
net 49.0001.1111.1111.1111.00
R2:
router isis //configuration of is-is process
is-type level-1-2
net 49.0001.2222.2222.2222.00
R3:
router isis //configuration of is-is process
is-type level-1-2
net 49.0002.3333.3333.3333.00
3 在接口上运行IS-IS:在R1的f0/0,lo0,R2的f0/0,lo0,s0上以及R3的lo0,s0上分别运行IS-IS
4 用上面介绍的观察命令检查数据库和路由表,并尝试是否能在不同网段间互相通信(ping测试)。
5 观察IS-IS database中level-1和level-2的信息,比较他们之间的不同,据此理解level-1和level-2他们之间的功能差别。
For CLNS 协议
6 用no命令将上面第3步中对端口所设的ip router isis命令取消,并改为clns router isis,此时IS-IS所支持的第三层协议为CLNS,此时我们可以用show clns route和show isis route来查看clns 的路由信息。比较这两个命令所显示的路由信息与IP路由信息的不同。
7 检查CLNS网络的连通性:有几种途径:一个可行的方法是用show clns route看路由,也可以在特权模式下用which-route命令来查看到某一个NSAP是否能找到相应的路由,请在路由器上试运行该命令查看。但最直接的方法当然用ping命令和traceroute命令,如下:
ping clns <CLNS 地址>
traceroute clns <CLNS 地址>
第三部份:CISCO路由器的对multiarea特性的支持:在此部分实验中,我们将在其中一台路由器上启动多个IS-IS路由进程,并将不同的进程应用到相应的接口上,使一个路由器可以支持多个area。
1 按图3连接好设备并配置好IP地址;
2 在R1上启动三个路由进程:
router isis A1 //configuration of is-is process A1
is-type level-1-2
net 49.0001.1111.1111.1111.00
router isis A2 //configuration of is-is process A2
is-type level-1
net 49.0002.1111.1111.1111.00
router isis A3 //configuration of is-is process A3
is-type level-1
net 49.0003.1111.1111.1111.00
3 在R1的loopback0,loopback1,s0上分别运行不同的路由进程,配置如下:
interface s0
ip router isis A1
interface loopback 0
ip router isis A2
interface loopback 1
ip router isis A3

4 与R1的配置方法相似,按图3在R2上配置IS-IS进程。
5 检查路由表及IS-IS数据库,并用ping测试网络是否能连通。
6 去掉for IP协议的配置,将其改为for CLNS协议,以与上面类似的方法配置IS-IS routing for CLNS
【注意事项】:
1 IS-IS路由协议在CISCO路由器中只在电信级的IOS中支持;
2 要看到DIS选举过程的变化,可先通过 debug isis updatepackets命令打开debug功能;
3 对于CLNS和IP协议,IS-IS的配置有所不同,要主要他们配置的不同主要在于端口模式下的启动形
式,对于IP协议是ip router isis,而对于CLNS则是clns router isis。比较这两种设置不同所造成的路由表的差别。
4 DIS只存在在LAN里面,点对点连接中不存在DIS,这可以在IS-IS database里面看出来

不抛弃也不放弃,所以我们就叫钢七连

Cisco系列之CCNP Lab Exercise(Modem)

实验目的:
1) 了解modem的基本配置
2) 通过modem登陆到路由器上配置路由器(用serial口和aux口两种)
3) 两台路由器通过modem连接
实验设备:
两台路由器(带serial<->com口连线),两台modem,一台程控交换机
实验内容:
1、 通过serial 口和modem连接,并且能登陆到路由上配置路由,如图

enable password cisco
!
interface Serial1――配置serial为异步线路(配置modem连接必要的第一步)
physical-layer async
no ip address
!
line 2――serial上modem的物理层配置(line模式下为物理配置、int模式下为逻辑配置)
password cisco
login //以上两步配置和line vty中配置原理相同
modem InOut //modem既可被拨入,又可以拨出
modem autoconfigure discovery //modem自动检测
transport input all //允许所有的协议都可以通过该线路送入访问服务器
stopbits 1 //设置每个字节的停止位数
speed 115200 //设置modem和路由器之间的最大数据传输速率
flowcontrol hardware //使用RTS/CTS信号进行硬件流控
配置好后,配置主机的拨号设置为“连接后显示终端”,然后用超级终端或者拨号连接就能登陆到路由器上,对路由器进行配置:
User Access Verification
Password:
为Serial配置一个ip地址,用show line命令确定端口后(line号+2000),反向telnet
1
到modem上(telnet host_ip port)试用一下modem上AT指令(由于标准和指令的不统一,所以不作实验要求)。用ctrl-shift-6 x或disconnect退出。
2、配置广域网拨号连接,如图

line号(例如1720:con 0为line 0、serial 0-3为line 1-4、aux 0为 serial的数目+1=5、vty 0 4为line 6-9。)用show line来确定,注意的是,不同端口的最高传输速率是不同的。
中心路由配置如下:
enable password cisco
!
interface loopback 0
ip address 172.16.0.1 255.255.255.0

interface Serial1
physical-layer async
ip address 10.20.1.1 255.255.255.0
encapsulation ppp
keepalive 10 //规定发送keepalive包到其他路由器的时间
async mode dedicated //访问端口为dedicated,用户不能执行任何命令和改变任何配置
no cdp enable
line 2
password cisco
login
modem InOut
modem autoconfigure discovery
transport input all
stopbits 1
speed 115200
flowcontrol hardware

ip route 0.0.0.0 0.0.0.0 10.20.1.2
配置远程节点路由器
!
enable password cisco
!
2
interface loopback 0
ip address 192.168.0.1 255.255.255.0

interface Serial3
physical-layer async
ip address 10.20.1.2 255.255.255.0
encapsulation ppp
keepalive 10
dialer in-band //启用DDR和V.25bis(一个带内信令标准)拨号
dialer idle-timeout 300 //如果空闲5分钟则关闭连接
dialer wait-for-carrier-time 60 //连接发生等待最多一分钟
dialer map ip 10.10.1.1 name as200-e broadcast 84――84为对方号码
dialer hold-queue 50
dialer-group 1 //类似ip access-group
async mode dedicated
no cdp enable
!
line 4
password cisco
login
modem InOut
stopbits 1
speed 115200
flowcontrol hardware

dialer-list 1 protocol ip permit //类似access-list

ip route 0.0.0.0 0.0.0.0 10.20.1.1

由于异步modem不是完全标准化,用户必须写出定制的chat-scripts以执行下列任务:modem配置、拨号和远程登陆命令、失败检测。其基本形式如下:
Router(config)#chat-script script-name expect-string send-string
其中expect-string为本地系统期望从远端系统收到的字符串,send-string为本地系统应发送的字符串。一句话,就是告诉路由器当收到某些信号时采取什么行动(例如断开连接,或者向modem发出AT指令等)。例如ABORT ERROR就是收到ERROR信号就停止执行该chat-script、”” “ATZ”就是不必收到什么信号都发送”ATZ”复位指令、OK “ATDT\T”为收到OK信号就发送”ATDT\T”指令、TIMEOUT 30 CONNECT表示最多为收到”CONNECT”字符串等待30秒、\c表示不再发送的字符串后加回车符。

不抛弃也不放弃,所以我们就叫钢七连

Cisco系列之CCNP Lab Exercise(PPP)

实验目的
1) 了解拨号上网的基本配置,了解地址分配的几种方法
2) 了解认证协议的配置
实验拓扑:

实验步骤:
1) 配置静态接入地址
在路由器上配置为:
RTA#show run
!
hostname RTA
!
enable password cisco
!
no ip domain-lookup
!
chat-script aa56k ABORT ERROR "" "AT Z" OK "ATDT\T" TIMEOUT 30 CONNECT \c
!
interface Serial0
physical-layer async ――串口设置为异步模式
ip address 10.1.1.2 255.255.255.0 ――分配串口地址
encapsulation ppp ――启动PPP协议
keepalive 10 ――规定发送keepalive包到其他路由器的时间
async mode interactive ――相应PPP连接与EXEC连接
peer default ip address 10.1.1.3 ――配置接入地址为固定IP
!
ip classless
ip route 0.0.0.0 0.0.0.0 10.1.1.1 ――定义最后默认路由
!
line 1
password cisco
login
modem InOut
modem autoconfigure discovery
transport input all
autoselect ppp ――判断,选择PPP协议
stopbits 1
speed 115200
flowcontrol hardware
line vty 0 4
password cisco
!
启动PPP:配置好路由器后,在主机上连接modem,然后启动拨号连接,只需要填写接入号码,不需要填写任何其他信息。拨号后,在主机上运行winipcfg可以看到拨号所获得的IP地址,在主机上可以ping通网关。证明主机自动发出PPP连接请求,路由器能响应PPP连接
2) 配置动态地址分配
修改配置为:
interface Serial0
physical-layer async
ip address 10.1.1.2 255.255.255.0
encapsulation ppp
keepalive 10
async mode interactive
peer default ip address pool ippool

ip local pool ippool 10.1.1.5 10.1.1.15
配置好后,在主机上进行同样的拨号,应该可以获得10.1.1.5的IP地址。断开后再进行拨号,可以获得下一个IP。
启动EXEC:在拨号属性里选择“拨号后出现终端窗口”属性,再次拨号。拨号后提示输入密码,输入cisco就可以进入路由配置EXEC模式(即路由用户配置模式)。这里的cisco是line 1的login password。如果输入cisco后输入ppp的话,路由将启动PPP协议。
3) 自动地址分配(由用户手动定义IP地址)
配置为:
interface Serial0
physical-layer async
ip address 10.1.1.2 255.255.255.0
encapsulation ppp
keepalive 10
async dynamic address
async mode interactive
no peer default ip address

可以在拨号属性的TCP/IP配置里面填写IP地址,或者在“终端窗口”的用户提示
模式下输入ppp,然后输入你所需要的IP地址。在主机上运行winipcfg查看所获得的IP地址。
4) 配置密码认证
在路由器上配置:
interface Serial0
physical-layer async
ip address 10.1.1.2 255.255.255.0
encapsulation ppp
keepalive 10
async dynamic address
async mode interactive
peer default ip address pool ippool
ppp authentication chap
!
username abc password cisco

在拨号的时候要加上用户名与密码。检验一下用户名,密码有错的时候能否接入。
5) 通过拨号认证连接两台路由器
实验拓扑如下:

为两台路由器之间的拨号连接加上密码认证
路由器RTA的配置为:
hostname RTA
username RTB password ciscob
!
chat-script aa56k ABORT ERROR "" "AT Z" OK "ATDT\T" TIMEOUT 30 CONNECT \c

interface Serial0
physical-layer async
ip address 10.1.1.2 255.255.255.0
encapsulation ppp
keepalive 10
async mode dedicated
ppp authentication pap
ppp pap sent-username RTA password ciscoa
!
路由器RTB的配置为:
hostname RTB
!
username RTA password ciscoa
chat-script abc56k ABORT ERROR "" "AT Z" OK "ATDT\T" TIMEOUT 30 CONNECT \c
!
interface Serial0
physical-layer async
ip address 10.1.1.1 255.255.255.0
encapsulation ppp
keepalive 10
dialer in-band //让路由器发起拨号连接
dialer map ip 10.1.1.2 name RTA modem-script abc56k broadcast 88
//88为对端的电话号码,以实际的为准
dialer-group 1
async mode dedicated
ppp authentication pap //认证方式为pap方式
ppp pap sent-username RTB password ciscob //发送认证用户名、密码
!
ip route 0.0.0.0 0.0.0.0 10.1.1.2
!
dialer-list 1 protocol ip permit
!
line 1
password cisco
login
modem InOut
modem autoconfigure discovery
transport input all
stopbits 1
speed 115200
flowcontrol hardware
然后在RTB上通过ping来连接RTA。通过debug ppp authentication与debug ppp negotiation。在两台路由器上用show line 来看线路的情况,如果线路忙,要发连接的话先用clear line 1来清除原来的连接。若速率不匹配(即不为115200)请重启modem,再用show line 来观测,直到两端的异步端口速率都为115200。
若认证方式改为chap,则要在端口模式下输入ppp authentication chap 删除 ppp pap sent-username *** password *****,而且输入对方的主机名,且使用相同的密码
如在RTA 上输入username RTB password cisco ;在RTB上输入 username RTA password cisco

不抛弃也不放弃,所以我们就叫钢七连

Cisco系列之CCNP Lab Exercise(queueing)

[实验目的]
配置验证加权公平队列,优先级队列和可定制队列,
观察比较各自的特点。
[知识概述]
在router上,数据包传输的经典算法是先进先出(FIFO)算法。采用FIFO,数据包的传输与其被接收的顺序一致。当在WAN上由于突发性流量和相对低速流量的同时存在,可能引起暂时性的拥塞,这时候可以采用对数据流进行优先级划分的方法来解决拥塞,保证为用户提供适当的服务质量。CISCO IOS提供了另外3种队列技术:加权公平队列(WFQ),优先级队列(PQ),可定制队列(CQ)。
[实验拓扑]

Router_A Router_B
F0
192.168.1.1/24 S0 S0 F0
192.168.2.2/24 192.168.2.1/24 10.2.*.*/16 GW:10.2.0.1
server:ftp.zsu.edu.cn
Host A
192.168.1.2/24 Router B控制台
本实验由Host A触发数据流,观察实验现象;在RouterB配置并观察队列。
Router B的以太口接至实验室内部网,默认路由指向内部网关:10.2.0.1
由服务器ftp.zsu.edu.cn提供FTP服务。
因为网关没有192.168.*.*网段的正确路由,所以需要设置NAT。
[实验过程]
基本配置:
RouterA:
interface FastEthernet0
ip address 192.168.1.1 255.255.255.0 //配置 IP地址
no shutdown
interface Serial 0
ip address 192.168.2.2 255.255.255.0
clock rate 56000
no shutdown
router rip //配置路由
network 192.168.1.0
network 192.168.2.0
ip route 0.0.0.0 0.0.0.0 10.2.0.1
RouterB
ip route 0.0.0.0 0.0.0.0 10.2.0.1 //配置默认路由
ip nat inside source static 192.168.1.2 10.2.*.* //配置NAT
interface FastEthernet0
ip address 10.2.*.* 255.255.0.0
ip nat outside
no shutdown
interface Serial 0
ip address 192.168.2.1 255.255.255.0
clock rate 56000
ip nat inside
no shutdown
router rip
network 10.0.0.0
network 192.168.2.0
passive-interface FastEthernet0 //使RIP不在内部网交换信息
一. 加权公平队列(WFQ)
加权公平队列是一种为所有数据流提供公平带宽分配的自动方式。该算法将数据流分成对话(conversation)信息,在传输数据之前将各个对话的数据包放到公平队列(fair queue)中进行排序,将数据包从WFQ中提取出来的次序是由每个到达的packet的最后一个bit的虚拟发送时间决定的,小数据量对话的packet优先级高于大数据量对话的packet。当小数据量的数据包被发送之后,其他各个大数据量对话的数据包将公平地分享剩下的带宽。
将数据流划为对话(conversation)的方法是根据数据包头的信息,例如源/目的网络地址、MAC地址、端口号、socket号、frame relay的DLCI值……WFQ在E1速率(2.048Mb/s)或E1以下速率的物理接口上是被默认启用的。
!
queque 绑定在RouterB的Serial0端口上
interface Serial0
fair-queue
(fair-queue 128)
//128是拥塞丢弃门限值,默认为64
//在这个实验中没有配置门限值,采用默认值64
!
验证fair queue:
正常状态(无流量):
#show queueing int s0
Interface Serial0 queueing strategy: fair Input queue: 0/75/0 (size/max/drops); Total output drops: 0 Queueing strategy: weighted fair
Output queue: 0/1000/64/0 (size/max total/threshold/drops) Conversations 0/1/256 (active/max active/max total) //会话序号
Reserved Conversations 0/0 (allocated/max allocated)
#sh queueing fair
Current fair queue configuration:
Interface Discard Dynamic Reserved Link Priority
threshold queues queues queues queues
Serial0 64 16 0 8 1
观察WFQ:在host A上Ping ftp.zsu.edu.cn,同时拉ftp.zsu.edu.cn的文件
show queueing int s0/0
与FIFO比较:
interface Serial0
no fair-queue
clockrate 56000
!
#show queueing int s0
结论:WFQ 确保了低数据量的数据流(例如telnet,ping)能被及时传输。
ps ,也可以利用http触发多个数据流观察.
二. 优先级队列(PQ)
有4个队列:high,medium,normal,low。高优先级队列中的数据包总是在优先级别低于它的队列之前被发送出去。好处:管理员可以设置关键型的数据流总是优先于其他数据被传输。弊端:高优先级队列中的数据包有可能会占用所有可以获得的带宽,在低优先级队列中的数据包有可能不能被及时发送或者根本就没机会被发送了。
在RouterB上配置
interface Serial0
ip access-group 103 out
priority-group 1
clockrate 56000
!
access-list 101 permit icmp any host 192.168.1.2
access-list 103 permit ip any any log //记录数据包数量
priority-list 1 protocol ip high tcp ftp
priority-list 1 protocol ip medium list 101
priority-list 1 interface Serial1 normal

priority-list 1 default low //默认队列的优先级默认为normal,这里改为low
priority-list 1 queue-limit 5 10 15 20 //每个队列的数据包默认容量为20 40 60 80
!
#sh queueing priority
Current DLCI priority queue configuration:
Current priority queue configuration:
List Queue Args
1 low default
1 high protocol ip tcp port ftp
1 medium protocol ip list 101
1 normal interface Serial1
1 high limit 5
1 medium limit 10
1 normal limit 15
1 low limit 20
为较好的观察优先对列对数据优先级的影响,
建议通过同时触发多条数据流并更改优先级队列观察比较。
注:telnet 可以用 telnet bbs.zsu.edu.cn
如:ftp-data为high时,ping与telnet等完全无法工作,显示为time out; ftp-data为medium时, 设ping为high,则telnet无法工作,
ping正常,但延迟大于正常状态。
ftp-data为low时,telnet设normal,则虽有延迟,但可工作。
同时可观察 队列缓冲看统计
三. 可定制队列(CQ)
最多有16个队列可用。避免了优先级队列可能出现的独占带宽的弊端。用户可以采用命令queue-list list-No queue queue-No byte-count limit-num为每个队列分配一定比例的带宽,路由器采用循环机制依次为每个队列服务。这样,没有一种类型的数据流有独占全部带宽的可能性。(使用Round-robin算法,达到队列门限值或者队列为空后转入下一队列工作)
注:若无定制default队列,则数据流并入队列1.
在RouterB上配置
interface Serial0
ip access-group 103 out
custom-queue-list 1
clockrate 56000
!
access-list 101 permit icmp any host 192.168.1.2
access-list 103 permit ip any any log
queue-list 1 protocol ip 1 tcp ftp
queue-list 1 protocol ip 2 list 101
queue-list 1 protocol cdp 3

queue-list 1 interface Serial1 4
queue-list 1 default 5
queue-list 1 queue 1 byte-count 1400
! // 规定了这个队列在一个循环周期中可以传
// 输的最小字节数。默认为1500字节。
#sh queueing custom
Current custom queue configuration:
List Queue Args
1 5 default
1 1 protocol ip tcp port ftp
1 2 protocol ip list 101
1 3 protocol cdp
1 4 interface Serial1
1 1 limit 4500
#sh queueing int s0
Interface Serial0 queueing strategy: custom
Output queue utilization (queue/count)
0/33 1/0 2/294 3/8 4/0 5/0 6/0 7/0 8/0
9/0 10/0 11/0 12/0 13/0 14/0 15/0 16/0
同PQ,建议通过同时触发多条数据流观察比较。
观察到的现象:同时ftp与ping,ping的延迟较PQ大,但比FIFO好。

不抛弃也不放弃,所以我们就叫钢七连