7.4 Redistribution Example
7.4.2
Phase 2: adding OSPF to the core of a RIP network
A common first step in migrating a RIP network to an OSPF network is to configure backbone routers that run both RIP and OSPF, while the remaining network devices run RIP. These backbone routers act as OSPF ASBRs. Each ASBR controls the flow of routing information between OSPF and RIP. In the figure, RTA, RTB, and RTC now act as ASBRs.

Because RIP does not need to run between the backbone routers, updates can be suppressed using the passive-interface command. Although the example below specifies RTA, the same commands could be entered on the other routers.

RTA(config)# router rip
RTA(config-router)# passive-interface serial 0
RTA(config-router)# passive-interface serial 1

Instead of RIP updates, OSPF updates will carry the redistributed information across the WAN links. The necessary OSPF routing and redistribution commands are shown here. The same configuration is used for all three routers except for the network numbers.

RTA(config)# router ospf 109
RTA(config-router)# redistribute rip subnets
RTA(config-router)# network 130.10.62.0 0.0.0.255 area 0
RTA(config-router)# network 130.10.63.0 0.0.0.255 area 0

The subnets keyword tells OSPF to redistribute all subnet routes. Without the subnets keyword, only networks that are not subnetted are redistributed by OSPF.

The redistributed RIP routes appear as external Type 2 routes in OSPF, as discussed in Chapter 5, Multiarea OSPF.

Mutual redistribution must be configured for other routers in the RIP domain (not shown in the Figure) to receive information from OSPF. This example lists the necessary commands, which are again the same for each router.

RTA(config)# router rip
RTA(config-router)# redistribute ospf 109 match internal external 1 external 2
RTA(config-router)# default-metric 10

Note that the redistribute command includes the OSPF process ID, 109. The other keywords, match internal external 1 and external 2, instruct RIP to redistribute internal OSPF routes, as well as external Type 1 and Type 2 routes. This is the default for OSPF redistribution. These keywords are required only if you want to modify its behavior.

As illustrated in the figure, there are no paths directly connecting the RIP domains outside the core. In real-world networks, this is not always the case. If one RIP domain can communicate directly with another, there is a chance that they will exchange routes, resulting in a routing feedback loop. You can use route filters to prevent these potentially disastrous loops.

The configuration below allows RTA's OSPF process to redistribute RIP information, only for networks 130.10.8.0 through 130.10.15.0:

RTA(config)# router ospf 109
RTA(config-router)# redistribute rip subnets
RTA(config-router)# distribute-list 11 out rip

RTA(config)# access-list 11 permit 130.10.8.0 0.0.7.255
RTA(config)# access-list 11 deny 0.0.0.0 255.255.255.255

These commands prevent RTA from advertising networks in other RIP domains onto the OSPF backbone, thereby preventing other boundary routers from using false information and forming a loop. When an OSPF backbone area is in place, the RIP domains can easily be converted into OSPF areas.