思科路由综合实验案例

实验拓扑:

实验目标:

通过综合实验复习路由部分的配置

实验步骤:

1:配置相关地址,确保直连网络的通信

2:配置所有Serial接口时钟频率为64000,参考带宽为1544K

3:配置EIGRP区域,AS号为100,并关闭自动汇总

4:对R4loopback 接口实施手工汇总

5:在R1 上实施EIGRP 非等价负载均衡

6:根据拓扑所示,配置OSPF 多区域

7:在R6R7 之间配置OSPF MD5 验证

8:确保R5成为DR

9:在R4 上配置静态默认路由,并配置EIGRP默认路由

10:在R5上配置静态默认路由,并配置OSPF默认路由

11:在R2R3上实施HSRP,确保R2 成为主路由器,虚拟地址为192.168.1.254,并对R2FA0/0

接口进行跟踪

12:保证EIGRPOSPF两个区域通信,但不允许使用路由重分发

实验配置:

1:配置相关地址,测试直连网络的通信(略)

2:查看Serial接口默认时钟频率并按要求配置时钟频率

R1#show controllers s0/2/0

Interface Serial0/2/0

Hardware is PowerQUICC MPC860

DCE V.35, clock rate 2000000

(以下省略部分输出)

R1(config)#inter s0/2/0

R1(config-if)#clock rate 64000

R6(config)#inter s0/3/0

R6(config-if)#clock rate 64000

3:配置所有Serial接口的参考带宽为1544

R1(config)#inter s0/2/0

R1(config-if)#bandwidth 1544

R3(config)#inter s0/2/0

R3(config-if)#band 1544

R6(config)#inter s0/3/0

R6(config-if)#band 1544

R7(config)#inter s0/3/0

R7(config-if)#band 1544

4:配置EIGRP并关闭自动汇总

R1(config)#router ei 100

R1(config-router)# no auto-summary

R1(config-router)#net 192.168.12.0

R1(config-router)#net 192.168.13.0

R1(config-router)#net 192.168.14.0

R2(config)#router ei 100

R2(config-router)#no auto

R2(config-router)#net 192.168.12.0

R2(config-router)#net 192.168.1.0

R2(config-router)#passive-interface fa0/1

R3(config)#router ei 100

R3(config-router)#no au

R3(config-router)#net 192.168.1.0

R3(config-router)#net 192.168.13.0

R3(config-router)#pass fa0/1

R4(config)#router ei 100

R4(config-router)#no aut

R4(config-router)#net 192.168.45.0

R4(config-router)#net 192.168.14.0

R4(config-router)#net 172.16.0.0 0.0.3.255

R4(config-router)#pass fa0/0

检查路由表:

R1#show ip route eigrp

172.16.0.0/24 is subnetted, 4 subnets

D 172.16.0.0 [90/156160] via 192.168.14.2, 00:00:25, FastEthernet0/1

D 172.16.1.0 [90/156160] via 192.168.14.2, 00:00:25, FastEthernet0/1

D 172.16.2.0 [90/156160] via 192.168.14.2, 00:00:25, FastEthernet0/1

D 172.16.3.0 [90/156160] via 192.168.14.2, 00:00:25, FastEthernet0/1

D 192.168.1.0/24 [90/30720] via 192.168.12.2, 00:01:06, FastEthernet0/0

D 192.168.45.0/24 [90/30720] via 192.168.14.2, 00:00:33, FastEthernet0/1

R4#show ip route eigrp

172.16.0.0/24 is subnetted, 4 subnets

D 192.168.1.0/24 [90/33280] via 192.168.14.1, 00:00:18, FastEthernet0/1

D 192.168.12.0/24 [90/30720] via 192.168.14.1, 00:00:18, FastEthernet0/1

D 192.168.13.0/24 [90/2172416] via 192.168.14.1, 00:00:18, FastEthernet0/1

5:配置EIGRP手工汇总

R4(config)#inter fa0/1

R4(config-if)#ip summary-address eigrp 100 172.16.0.0 255.255.252.0

检查路由表更新

R1#sho ip ro ei

172.16.0.0/22 is subnetted, 1 subnets

D 172.16.0.0 [90/156160] via 192.168.14.2, 00:00:34, FastEthernet0/1

D 192.168.1.0/24 [90/30720] via 192.168.12.2, 00:05:01, FastEthernet0/0

