Default Routes

The capability to generate and redistribute default routes is of extreme importance within any large network. The most common method of generating a default route is through the use of a static route statement within the router. An ASBR can be forced to generate a default route into an OSPF network (domain). Whenever you configure the redistribute command or the default information originate command into OSPF, the router becomes an ASBR. An ASBR in OSPF does not by default distribute a default route nor does it automatically generate one. You can force an ASBR to generate a default route into an OSPF routing domain, as illustrated in Figure 5-20.

Figure 5-20 ASBRs Consolidate Routes

BGP Updates

BGP Updates

An ASBR Forwards External Links or Default External Route 0.0.0.0/0

An ASBR Forwards External Links or Default External Route 0.0.0.0/0

Autonomous System 109

To force the ASBR to generate a default route, execute the following command in router configuration mode:

default-information originate [always] [metric metricvalue] [metric-type type-value] [route-map map-name]

In OSPF, the default-information originate command allows the OSPF routing process to propagate a default route that is originated from the router that has the default route configured. With this command, a default route must be configured on the router that has received the default-information originate command.

This unique command also has an always keyword that can be added to the original command. With the always keyword, the router advertises a default route into OSPF, regardless of whether the router knows of or has a default route configured. This is how the keyword alters router operation. However, this might result in a black hole, so use this keyword with caution.

You must use the default-information originate command to redistribute a static default route. If you want the router to create and redistribute a default route whether you have one configured or not, use the default-information originate always command.

Figure 5-21 shows a sample network, and an example demonstrates how a default route is determined.

320 Chapter 5: Routing Concepts and Configuration

Figure 5-21 Injecting a Default Route

Figure 5-21 Injecting a Default Route

Cisco Default Route

Referring to Figure 5-21, assuming that Router E is injecting a default route of 0.0.0.0 into the RIP network, and knowing that Router C has a gateway of last resort of 203.250.15.2, the following is true of Routers A, C, and E:

• Router A knows only what Router C tells it about the default route.

• Router C sees the default route but does not share the information with other routers until told to by the default-information originate command.

• Router E knows a default route of 0.0.0.0.

The output in Example 5-35 shows that Router C knows about the default route, but it does not tell other routers until told to do so with the default-information originate command.

Example 5-35 Router C Has a Default Route

Router C#show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default

Gateway of last resort is 203.250.15.2 to network 0.0.0.0 203.250.15.0 255.255.255.192 is subnetted, 4 subnets C 203.250.15.0 is directly connected, Serial1 C 203.250.15.64 is directly connected, Ethernet0 R 203.250.15.128 [120/1] via 203.250.15.2, 00:00:17, Serial1 O 203.250.15.192 [110/20] via 203.250.15.68, 2d23, Ethernet0 R* 0.0.0.0 0.0.0.0 [120/1] via 203.250.15.2, 00:00:17, Serial1 [120/1] via 203.250.15.68, 00:00:32, Ethernet0 interface Ethernet0

ip address 203.250.15.67 255.255.255.192

Example 5-35 Router C Has a Default Route (Continued) interface Seriall ip address 203.250.15.1 255.255.255.192

router ospf 10

redistribute rip metric 10 subnets network 203.250.15.0 0.0.0.255 area 0 default-information originate metric 10

router rip redistribute ospf 10 metric 2 passive-interface Ethernet0 network 203.250.15.0

Now that Router C has been configured to tell Router A about the default route, you can check Router A's routing table. You can quickly see in Example 5-36 that the default route is known by the router.

Example 5-36 Router A's Routing Table Confirms Router A's Knowledge of the Default Route

Router A#show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default

Gateway of last resort is 203.250.15.67 to network 0.0.0.0 203.250.15.0 255.255.255.192 is subnetted, 4 subnets O 203.250.15.0 [110/74] via 203.250.15.67, 2d23, Ethernet0 C 203.250.15.64 is directly connected, Ethernet0 O E2 203.250.15.128 [110/10] via 203.250.15.67, 2d23, Ethernet0 C 203.250.15.192 is directly connected, Ethernet1

O*E2 0.0.0.0 0.0.0.0 [110/10] via 203.250.15.67, 00:00:17, Ethernet0

Router A has learned about 0.0.0.0 as an external route with a metric of 10. The gateway of last resort is set to 203.250.15.67, as expected. Therefore, Router A's default route is the E0 interface of Router C that has a default route in Router E.

Continue reading here: Administrative Distance and Metrics

Was this article helpful?

0 0

Readers' Questions

  • pamela
    Can ospf propagate a default route if there is no static default route configured on the router?
    1 month ago
  • Yes, OSPF can propagate a default route even if there is no static default route configured on the router. This can be achieved through the use of a default information originate command in OSPF. When the default information originate command is enabled on a router, it will advertise a default route to its OSPF neighbors. This default route will then be propagated throughout the OSPF network. However, it is important to note that the router must have at least one route in its routing table that matches the network range specified in the OSPF configuration for the default route to be advertised. In summary, OSPF can propagate a default route through the use of the default information originate command, regardless of whether there is a static default route configured on the router.