当前位置:文档之家› OSPF与RIP路由重发布

OSPF与RIP路由重发布

实验十五OSPF与RIP路由重发布实验题目:OSPF与RIP路由重发布实验目的:在本次实验中,你将重分布RIPv2到OSPF协议,并且在RIPv2路由器提供缺省路由。

在完成本次实验之后,你需要完成下列任务:在不同的路由协议之间重分布路由信息。

实验学时: 2实验设备及环境:路由器RSR10、路由器以太网接口、 PC机实验基本配置:1.RIP 协议⑴全局设置指定使用RIP协议 router rip(2)路由设置指定与该路由器相连的网络 network network2.OSPF 协议⑴全局设置指定使用OSPF协议 router ospf process-id (2)路由设置指定与该路由器相连的网络 network address wildcard-mask area area-id 指定与该路由器相邻的节点地址 neighbor ip-address启用路由重发布命令 default-information originate 指定与该路由器相邻的节点地址 neighbor ip-address实验拓扑图图19 OSPF与RIP路由重发布实验拓扑图实验步骤1.在路由器上配置IP路由选择和IP地址。

RA#config tRA(config)# interface FastEthernet 0/0 //进入以太网接口RA(config-if)#ip address 172.16.1.5 255.255.255.252 //配置ip地址RA(config)# interface Loopback 0 //进入回环接口RA(config-if)#ip address 192.168.1.1 255.255.255.252 //配置ip地址RA(config)#interface Loopback 1 //进入回环接口RA(config-if)#ip address 192.168.2.1 255.255.255.0 //配置ip地址RB(config)#interface FastEthernet 0/0 //进入以太网接口RB(config-if)#ip address 172.16.1.6 255.255.255.252 //配置ip地址RB(config)#interface FastEthernet 0/1 //进入以太网接口RB(config-if)#ip address 172.16.1.1 255.255.255.252 //配置ip地址RC(config)# interface FastEthernet 0/0 //进入以太网接口RC(config-if)# ip address 172.16.1.2 255.255.255.252 //配置ip地址RC(config)# interface FastEthernet 0/1 //进入以太网接口RC(config-if)#ip address 172.16.1.9 255.255.255.252 //配置ip地址RC(config)#interface Loopback 0 //进入回环接口RC(config-if)#ip address 172.16.3.1 255.255.255.0 //配置ip地址RD(config)#interface FastEthernet 0/0 //进入以太网接口RD(config-if)#ip address 172.16.1.10 255.255.255.252 //配置ip地址RD(config)#interface Loopback 0 //进入回环接口RD(config-if)#i p address 10.1.1.1 255.255.255.0 //配置ip地址RD(config)#interface Loopback 1 //进入回环接口RD(config-if)#ip address 10.1.2.1 255.255.255.0 //配置ip地址RD(config)#interface Loopback 2 //进入回环接口RD(config-if)#ip address 200.1.1.1 255.255.255.0 //配置ip地址2.配置RIP和OSPF。

RA(config)# router ospf 10 //配置ospfRA(config-router)#network 10.1.1.0 0.0.0.255 area 1 //配置直连网段在区域1RA(config-router)#network 10.1.2.0 0.0.0.255 area 1 //配置直连网段在区域1RA(config-router)#network 172.16.1.8 0.0.0.3 area 1 //配置直连网段在区域1RA(config)#router rip //配置RIP协议RA(config-router)#version 2 //版本二RA(config-router)#network 172.16.0.0 //直连网段RA(config-router)#no auto-summary //关闭ip地址聚合RA(config)# ip route 0.0.0.0 0.0.0.0 Loopback 0 //配置静态路由RB(config)#router ospf 10 //配置OSPFRB(config-router)#network 172.16.1.0 0.0.0.3 area 0 //直连网段声明再主区域RB(config)#router rip //配置RIPRB(config-router)#version 2 //版本二RB(config-router)#network 172.16.0.0 //直连网段RB(config-router)#no auto-summary //关闭ip地址聚合RC(config)#router ospf 10 //配置OSPFRC(config-router)#network 172.16.1.0 0.0.0.3 area 0 //直连网段声明再主区域RC(config-router)#network 172.16.1.8 0.0.0.3 area 1 //配置直连网段在区域1RC(config-router)#network 172.16.3.0 0.0.0.255 area 0//直连网段声明再主区域RD(config)#router ospf 10 //配置OSPFRD(config-router)#network 10.1.1.0 0.0.0.255 area 1 //配置直连网段在区域1RD(config-router)#network 10.1.2.0 0.0.0.255 area 1 //配置直连网段在区域1RD(config-router)#network 172.16.1.8 0.0.0.3 area 1 //配置直连网段在区域1RD(config)# ip route 20.1.1.0 0.0.0.0 Loopback 03.配置重发布。

