7.6 RIP and OSPF Redistribution
7.6.3 Adding OSPF to the center of a RIP network
A common first step in converting a RIP network to an OSPF network is to add backbone routers that run both RIP and OSPF, while the remaining network devices run RIP. These backbone routers are OSPF ASBRs. Each ASBR controls the flow of routing information between OSPF and RIP. In the main figure, router A is configured as the ASBR.

RIP does not need to run between the backbone routers; therefore, RIP is suppressed on Router A with the following commands:

router rip
passive-interface serial 0
passive-interface serial 1

The RIP routes are redistributed into OSPF by all three routers with the following commands:

router ospf 109
redistribute rip subnets
network 130.10.0.0

The subnets keyword tells OSPF to redistribute all subnet routes. Without the subnets keyword, only networks that are not subnetted will be redistributed by OSPF. Redistributed routes appear as external type 2 routes in OSPF. For more detail on route types, refer to the text earlier in this chapter or see the Cisco Internetwork Operating System (Cisco IOS) command references.

Each RIP domain receives information about networks in other RIP domains and in the OSPF backbone area from the following commands that redistribute OSPF routes into RIP:

router rip
redistribute ospf 109 match internal external 1 external 2
default-metric 10

The redistribute command uses the ospf keyword to specify that OSPF routes are redistributed into RIP. The keyword internal indicates the OSPF intra-area and inter-area routes: external 1 is the external route type 1, and external 2 is the external route type 2. Because the command in the example uses the default behavior, these keywords might not appear when you use the write terminal or show configuration commands.

Because metrics for different protocols cannot be directly compared, you must specify the default metric in order to designate the cost of the redistributed route used in RIP updates. All routes that are redistributed will use the default metric.

As illustrated in the main figure, there are no paths directly connecting the RIP clouds. However, in typical networks, these paths, or "back doors," frequently exist, allowing the potential for feedback loops. You can use access lists to determine the routes that are advertised and accepted by each router.

For example, access list 11 in the configuration file for Router A allows OSPF to redistribute information learned from RIP only for networks 130.10.8.0 through 130.10.15.0:

router ospf 109
redistribute rip subnet
distribute-list 11 out rip

access-list 11 permit 130.10.8.0 0.0.7.255
access-list 11 deny 0.0.0.0 255.255.255.255

These commands prevent Router A from advertising networks in other RIP domains onto the OSPF backbone, thereby preventing other boundary routers from using false information and forming a loop.