Redistribution between RIP and OSPF Lab

By | April 9, 2014

Hi there, had tested my previous lab of Redistribution between RIP and EIGRP? Today we are getting in to another redistribution lab that is Redistribution between RIP and OSPF. In mutual redistribution RIP OSPF, the process and syntax are almost same as we did for RIP and EIGRP. The requirement of redistribution we discussed in our last article. For better understanding let’s take the same Packet Tracer example that we used in the RIP → EIGRP redistribution. There is not much to explain about theoretical concept regarding redistribution RIP and OSPF; I hope you understood the concept and requirement for Redistribution. If not please read my earlier article.

Let me directly go to the technical aspects and of RIP OSPF redistribution Packet tracer configuration. Route redistribution RIP and OSPF configuration is very easy and follows simple syntax.

Redistribution-between-RIP-and-OSPF

***

Step 1: Initial Configurations

In the RIP and OSPF redistribution using packet tracer scenario we have two domains called RIP Domain and OSPF Domain. Configure R1, R2 for RIP V2 and R3, R4, R5 for OSPF1. (To implement redistribution on Router 2, we should configure it for RIP and OSPF)

Redistribution-between-RIP-and-OSPF-Scenario

Router 1 RIPV2

R1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#router rip
R1(config-router)#version 2
R1(config-router)#network 10.0.0.0
R1(config-router)#network 60.0.0.0
R1(config-router)#no auto-summary
R1(config-router)#exit
R1(config)#
R1#
%SYS-5-CONFIG_I: Configured from console by console

I decided to implement both RIP and OSPF in Router 2, since we will carry out redistribution on R2.

Router 2 RIPV2

R2#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#router rip
R2(config-router)#version 2
R2(config-router)#network 20.0.0.0
R2(config-router)#network 60.0.0.0
R2(config-router)#network 70.0.0.0
R2(config-router)#no auto-summary
R2(config-router)#exit
R2(config)#
R2#
%SYS-5-CONFIG_I: Configured from console by console

Router 2 OSPF1

R2#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#router ospf 1
R2(config-router)#network 20.0.0.0 0.255.255.255 area 0
R2(config-router)#network 60.0.0.0 0.255.255.255 area 0
R2(config-router)#network 70.0.0.0 0.255.255.255 area 0
R2(config-router)#exit
R2(config)#
R2#
%SYS-5-CONFIG_I: Configured from console by console

Router 3 OSPF1

R3#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R3(config)#router ospf 1
R3(config-router)#network 30.0.0.0 0.255.255.255 area 0
R3(config-router)#network 70.0.0.0 0.255.255.255 area 0
R3(config-router)#network 80.0.0.0 0.255.255.255 area 0
R3(config-router)#exit
R3(config)#
R2#
%SYS-5-CONFIG_I: Configured from console by console

Router 4 OSPF1

R4#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R4(config)#router ospf 1
R4(config-router)#network 40.0.0.0 0.255.255.255 area 0
R4(config-router)#network 80.0.0.0 0.255.255.255 area 0
R4(config-router)#network 90.0.0.0 0.255.255.255 area 0
R4(config-router)#exit
R4(config)#
R4#
%SYS-5-CONFIG_I: Configured from console by console

Router 5 OSPF1

R5#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R5(config)#router ospf 1
R5(config-router)#network 50.0.0.0 0.255.255.255 area 0
R5(config-router)#network 90.0.0.0 0.255.255.255 area 0
R5(config-router)#exit
R5(config)#
R5#
%SYS-5-CONFIG_I: Configured from console by console

Basic configurations are completed. Now let’s verify the routing tables of each router.

Step 2: Routing Table verification

Once initial configurations are done, confirm the routing tables of all routers using #show ip route command.

Router 1

Router 1 knows only RIP routes.

R1#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
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
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, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route

Gateway of last resort is not set

C 10.0.0.0/8 is directly connected, FastEthernet0/0
R 20.0.0.0/8 [120/1] via 60.0.0.2, 00:00:23, Serial0/2/0
R 30.0.0.0/8 [120/5] via 60.0.0.2, 00:00:23, Serial0/2/0
R 40.0.0.0/8 [120/5] via 60.0.0.2, 00:00:23, Serial0/2/0
R 50.0.0.0/8 [120/5] via 60.0.0.2, 00:00:23, Serial0/2/0
C 60.0.0.0/8 is directly connected, Serial0/2/0
R 70.0.0.0/8 [120/1] via 60.0.0.2, 00:00:23, Serial0/2/0
R 80.0.0.0/8 [120/5] via 60.0.0.2, 00:00:23, Serial0/2/0
R 90.0.0.0/8 [120/5] via 60.0.0.2, 00:00:23, Serial0/2/0

Router 2

Router 2 has knowledge about all networks since it is configured with RIP and OSPF. We may notice the routes leaned by RIP (marked as ‘R‘) and OSPF (marked as ‘O‘) in the routing table of Router 2.

R2#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
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
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, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route

Gateway of last resort is not set

R 10.0.0.0/8 [120/1] via 60.0.0.1, 00:00:23, Serial0/0/0
C 20.0.0.0/8 is directly connected, FastEthernet0/0
O 30.0.0.0/8 [110/65] via 70.0.0.2, 00:00:52, Serial0/2/0
O 40.0.0.0/8 [110/129] via 70.0.0.2, 00:00:52, Serial0/2/0
O 50.0.0.0/8 [110/193] via 70.0.0.2, 00:00:52, Serial0/2/0
C 60.0.0.0/8 is directly connected, Serial0/0/0
C 70.0.0.0/8 is directly connected, Serial0/2/0
O 80.0.0.0/8 [110/128] via 70.0.0.2, 00:00:52, Serial0/2/0
O 90.0.0.0/8 [110/192] via 70.0.0.2, 00:00:52, Serial0/2/0