RA(config)# router rip //启动一个RIP进程RA(config-router)# default-information originate//向其他区域发送一条缺省路由RB(config)# router ospf 10 //启动了一个进程,进程号为10RB(config-router)#redistribute rip metric 50 subnets//将ospf引入RIP协议发现路由作为外部路由信息,路由的花费50RB(config-router)#default-information originate //向其他区域发送一条缺省路由RB(config)# router rip //启动一个RIP进程RB(config-router)#redistribute ospf10 metric 1//将RIP引入到OSPF,路由的花费为1RD(config)#router ospf 10 //启动了一个进程,进程号为10RD(config-router)#redistribute static subnets //重发布静态路由4.验证测试用show ip route 命令测试。

查看路由器A的路由表信息RA#showip routeCodes: C - connected, S - static, R - RIP, B - BGPO - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate defaultGateway of last resort is 0.0.0.0 to network 0.0.0.0S* 0.0.0.0/0 is directly connected, Loopback 0R 10.1.1.1/32 [120/1] via 172.16.1.6, 00:06:20, FastEthernet 0/0R 10.1.2.1/32 [120/1] via 172.16.1.6, 00:06:09, FastEthernet 0/0R 172.16.1.0/30 [120/1] via 172.16.1.6, 00:13:27, FastEthernet 0/0C 172.16.1.4/30 is directly connected, FastEthernet 0/0C 172.16.1.5/32 is local host.R 172.16.1.8/30 [120/1] via 172.16.1.6, 00:13:27, FastEthernet 0/0R 172.16.3.1/32 [120/1] via 172.16.1.6, 00:09:05, FastEthernet 0/0C 192.168.1.0/30 is directly connected, Loopback 0C 192.168.1.1/32 is local host.C 192.168.2.0/24 is directly connected, Loopback 1C 192.168.2.1/32 is local host.R 200.1.1.0/24 [120/1] via 172.16.1.6, 00:00:04, FastEthernet 0/0(2)查看路由器D的路由表信息RD#showip routeCodes: C - connected, S - static, R - RIP, B - BGPO - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate defaultGateway of last resort is 172.16.1.9 to network 0.0.0.0O*E2 0.0.0.0/0 [110/1] via 172.16.1.9, 00:13:47, FastEthernet 0/0C 10.1.1.0/24 is directly connected, Loopback 0C 10.1.1.1/32 is local host.C 10.1.2.0/24 is directly connected, Loopback 1C 10.1.2.1/32 is local host.C 20.1.1.0/24 is directly connected, Loopback 2C 20.1.1.1/32 is local host.O IA 172.16.1.0/30 [110/2] via 172.16.1.9, 00:19:38, FastEthernet 0/0O E2 172.16.1.4/30 [110/50] via 172.16.1.9, 00:18:23, FastEthernet 0/0C 172.16.1.8/30 is directly connected, FastEthernet 0/0C 172.16.1.10/32 is local host.O IA 172.16.3.1/32 [110/1] via 172.16.1.9, 00:10:25, FastEthernet 0/0S 200.1.1.0/24 is directly connected, Loopback 2(3)查看路由器B的路由表信息RB#showip routeCodes: C - connected, S - static, R - RIP, B - BGPO - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate defaultGateway of last resort is 172.16.1.5 to network 0.0.0.0R* 0.0.0.0/0 [120/1] via 172.16.1.5, 00:14:42, FastEthernet 0/0 O IA 10.1.1.1/32 [110/2] via 172.16.1.2, 00:08:30, FastEthernet 0/1 O IA 10.1.2.1/32 [110/2] via 172.16.1.2, 00:08:18, FastEthernet 0/1C 172.16.1.0/30 is directly connected, FastEthernet 0/1C 172.16.1.1/32 is local host.C 172.16.1.4/30 is directly connected, FastEthernet 0/0C 172.16.1.6/32 is local host.O IA 172.16.1.8/30 [110/2] via 172.16.1.2, 00:22:09, FastEthernet 0/1O 172.16.3.1/32 [110/1] via 172.16.1.2, 00:11:15, FastEthernet 0/1O E2 200.1.1.0/24 [110/20] via 172.16.1.2, 00:02:13, FastEthernet 0/1。

相关主题