D 192.168.45.0/24 [90/30720] via 192.168.14.2, 00:00:34, FastEthernet0/1

R4#show ip route eigrp

172.16.0.0/16 is variably subnetted, 5 subnets, 2 masks

D 172.16.0.0/22 is a summary, 00:00:34, Null0

D 192.168.1.0/24 [90/33280] via 192.168.14.1, 00:00:33, FastEthernet0/1

D 192.168.12.0/24 [90/30720] via 192.168.14.1, 00:00:33, FastEthernet0/1

D 192.168.13.0/24 [90/2172416] via 192.168.14.1, 00:00:33, FastEthernet0/1

6:配置EIGRP非等价负载均衡

R1#show ip ei topology

IP-EIGRP Topology Table for AS 100

Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,

r - Reply status

P 192.168.12.0/24, 1 successors, FD is 28160

via Connected, FastEthernet0/0

P 192.168.1.0/24, 1 successors, FD is 30720

via 192.168.12.2 (30720/28160), FastEthernet0/0

via 192.168.13.2 (2172416/28160), Serial0/2/0

P 192.168.13.0/24, 1 successors, FD is 2169856

via Connected, Serial0/2/0

P 192.168.14.0/24, 1 successors, FD is 28160

via Connected, FastEthernet0/1

P 192.168.45.0/24, 1 successors, FD is 30720

via 192.168.14.2 (30720/28160), FastEthernet0/1

P 172.16.0.0/22, 1 successors, FD is 156160

via 192.168.14.2 (156160/128256), FastEthernet0/1

2172416÷30720 = 70.716 取值71

R1(config)#router ei 100

R1(config-router)#variance 71

R1#show ip ro ei

172.16.0.0/22 is subnetted, 1 subnets

D 172.16.0.0 [90/156160] via 192.168.14.2, 00:00:36, FastEthernet0/1

D 192.168.1.0/24 [90/30720] via 192.168.12.2, 00:00:38, FastEthernet0/0

[90/2172416] via 192.168.13.2, 00:00:35, Serial0/2/0

D 192.168.45.0/24 [90/30720] via 192.168.14.2, 00:00:36, FastEthernet0/1

7:配置OSPF多区域

R5(config)#router ospf 1

R5(config-router)#net 192.168.45.0 0.0.0.255 area 0

R5(config-router)#net 192.168.56.0 0.0.0.255 area 0

R5(config-router)#passive-interface fa0/0

R6(config)#router ospf 1

R6(config-router)#net 192.168.56.0 0.0.0.255 area 0

R6(config-router)#net 192.168.67.0 0.0.0.255 area 1

R7(config)#router ospf 1

R7(config-router)#net 192.168.67.0 0.0.0.255 area 1

R7(config-router)#net 192.168.7.0 0.0.0.255 area 1

R7(config-router)#net 192.168.8.0 0.0.0.255 area 1

R5#show ip route ospf

192.168.7.0/32 is subnetted, 1 subnets

O IA 192.168.7.1 [110/66] via 192.168.56.2, 00:00:09, FastEthernet0/1

192.168.8.0/32 is subnetted, 1 subnets

O IA 192.168.8.1 [110/66] via 192.168.56.2, 00:00:09, FastEthernet0/1

O IA 192.168.67.0 [110/65] via 192.168.56.2, 00:00:49, FastEthernet0/1

8:配置EIGRP默认路由向内部传递(扩展内容)

查看跨协议区域的通信情况:

R2#ping 192.168.45.2

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.45.2, timeout is 2 seconds:

.....

Success rate is 0 percent (0/5)

配置静态默认路由,并用产生EIGRP默认路由,向内容通告:

R4(config)#ip route 0.0.0.0 0.0.0.0 192.168.45.2

R4(config)#ip default-network 192.168.45.0

查看路由表变化:

R4#show ip ro

(此处省略部分输出)

C 192.168.14.0/24 is directly connected, FastEthernet0/1

C* 192.168.45.0/24 is directly connected, FastEthernet0/0

S* 0.0.0.0/0 [1/0] via 192.168.45.2

R1#show ip ro ei

172.16.0.0/22 is subnetted, 1 subnets

D 172.16.0.0 [90/156160] via 192.168.14.2, 00:03:13, FastEthernet0/1

D 192.168.1.0/24 [90/30720] via 192.168.12.2, 00:03:13, FastEthernet0/0

[90/2172416] via 192.168.13.2, 00:03:13, Serial0/2/0

D* 192.168.45.0/24 [90/30720] via 192.168.14.2, 00:00:15, FastEthernet0/1

R2#show ip ro ei

172.16.0.0/22 is subnetted, 1 subnets

D 172.16.0.0 [90/158720] via 192.168.12.1, 00:01:20, FastEthernet0/0

D 192.168.13.0/24 [90/2172416] via 192.168.12.1, 00:01:20, FastEthernet0/0

D 192.168.14.0/24 [90/30720] via 192.168.12.1, 00:01:20, FastEthernet0/0

D* 192.168.45.0/24 [90/33280] via 192.168.12.1, 00:00:46, FastEthernet0/0

R3#show ip ro ei

172.16.0.0/22 is subnetted, 1 subnets

D 172.16.0.0 [90/2300416] via 192.168.13.1, 00:07:40, Serial0/2/0

D 192.168.12.0/24 [90/2172416] via 192.168.13.1, 00:07:40, Serial0/2/0

D 192.168.14.0/24 [90/2172416] via 192.168.13.1, 00:07:40, Serial0/2/0

D* 192.168.45.0/24 [90/2174976] via 192.168.13.1, 00:01:24, Serial0/2/0

9:配置OSPFMD5验证

R6(config)#inter s0/3/0

R6(config-if)#ip ospf authentication message-digest

R6(config-if)#ip ospf message-digest-key 1 md5 ccna

R7(config)#inter s0/3/0

R7(config-if)#ip ospf authentication message-digest

R7(config-if)#ip ospf me 1 md ccna

10:配置R5成为DR

R5(config)#inter fa0/1

R5(config-if)#ip ospf priority 2

R5#clear ip ospf process

Reset ALL OSPF processes? [no]: yes

R5#show ip ospf inter fa0/1

FastEthernet0/1 is up, line protocol is up

Internet address is 192.168.56.1/24, Area 0

Process ID 1, Router ID 192.168.56.1, Network Type BROADCAST, Cost: 1

Transmit Delay is 1 sec, State DR, Priority 2

Designated Router (ID) 192.168.56.1, Interface address 192.168.56.1

Backup Designated Router (ID) 192.168.67.1, Interface address 192.168.56.2

Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5

(以下省略部分输出)

R6#show ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface

192.168.56.1 2 FULL/DR 00:00:31 192.168.56.1 FastEthernet0/1

192.168.8.1 0 FULL/ - 00:00:33 192.168.67.2 Serial0/3/0

11:配置OSPF默认路由并向内部传递(扩展内容)

R5(config)#ip route 0.0.0.0 0.0.0.0 192.168.45.1

R5(config)#router ospf 1

R5(config-router)#default-information originate

测试 OSPF区域和EIGRP区域的通信

R7#ping 192.168.1.1

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 5/9/13 ms

R7#ping 192.168.1.2

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 1/6/14 ms

12:配置HSRP

R2(config)#inter fa0/1

R2(config-if)#standby 1 ip 192.168.1.254

R2(config-if)#standby 1 priority 110

R2(config-if)#standby 1 preempt

R2(config-if)#standby 1 track

R2(config-if)#standby 1 track fa0/0

R3(config)#inter fa0/1

R3(config-if)#standby 1 ip 192.168.1.254

R3(config-if)#standby 1 priority 105

R3(config-if)#standby 1 preempt

R2#show standby brief

P indicates configured to preempt.

|

Interface Grp Pri P State Active Standby Virtual IP

Fa0/1 1 110 P Active local 192.168.1.2 192.168.1.254

13:配置PC网关为192.168.1.254(略)

14:测试PC0OSPF区域的通信,并追踪流量路径

15:验证HSRP切换过程

R2(config)#inter fa0/0

R2(config-if)#shutdown

R2#show standby brief

P indicates configured to preempt.

|

Interface Grp Pri P State Active Standby Virtual IP

Fa0/1 1 100 P Standby 192.168.1.2 local 192.168.1.254

注意:在R4上需要clear ip ro* 路由才会重新收敛---(PT的问题)

R4#cle ip ro *

再次在PC0上追踪流量路径