Router 3

Router 3, 4 and 5 know EIGRP routes only. It doesn’t know anything about RIP Routes.

R3#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
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
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, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route

Gateway of last resort is not set

O E2 10.0.0.0/8 [110/5000] via 70.0.0.1, 00:01:33, Serial0/0/0
O 20.0.0.0/8 [110/65] via 70.0.0.1, 00:01:33, Serial0/0/0
C 30.0.0.0/8 is directly connected, FastEthernet0/0
O 40.0.0.0/8 [110/65] via 80.0.0.2, 00:01:33, Serial0/2/0
O 50.0.0.0/8 [110/129] via 80.0.0.2, 00:01:23, Serial0/2/0
O 60.0.0.0/8 [110/128] via 70.0.0.1, 00:01:33, Serial0/0/0
C 70.0.0.0/8 is directly connected, Serial0/0/0
C 80.0.0.0/8 is directly connected, Serial0/2/0
O 90.0.0.0/8 [110/128] via 80.0.0.2, 00:01:33, Serial0/2/0

Router 4

R4#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
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
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, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route

Gateway of last resort is not set

O E2 10.0.0.0/8 [110/5000] via 80.0.0.1, 00:01:54, Serial0/0/0
O 20.0.0.0/8 [110/129] via 80.0.0.1, 00:01:54, Serial0/0/0
O 30.0.0.0/8 [110/65] via 80.0.0.1, 00:01:54, Serial0/0/0
C 40.0.0.0/8 is directly connected, FastEthernet0/0
O 50.0.0.0/8 [110/65] via 90.0.0.2, 00:01:54, Serial0/2/0
O 60.0.0.0/8 [110/192] via 80.0.0.1, 00:01:54, Serial0/0/0
O 70.0.0.0/8 [110/128] via 80.0.0.1, 00:01:54, Serial0/0/0
C 80.0.0.0/8 is directly connected, Serial0/0/0
C 90.0.0.0/8 is directly connected, Serial0/2/0

Router 5

R5#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
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
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, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route

Gateway of last resort is not set

O E2 10.0.0.0/8 [110/5000] via 90.0.0.1, 00:02:13, Serial0/2/0
O 20.0.0.0/8 [110/193] via 90.0.0.1, 00:02:13, Serial0/2/0
O 30.0.0.0/8 [110/129] via 90.0.0.1, 00:02:13, Serial0/2/0
O 40.0.0.0/8 [110/65] via 90.0.0.1, 00:02:13, Serial0/2/0
C 50.0.0.0/8 is directly connected, FastEthernet0/0
O 60.0.0.0/8 [110/256] via 90.0.0.1, 00:02:13, Serial0/2/0
O 70.0.0.0/8 [110/192] via 90.0.0.1, 00:02:13, Serial0/2/0
O 80.0.0.0/8 [110/128] via 90.0.0.1, 00:02:13, Serial0/2/0
C 90.0.0.0/8 is directly connected, Serial0/2/0

***

Step 3: Redistribution between RIP and OSPF Protocols

Figure shows the configuration status of all routers in our example topology. Now let’s start RIP OSPF redistribution example in R2.

Redistribution-between-RIP-and-OSPF-Configuration

Redistribute OSPF to RIP

Redistribute OSPF RIP command is #redistribute ospf metric

R2(config)#router rip
R2(config-router)#redistribute ospf 1 metric 5
R2(config-router)#exit
R2(config)#
R2#

Here we entered 5 as the metric (Hop count) for RIP

Redistribute RIP V2 to OSPF

Well, how redistribution RIP into OSPF is carried out? To inject RIP routes to OSPF routing table we use redistribute RIP to OSPF command #redistribute rip metric subnets command.

R2(config)#router ospf 1
R2(config-router)#redistribute rip ?
metric Metric for redistributed routes
metric-type OSPF/IS-IS exterior metric type for redistributed routes
subnets Consider subnets for redistribution into OSPF
tag Set tag for routes redistributed into OSPF

R2(config-router)#redistribute rip metric ?
OSPF default metric
R2(config-router)#redistribute rip metric 5000 ?
metric-type OSPF/IS-IS exterior metric type for redistributed routes
subnets Consider subnets for redistribution into OSPF
tag Set tag for routes redistributed into OSPF

R2(config-router)#redistribute rip metric 5000 subnets
R2(config-router)#exit
  • Redistribution RIP to OSPF will updates the OSPF routing database from RIP database.
  • The subnets keyword after the redistribution metric lets you to compatible with VLSM.
  • The route marked as O E2 10.0.0.0 [110/5000] via 90.0.0.1 where O E2 means OSPF route learned via RIP.

Now can I have your opinion about route redistribution RIP OSPF? Please use comment box to share your doubts.

Next >> Redistribution between RIP and OSPF, keep in touch!

4 thoughts on “Redistribution between RIP and OSPF Lab

  1. winston

    HI sir,
    how to configer Redistribution between RIP and OSPF in packet tracker using redistribute ospf 1 metric command

    Reply
  2. Umair Chaudhry

    can you please elaborate what does the 5000 mean in:

    redistribute rip metric 5000 subnets

    Reply
  3. Karwan.cs

    thanks i opninin for this design and idea it is the best for any diagram in the packet tracer when we have the routing

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *