Site is Under Maintenance
Please come back again in...
00 Days
00 Hours
00 Minutes
00 Seconds

Configuring Mutual OSPF and RIP Redistribution Tutorial

configuring-mutual-ospf-and-rip-redistribution.htm

Configuring Mutual OSPF and RIP Redistribution

This lab will discuss and demonstrate the configuration and verification of

Real World Application & Core Knowledge

So up until this point you’ve learnt how to configure different routing protocols such as the Routing Information Protocol (RIP), Enhanced Interior Gateway Routing protocol (EIGRP) and Open Shortest Path First (OSPF) but now its time to learn how to make this protocols play nice with each other and share their routes between each other. It’s always nice to share things.

First lets look at how route redistribution works in a basic way. In this lab you’ll be redistributing routes between OSPF and RIP, with that being said routes from OSPF will appear in RIP marked as a RIP route and RIP routes redistributed will appear in OSPF as an OSPF E2 route by default.

So for example; lets say you work at ABC Inc. and your corporation buys company XYZ Inc. Your company uses OSPF and XYZ Inc. uses RIP. During the acquisition you’ll want to merge infrastructures to ensure information sharing between the already existing infrastructure to the newly acquired company. In this case you’ll have to configure redistribution between the two networks. Keep in mind even redistribution may not work 100% of the time. For example when you purchase a company that uses the same RFC1918 private address space as you. You don’t want their routes to 10.50.33.0/24 in your network which has its own route to 10.50.33.0/24, this would cause serious problems. In cases like these, NAT is used until the issue can be fully addressed.

Route redistribution should <b>NOT</b> be designed into a network from the beginning but should only be used during scenarios where you need to route between two different autonomous systems running different routing protocols. For example, company acquisitions or vendor incompatibilities; in which case you have a device that only supports rip but your network runs OSPF. You will need to either utilize static routing or redistribution.

When you configure redistribution, the command(s) are entered under the routing process configuration mode; in which case you specify the metric for the redistributed routes when redistributing a particular routing process into the routing process you’re currently configuring. For example in RIP router configuration mode you’d redistribute ospf and specify a hop count metric.

In OSPF router configuration mode, when redistributing RIP routes into OSPF you’d specify a COST associated with the routes redistributed by RIP into OSPF. You can however leave a metric out following the redistribute command specifying a metric is best practice.

Also a quick note to remember, when configuring route redistribution into EIGRP or OSPF you must use the subnets keyboard following the specified metric or the routing process will only redistribute a classful network into the routing process.

So now that you have an understanding of mutual route redistribution lets jump into the configuration.

Please review the following command(s) listed below;

| Command | Description |
| redistribute <i>protocol</i> metric <i>metric info</i> | This command is executed in router configuration mode of RIP, EIGRP or OSPF to configure the routing process to redistribute routes from a different source into the configured routing process such as static into RIP or RIP into OSPF. It’s best practice to specify a metric. |

The following logical topology shown below is used in this lab;

Lab Prerequisites

  • If you are using GNS3 than load the Free CCNA Workbook GNS3 topology than start devices; R1, R2, R3, R4, and R5
  • Establish a console session with devices R1, R2, R3, R4, and R5 than load the initial configurations provided below by copying the config from the textbox and pasting it into the respected routers console.

!###################################################
!# Free CCNA Workbook Lab 10-2 R1 Initial Config #
!###################################################
!
enable
configure terminal
!
hostname R1
no ip domain-lookup
!
interface Serial0/0
description ### PHYSICAL FRAME RELAY INTERFACE ###
no ip address
encapsulation frame-relay
serial restart-delay 0
no frame-relay inverse-arp
no shut
exit
!
interface Serial0/0.122 point-to-point
description ### FRAME RELAY LINK TO R2 ###
ip address 10.102.12.1 255.255.255.0
ip ospf 1 area 0
frame-relay interface-dlci 122
exit
!
router ospf 1
exit
!
line con 0
logging sync
no exec-timeout
!
end

