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

全部博文(48)

文章存档

2011年(1)

2010年(1)

2009年(46)

我的朋友

分类: 系统运维

2009-06-29 20:51:21

实验目的:

1、掌握RIP与OSPF的重发布配置。

2、理解OSPF的E1与E2类型的路由。

实验拓扑图:

实验步骤及要求:

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

2、配置R1与R2的OSPF路由协议和R2与R3的RIP路由协议。

3、查看R1、R2和R3的路由表:

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

C       172.16.1.0/24 is directly connected, Loopback0

C       172.16.2.0/24 is directly connected, Loopback1

R1#

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

O       172.16.1.0/24 [110/65] via 172.16.255.1, 00:02:47, Serial1/0

O       172.16.2.0/24 [110/65] via 172.16.255.1, 00:02:47, Serial1/0

     192.168.255.0/30 is subnetted, 1 subnets

C       192.168.255.0 is directly connected, Serial1/1

R    192.168.1.0/24 [120/1] via 192.168.255.1, 00:00:10, Serial1/1

R    192.168.2.0/24 [120/1] via 192.168.255.1, 00:00:10, Serial1/1

R2#

R3#show ip route 

Gateway of last resort is not set

C    192.168.255.0/24 is directly connected, Serial1/0

C    192.168.1.0/24 is directly connected, Loopback0

C    192.168.2.0/24 is directly connected, Loopback1

R3#

4、根据show ip route命令可以看出,只有R2路由才可以学习到整个网络的完整路由。是因为,R2路由处于OSPF与RIP网络的边界。其同时运行了两种不同的路由协议。

5、为了确保R1和R2能够学习到整个网络路由。在R2上配置路由重发布。配置如下:

R2(config)#router ospf 1

R2(config-router)#redistribute rip metric 200 subnets 

R2(config-router)#exit

R2(config)#router rip

R2(config-router)#redistribute ospf 1 metric 10

R2(config-router)#exit

6、查看R1路由器和R3路由器的路由表:

R1#show ip router

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

C       172.16.255.0/30 is directly connected, Serial1/1

C       172.16.1.0/24 is directly connected, Loopback0

C       172.16.2.0/24 is directly connected, Loopback1

     192.168.255.0/30 is subnetted, 1 subnets

O E2    192.168.255.0 [110/200] via 172.16.255.2, 00:02:47, Serial1/1

O E2 192.168.1.0/24 [110/200] via 172.16.255.2, 00:02:53, Serial1/1

O E2 192.168.2.0/24 [110/200] via 172.16.255.2, 00:02:53, Serial1/1

R1#

R3#show ip router

R    172.16.0.0/16 [120/10] via 192.168.255.2, 00:00:24, Serial1/0

C    192.168.255.0/24 is directly connected, Serial1/0

C    192.168.1.0/24 is directly connected, Loopback0

C    192.168.2.0/24 is directly connected, Loopback1

R3#

7、确认路由有效性:

R1#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 = 112/137/144 ms

R1#

R3#ping 172.16.1.1

Type escape sequence to abort.

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

!!!!!

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

R3#

8、实验完成。

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