Chinaunix首页 | 论坛 | 博客
  • 博客访问: 214156
  • 博文数量: 48
  • 博客积分: 4011
  • 博客等级: 上校
  • 技术积分: 695
  • 用 户 组: 普通用户
  • 注册时间: 2009-06-26 17:15
文章分类

全部博文(48)

文章存档

2011年(1)

2010年(1)

2009年(46)

我的朋友

分类: 系统运维

2009-06-27 15:55:34

实验目的:

1、理解OSPF虚链路原理及何时需要使用虚链路。

2、掌握OSPF虚链路配置方法

实验拓扑图:

实验步骤及要求:

1、配置各台路由器的IP地址,并且使用Ping命令确认各路由器的直连口的互通性。

2、首先配置R2,R3,R4的OSPF协议,配置过程中注意区域号: 

3、完成配置后,查看R1的路由表。

R1#show ip route 

Gateway of last resort is not set

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

C       172.16.255.0/30 is directly connected, Serial1/1

O IA    172.16.255.4/30 [110/128] via 172.16.255.2, 00:02:11, Serial1/1

C       172.16.1.0/24 is directly connected, Loopback0

R1#

4、查看R2的路由表:

R2#show ip route 

Gateway of last resort is not set

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

C       172.16.255.0/30 is directly connected, Serial1/0

C       172.16.255.4/30 is directly connected, Serial1/1

O       172.16.1.1/32 [110/65] via 172.16.255.1, 00:05:10, Serial1/0

R2#

5、查看R3的路由表:

R3#show ip route 

Gateway of last resort is not set

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

C       172.16.255.4/30 is directly connected, Serial1/0

C       172.16.255.8/30 is directly connected, Serial1/1

O IA    172.16.16.1/32 [110/65] via 172.16.255.10, 00:05:16, Serial1/1

R3#

6、查看R4路由表:

R4#show ip route 

Gateway of last resort is not set

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

O IA    172.16.255.4/30 [110/128] via 172.16.255.9, 00:19:32, Serial1/0

C       172.16.255.8/30 is directly connected, Serial1/0

C       172.16.16.0/24 is directly connected, Loopback0

R4#

7、通过以上查看,可以发现,任何一台路由器都无法学习到完整的网络路由。产生此问题的主要原因是:骨干0的区域被area 2分割,造成整个网络变成两个OSPF的自治系统。所以相互之间都无法学习完整的路由。

8、在这种情况下,可以通过配置虚链路来解决骨干被分割的问题。在R2与R3的路由器上实施如下配置:

R2(config)#router ospf 1

R2(config-router)#area 2 virtual-link 172.16.255.9

R2(config-router)#exit

R2(config)#exit

R2#

R3(config)#router ospf 1

R3(config-router)#area 2 virtual-link 172.16.255.5

R3(config-router)#exit

R3(config)#exit

R3#

9、查看任意一台路由,确认路由学习情况。本处选择R1路由器。

R1#show ip route 

Gateway of last resort is not set

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

C       172.16.255.0/30 is directly connected, Serial1/1

O IA    172.16.255.4/30 [110/128] via 172.16.255.2, 00:01:08, Serial1/1

O       172.16.255.8/30 [110/192] via 172.16.255.2, 00:01:08, Serial1/1

O IA    172.16.16.1/32 [110/193] via 172.16.255.2, 00:01:08, Serial1/1

C       172.16.1.0/24 is directly connected, Loopback0

R1#

10、接下来,使用ping命令,确认路由是否有效。

R1#ping 172.16.16.1

Type escape sequence to abort.

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

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 188/239/288 ms

R1# 

R1#

R1#ping 172.16.255.9 

Type escape sequence to abort.

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

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 144/168/192 ms

R1#

11、此时,无法学习完整的路由问题已经被解决。OSPF Virtual Link不仅可以解决普通区域与骨干区域非直接问题,还可以解决骨干被分割问题。但是,此类问题一般都是由于网络迁移或是本身设计问题所造成的。OSPF的虚链路仅仅是一种网络过渡的解决方案。

12、实验完成。

阅读(856) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~