!###################################################
!# Free CCNA Workbook Lab 10-2 R2 Initial Config #
!###################################################
!
enable
configure terminal
!
hostname R2
no ip domain-lookup
!
interface Serial0/0
description ### PHYSICAL FRAME RELAY INTERFACE ###
encapsulation frame-relay
no frame-relay inverse-arp
no shut
!
interface Serial0/0.221 point-to-point
description ### FRAME RELAY LINK TO R1 ###
ip address 10.102.12.2 255.255.255.0
ip ospf 1 area 0
frame-relay interface-dlci 221
exit
!
interface Serial0/0.223 point-to-point
description ### FRAME RELAY LINK TO R3 ###
ip address 10.102.23.2 255.255.255.0
ip ospf 1 area 0
frame-relay interface-dlci 223
exit
!
router ospf 1
exit
!
line con 0
logging sync
no exec-timeout
!
end

!###################################################
!# Free CCNA Workbook Lab 10-2 R3 Initial Config #
!###################################################
!
enable
configure terminal
!
hostname R3
no ip domain-lookup
!
interface Serial0/0
description ### PHYSICAL FRAME RELAY INTERFACE ###
encapsulation frame-relay
no frame-relay inverse-arp
no shut
exit
!
interface Serial0/0.322 point-to-point
description ### FRAME RELAY LINK TO R2 ###
ip address 10.102.23.3 255.255.255.0
ip ospf 1 area 0
frame-relay interface-dlci 322
exit
!
interface Serial0/0.324 point-to-point
description ### PHYSICAL FRAME RELAY INTERFACE ###
ip address 172.29.34.3 255.255.255.0
frame-relay interface-dlci 324
no shut
!
router ospf 1
exit
!
router rip
version 2
no auto
network 172.29.34.3
exit
!
line con 0
logging sync
no exec-timeout
!
end

!###################################################
!# Free CCNA Workbook Lab 10-2 R4 Initial Config #
!###################################################
!
enable
configure terminal
!
hostname R4
no ip domain-lookup
!
interface Serial0/0
description ### PHYSICAL FRAME RELAY INTERFACE ###
encapsulation frame-relay
no frame-relay inverse-arp
no shut
!
interface Serial0/0.423 point-to-point
description ### FRAME RELAY LINK TO R3 ###
ip address 172.29.34.4 255.255.255.0
frame-relay interface-dlci 423
exit
!
interface Serial0/0.425 point-to-point
description ### FRAME RELAY LINK TO R5 ###
ip address 172.29.45.4 255.255.255.0
frame-relay interface-dlci 425
exit
!
router rip
version 2
no auto
network 172.29.0.0
exit
!
line con 0
logging sync
no exec-timeout
!
end

!###################################################
!# Free CCNA Workbook Lab 10-2 R5 Initial Config #
!###################################################
!
enable
configure terminal
!
hostname R5
no ip domain-lookup
!
interface Serial0/0
description ### PHYSICAL FRAME RELAY INTERFACE ###
encapsulation frame-relay
no frame-relay inverse-arp
no shut
!
interface Serial0/0.524 point-to-point
description ### FRAME RELAY LINK TO R5 ###
ip address 172.29.45.5 255.255.255.0
frame-relay interface-dlci 524
exit
!
router rip
version 2
no auto
network 172.29.0.0
exit
!
line con 0
logging sync
no exec-timeout
!
end

Lab Objectives

  • Create four new loopback interfaces on R1 using the 10.1.0.0/22 address allocation and configure those interfaces to participate in OSPF area 0. Ensure that these loopback interfaces participate in OSPF with their configured subnet mask and not a host mask.
  • Create four new loopback interfaces on R5 using the 172.5.0.0/22 address allocation and configure those interfaces to participate in RIP.
  • By viewing R3’s routing table, verify that the newly created loopback interfaces are being learned by R3.
  • Configure R3 to redistribute RIP routes into OSPF using the cost of 50000 then redistribute OSPF routes into RIP using the hop count of 3.
  • Verify on R1 and R5 that routes from the opposite autonomous system exist in their routing table.

Lab Instruction

Objective 1. – Create four new loopback interfaces on R1 using the 10.1.0.0/22 address allocation and configure those interfaces to participate in OSPF area 0. Ensure that these loopback interfaces participate in OSPF with their configured subnet mask and not a host mask.

By default loopback interfaces participate in ospf as a /32 host route unless you change the default network type from LOOPBACK to Point-to-Point as shown below;

R1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#interface loopback0
R1(config-if)#ip address 10.1.0.1 255.255.255.0
R1(config-if)#ip ospf 1 area 0
R1(config-if)#ip ospf network point-to-point
R1(config-if)#
R1(config-if)#interface loopback1
R1(config-if)#ip address 10.1.1.1 255.255.255.0
R1(config-if)#ip ospf 1 area 0
R1(config-if)#ip ospf network point-to-point
R1(config-if)#
R1(config-if)#interface loopback2
R1(config-if)#ip address 10.1.2.1 255.255.255.0
R1(config-if)#ip ospf 1 area 0
R1(config-if)#ip ospf network point-to-point
R1(config-if)#
R1(config-if)#interface loopback3
R1(config-if)#ip address 10.1.3.1 255.255.255.0
R1(config-if)#ip ospf 1 area 0
R1(config-if)#ip ospf network point-to-point
R1(config-if)#end
R1#
%SYS-5-CONFIG_I: Configured from console by console
R1#

<br>

Objective 2. – Create four new loopback interfaces on R5 using the 172.5.0.0/22 address allocation and configure those interfaces to participate in RIP.

R5#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R5(config)#interface loopback0
R5(config-if)#ip address 172.5.0.1 255.255.255.0
R5(config-if)#
R5(config-if)#interface loopback1
R5(config-if)#ip address 172.5.1.1 255.255.255.0
R5(config-if)#
R5(config-if)#interface loopback2
R5(config-if)#ip address 172.5.2.1 255.255.255.0
R5(config-if)#
R5(config-if)#interface loopback3
R5(config-if)#ip address 172.5.3.1 255.255.255.0
R5(config-if)#exit
R5(config)#router rip
R5(config-router)#network 172.5.0.0
R5(config-router)#end
R5#
%SYS-5-CONFIG_I: Configured from console by console
R5#

Objective 3. – By viewing R3’s routing table, verify that the newly created loopback interfaces are being learned by R3.

R3#show ip route
Codes: C - connected, S - static, 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
       * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     172.5.0.0/24 is subnetted, 4 subnets
R       172.5.1.0 [120/2] via 172.29.34.4, 00:00:01, Serial0/0.324
R       172.5.0.0 [120/2] via 172.29.34.4, 00:00:01, Serial0/0.324
R       172.5.3.0 [120/2] via 172.29.34.4, 00:00:01, Serial0/0.324
R       172.5.2.0 [120/2] via 172.29.34.4, 00:00:01, Serial0/0.324
     172.29.0.0/24 is subnetted, 2 subnets
C       172.29.34.0 is directly connected, Serial0/0.324
R       172.29.45.0 [120/1] via 172.29.34.4, 00:00:01, Serial0/0.324
     10.0.0.0/24 is subnetted, 6 subnets
O       10.1.3.0 [110/129] via 10.102.23.2, 00:02:24, Serial0/0.322
O       10.1.2.0 [110/129] via 10.102.23.2, 00:02:24, Serial0/0.322
O       10.1.1.0 [110/129] via 10.102.23.2, 00:02:24, Serial0/0.322
O       10.1.0.0 [110/129] via 10.102.23.2, 00:02:24, Serial0/0.322
O       10.102.12.0 [110/128] via 10.102.23.2, 00:02:24, Serial0/0.322
C       10.102.23.0 is directly connected, Serial0/0.322
R3#

