Propagating a Default Static Route in OSPF
We have already discussed the Default route Propagation in “Propagate Default Route in RIP”. In this article, I am going to discuss propagating a default static route in OSPFv2 and OSPFv3. The route propagation is useful when there is a single exit point in the network to reach the internet or any other service. The default-information originate command in the router configuration mode allow default static route advertisement. So we need to configure the router with default-information originate command.
Propagating a Default Static Route in OSPFv2
In Figure 1, R1 is the single way to a webserver. Therefore, we configure a default static route on R1. The default route has simulated the connection to the webserver.
The OSPF is already configured on all four routers. To configure and propagate a default route, the edge router (R1) must be configured with:
- A default static route using the ip route 0.0.0.0 0.0.0.0 <ip-address |exit-intf>
- The“default-information originate” router configuration mode command. This command instructs R1 to be the source of the default route information and propagate the default static route in OSPF updates.
The configuration on R1 for propagating a default route is as under:
R1(config)#ip route 0.0.0.0 0.0.0.0 10.10.10.5
R1(config)#router ospf 1
R1(config-router)#default-information originate
R1(config-router)#do wr
Verifying the Propagated Default Route
In the first step verify the default route settings on R1 using the “show ip route” command, figure 2 illustrates the default route on R1.
Now check the routing table of R2, R3, and R4 where we have not configured the default route. Figure 3 illustrates and verifies the default route propagation. The R1 has propagated the default route to all other routers. Notice that the route source is O*E2. It is telling that it was learned using OSPF. The asterisk identifies this as a good candidate for the default route. The E2 designation shows that it is an External route, not an internal route.
The External routes have two different types, type1 or type 2. The difference between both is in the way the cost (metric) of the route is being calculated. A type 1 route is always preferred over a type 2 route for the same destination because the type 1 cost is the addition of the external cost and the internal cost used to reach that route. The type 2 route is always the external cost, regardless of the interior cost to reach that route.
Propagating a Default Static Route in OSPFv3
Propagating a Default Static Route in OSPFv3 is almost the same as OSPFv2. We will use the same topology as we used for OSPFv2 default route propagation. Figure 4 illustrates the same topology with IPv6 addresses. The R1 is the single choice for reaching to the webserver. So I am going to configure the default static route to reach the webserver.
Figure 5 displays the current IPv6 routing table of R1. Notice that it does not know the route to the webserver. The following configuration must be required for propagating a default route.
- A default static route using the“ipv6 route ::/0 <ipv6-address | exit-intf>
- The same command default-information originate will be used in router configuration mode for propagating the default route to other routers.
The configuration of R1 is the following:
R1(config)#ipv6 route ::/0 2001:A032:D589:7775::/64
R1(config)#IPv6 router ospf 1
R1(config-rtr)#default-information originate
R1(config-rtr)#do wr
Figure 6 illustrates the routing table of R1 after the above configuration۔
Verifying the Propagated IPv6 Default Route
Verify the default static route on R2 using the show ipv6 route command. Figure 7 illustrates the routing table of R2 receiving the default static route from an external source. Notice that the route source is also OE2 telling that it was learned using OSPFv3. The E2 designation identifies that it is an external type 2 route. The IPv6 route does not use the asterisk for a good route like OSPFv2.