7.5 Using Multiple Routing Protocols
7.5.8 Redistribution example using ip default-network
This example demonstrates how you can redistribute in one direction and use a default route in the other direction, instead of redistributing in both directions.

Assume an internetwork that uses three ASs with OSPF is the core protocol and RIP is the "edge" protocol. The following illustrates how to configure a system:

  • Allow the OSPF backbone to know all the routes in each AS. This is done by configuring redistribution on the ASBRs so that RIP routes are redistributed into OSPF.
  • Allow the RIP ASs to know only about their internal routes, and use a default route to networks that are not in the AS. This is done by configuring a default route on the ASBRs. The default route is advertised by the ASBRs into the RIP ASs.

Note that many other ways to configure redistribution exist, so you must understand your network topology and requirements in order to choose the best solution.

The network shown in Figure is the basis for the output shown on subsequent pages. The routers focused on are P1R3 (ASBR) and P1R1 (internal router).

Figures - show the configurations for one of the ASBRs and a router in one of the RIP networks. Points about each configuration follow:

  • Internal RIP router
  • No redistribution configuration is necessary because the intent is not to have this router learn about external routes.
  • The ip classless command is required on all RIP/IGRP routes that must use a default route. This command allows for classless forwarding, meaning that the default paths can be used for unconnected subnets of the same major classful network rather than perform traditional classful behavior. Traditional classful behavior means the router drops packets when the target subnet is not present for the directly connected classful network.
  • ASBR
  • When redistributing into OSPF, you need the subnets keyword for subnetted networks to be redistributed.
  • Define the default network to be advertised to the edge protocols.

The output illustrates the ASBR route tables of P1R3 after redistribution was enabled on both ASBRs. (see P1R3#show ip route (1) command output).

For comparison, an example of the route table prior to redistribution is shown in the figure to the left. (see P1R3#show ip route (2) command output).

Notice that in the "before" output, the 10.2.0.0/24 networks do not appear until redistribution is configured.

The output shows one of the internal route tables of P1R1 after the default route was configured on the P1R3 ASBR. (see P1R1#show ip route command output).

Using this route table, the P1R1 can successfully ping, for example, any network in the other RIP AS. (see P1R1#ping 10.2.2.1 command output).