Objective 4. – On R3 redistribute RIP routes into OSPF using the cost of 50000 then redistribute OSPF routes into RIP using the hop count of 3.

Before redistributing RIP into OSPF keep in mind you must use the subnets keyword after the redistribution metric as shown below other wise you’ll redistribute only a classful network;

R3#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R3(config)#router ospf 1
R3(config-router)#redistribute rip metric 50000 subnets
R3(config-router)#exit
R3(config)#router rip
R3(config-router)#redistribute ospf 1 metric 3
R3(config-router)#end
R3#

Objective 5. – Verify on R1 and R5 that routes from the opposite autonomous system exist in their routing table.

R1#show ip route
Codes: C - connected, S - static, 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
       * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     172.5.0.0/24 is subnetted, 4 subnets
O E2    172.5.1.0 [110/50000] via 10.102.12.2, 00:00:15, Serial0/0.122
O E2    172.5.0.0 [110/50000] via 10.102.12.2, 00:00:15, Serial0/0.122
O E2    172.5.3.0 [110/50000] via 10.102.12.2, 00:00:15, Serial0/0.122
O E2    172.5.2.0 [110/50000] via 10.102.12.2, 00:00:15, Serial0/0.122
     172.29.0.0/24 is subnetted, 2 subnets
O E2    172.29.34.0 [110/50000] via 10.102.12.2, 00:00:15, Serial0/0.122
O E2    172.29.45.0 [110/50000] via 10.102.12.2, 00:00:15, Serial0/0.122
     10.0.0.0/24 is subnetted, 6 subnets
C       10.1.3.0 is directly connected, Loopback3
C       10.1.2.0 is directly connected, Loopback2
C       10.1.1.0 is directly connected, Loopback1
C       10.1.0.0 is directly connected, Loopback0
C       10.102.12.0 is directly connected, Serial0/0.122
O       10.102.23.0 [110/128] via 10.102.12.2, 00:05:34, Serial0/0.122
R1#

As shown above you can see that the RIP routes being redistributed into the OSPF autonomous system are denoted as E2 routes in the routing table on R1.

R5#show ip route
Codes: C - connected, S - static, 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
       * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     172.5.0.0/24 is subnetted, 4 subnets
C       172.5.1.0 is directly connected, Loopback1
C       172.5.0.0 is directly connected, Loopback0
C       172.5.3.0 is directly connected, Loopback3
C       172.5.2.0 is directly connected, Loopback2
     172.29.0.0/24 is subnetted, 2 subnets
R       172.29.34.0 [120/1] via 172.29.45.4, 00:00:05, Serial0/0.524
C       172.29.45.0 is directly connected, Serial0/0.524
     10.0.0.0/24 is subnetted, 6 subnets
R       10.1.3.0 [120/4] via 172.29.45.4, 00:00:06, Serial0/0.524
R       10.1.2.0 [120/4] via 172.29.45.4, 00:00:06, Serial0/0.524
R       10.1.1.0 [120/4] via 172.29.45.4, 00:00:06, Serial0/0.524
R       10.1.0.0 [120/4] via 172.29.45.4, 00:00:06, Serial0/0.524
R       10.102.12.0 [120/4] via 172.29.45.4, 00:00:07, Serial0/0.524
R       10.102.23.0 [120/4] via 172.29.45.4, 00:00:07, Serial0/0.524
R5#

As shown above you can see that the OSPF networks in the 10.0.0.0/8 range are now in R5’s routing table with a hop count of 4. To get to R3 its 1 hop to R4, on R3 the redistributed metric adds +3 giving you a total metric of 4 on R5 for routes learned from the OSPF network.

Rate This Article

Thanks for reading: Configuring Mutual OSPF and RIP Redistribution Tutorial, Sorry, my English is bad:)

Getting Info...

About the Author

I'm Aevon...Just a gal with an insane passion for all things cybersecurity. 17 years in the industry and still love what I'm doing.

Post a Comment

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.