Configuring Default Routes and ODR

 

Default routes can be configured either on each router that needs a default route or on one router that in turn advertises the routes to its peers. The case studies of this section examine both methods .

Recall from the discussion in Chapter 5, "Routing Information Protocol (RIP)," of classful route lookups that a router will first match a major network number and then match the subnet. If a subnet cannot be matched, the packet will be dropped. Classful route lookup is the default behavior on Cisco routers; lookups can be changed to classless (even for classful routing protocols) with the global command ip classless .

Note

Routers using a default route should perform classless lookups.


Any router using a default route must perform classless route lookups. Figure 12.5 shows why. In this internetwork, Memphis is speaking a dynamic routing protocol to Tanis and Giza, but is not receiving routes from Thebes. Memphis has a default route pointing to Thebes for routing packets to BigNet. If Memphis receives a packet with a destination address of 192.168.1.50 and is performing classful route lookups, it will first match major network 192.168.1.0, of which it has several subnets in its routing table. Memphis will then attempt to find a route for subnet 192.168.1.48/28, but because Memphis is not receiving routes from Thebes, this subnet is not in its routing table. The packet will be dropped.

Figure 12.5. Memphis forwards packets to Thebes with a default route. If Memphis uses classful route lookups, subnet 192.168.1.48/28 will be unreachable.

graphics/12fig05.gif

If Memphis is configured with ip classless , it will try to find the most specific match for 192.168.1.48/28 without matching the major network first. Finding no match for this subnet in the routing table, it will match the default route and forward the packet to Thebes.

Case Study: Static Default Routes

The configuration of Memphis in Figure 12.5 is:

 
routerrip
network192.168.1.0
!
ipclassless
iproute0.0.0.00.0.0.0192.168.1.82

The static route configures the default route address of 0.0.0.0, and uses a mask that is also 0.0.0.0. A common mistake made by people configuring default routes for the first time is to use an all-ones mask instead of an all-zeros mask, such as:

 
iproute0.0.0.0255.255.255.255192.168.1.82

An all-ones mask would configure a host route to 0.0.0.0, and the only packets that would match this address would be those with a destination address of 0.0.0.0. The all-zeros mask, on the other hand, is a mask made up entirely of "don't care" bits and will match any bit in any position. The beginning of this chapter described the default address as a summary route taken to its extreme, so that every bit is summarized with a zero. The mask of the default route is a summary mask taken to its extreme.

Note

Gateway of last resort


Memphis' default route has a next-hop address at Thebes. This next -hop address is the gateway of last resort , or the default router. Figure 12.6 shows the routing table at Memphis. The route to 0.0.0.0 is tagged as a candidate default, and the gateway of last resort is indicated at the top of the table.

Figure 12.6. Memphis' routing table, showing the default route and the gateway of last resort.

graphics/12fig06.gif

Memphis will advertise the default route to Tanis and Giza (Figure 12.7). This action may seem surprising at first because no redistribution has been configured at Memphis. However, the static route is not actually the route being redistributed. After a default route is identified in the routing table, RIP, IGRP, and EIGRP will automatically advertise it. OSPF and IS-IS require some additional configuration, as shown in a subsequent case study.

Figure 12.7. The routing table of Tanis shows that the default route has been learned from Memphis via RIP.

graphics/12fig07.gif

Default routes are also useful for connecting classless routing domains. In Figure 12.8, Chimu is connecting a RIP domain with an EIGRP domain. Although the masks of major network 192.168.25.0 are consistent in the RIP domain, they are variably subnetted in the EIGRP domain. Further, the VLSM scheme does not lend itself to summarization into RIP.

Figure 12.8. A default route enables RIP to route into the variably subnetted EIGRP domain.

graphics/12fig08.gif

Chimu's configuration is:

 
routereigrp1
redistributeripmetric100010025511500
passive-interfaceEthernet0
passive-interfaceEthernet1
network192.168.25.0

!
routerrip
passive-interfaceSerial0
network192.168.25.0
!
ipclassless
iproute0.0.0.00.0.0.0Null0

Chimu has a full set of routes from the EIGRP domain, but is not redistributing them into RIP. Instead, Chimu is advertising a default route. The RIP routers will forward packets with unknown destinations to Chimu, which can then consult its routing table for a more-specific route into the EIGRP domain.

Chimu's static route is pointing to the null interface rather than a next-hop address. If a packet is forwarded to Chimu with a destination on a nonexistent subnet, such as 192.168.25.224/28, the packet will be dropped instead of being forwarded into the EIGRP domain.

Case Study: The Default-Network Command

An alternative method of configuring default routes is to use the command ip default-network . This command specifies a network address to be used as a default network. The network may be directly connected to the router, specified by a static route, or discovered by a dynamic routing protocol.

The configuration of Athens in Figure 12.9 is:

 
routerrip
network172.16.0.0
!
ipclassless
default-network10.0.0.0
Figure 12.9. The default-network command is used at Athens to generate a default network advertisement.

graphics/12fig09.gif

Figure 12.10 shows that network 10.0.0.0 has been tagged as a candidate default route in Athens' routing table, but notice that no gateway of last resort is specified. The reason is that Athens is the gateway to the default network. The ip default-network command will cause Athens to advertise a default network, even though no network statement for 10.0.0.0 exists under the RIP configuration (Figure 12.11).

Figure 12.10. Network 10.0.0.0 is tagged as a candidate default in Athens' routing table.

graphics/12fig10.gif

Figure 12.11. Sparta's routing table shows that Athens is advertising a default route of 0.0.0.0 and that Athens is Sparta's gateway of last resort.

graphics/12fig11.gif

Default routing is somewhat different for IGRP and EIGRP. These protocols do not understand the address 0.0.0.0. Rather, they advertise an actual address as an external route (see Chapters 6, "Interior Gateway Routing Protocol (IGRP)," and 8, "Enhanced Interior Gateway Routing Protocol"). Destinations advertised as external routes in IGRP and EIGRP are understood to be default routes. If the routers in Figure 12.9 are configured to run IGRP, Athens' configuration will be:

Note

IGRP and EIGRP do not use 0.0.0.0 to identify a default route.


 
routerigrp1
network10.0.0.0
network172.16.0.0
!
ipclassless
ipdefault-network10.0.0.0

The ip default-network command remains the same, but notice that a network statement for 10.0.0.0 is added to the IGRP configuration. Because IGRP uses the actual network address, that address must be configured to be advertised, as shown in Figure 12.12. Because Corinth has learned about the default route from Sparta, that router is Corinth's gateway of last resort. If the link to Sparta fails, Corinth will use Argos as its gateway of last resort.

Figure 12.12. IGRP and EIGRP use an actual network address, rather than 0.0.0.0, as the default network. Corinth's routing table shows that network 10.0.0.0 is tagged as the default network.

graphics/12fig12.gif

Case Study: The Default-Information Originate Command

An OSPF ASBR and an IS-IS interdomain router will not automatically advertise a default route into their routing domains, even when one exists. For example, suppose Athens in Figure 12.9 is configured for OSPF and given a static default route into BigNet:

 
routerospf1
network172.16.0.00.0.255.255area0
!
ipclassless
iproute0.0.0.00.0.0.010.1.1.2

Figure 12.13 shows the routing tables of Athens and Sparta. Although the static route has caused the gateway of last resort to be set at Athens, Sparta has no knowledge of the default route. The default route must be advertised into the OSPF domain in type 5 LSAs, which means that Athens must be an ASBR. Yet so far, nothing in Athens' configuration tells it to perform this function.

Figure 12.13. The OSPF process at Athens does not automatically advertise the default route into the OSPF domain.

graphics/12fig13.gif

The default-information originate command is a specialized form of the redistribute command, causing a default route to be redistributed into OSPF or IS-IS. And like redistribute , the default-information originate command informs an OSPF router that it is an ASBR, or an IS-IS router that it is an interdomain router. Also like redistribute , the metric of the redistributed default can be specified, as can the OSPF external metric type and the IS-IS level. To redistribute the default route into the OSPF domain with a metric of 10 and an external metric type of E1, Athens's configuration will be:

 
routerospf1
network172.16.0.00.0.255.255area0
default-informationoriginatemetric10metric-type1
!
ipclassless
iproute0.0.0.00.0.0.010.1.1.2

Figure 12.14 shows that the default route is now being redistributed into OSPF. The route can also be observed in Sparta's OSPF database (Figure 12.15).

Figure 12.14. After default-information originate is configured at Athens, the default route is redistributed into the OSPF domain.

graphics/12fig14.gif

Figure 12.15. Like other external routes advertised by an ASBR, the default route is advertised in a type 5 LSA.

graphics/12fig15.gif

The default-information originate command also will redistribute into OSPF or IS-IS a default route that has been discovered by another routing process. In the following configuration, the static route to 0.0.0.0 has been eliminated, and Athens is speaking BGP to a router in BigNet:

 
routerospf1
network172.16.0.00.0.255.255area0
default-informationoriginatemetric10metric-type1
!
routerbgp65501
network172.16.0.0
neighbor10.1.1.2remote-as65502
!
ipclassless

Athens is now learning a route to 0.0.0.0 from its BGP neighbor and will advertise the route into the OSPF domain via type 5 LSAs (Figure 12.16).

Figure 12.16. A BGP-speaking neighbor in BigNet is advertising a default route to Athens.

graphics/12fig16.gif

A benefit of default routes, or any summary route, is that it can add stability to an internetwork. But what if the default route itself is unstable? For example, suppose that the default route advertised to Athens in Figure 12.15 is flapping , that is, alternating frequently between reachable and unreachable. With each change, Athens must send a new type 5 LSA into the OSPF domain. This LSA will be advertised into all non-stub areas. Although this flooding and reflooding may have minimal impact on system resources, it still might be undesirable to the network administrator. A solution is to use the always keyword: [4]

[4] This keyword is available only under OSPF. It is not supported under IS-IS.

 
routerospf1
network172.16.0.00.0.255.255area0
default-informationoriginatealwaysmetric10metric-type1
!
routerbgp65501
network172.16.0.0
neighbor10.1.1.2remote-as65502
!
ipclassless

With this configuration, Athens will always advertise a default route into the OSPF domain, regardless of whether it actually has a route to 0.0.0.0. If a router within the OSPF domain defaults a packet to Athens and Athens has no default route, it will send an ICMP Destination Unreachable message to the source address and drop the packet.

The always keyword can be used safely when there is only a single default route out of the OSPF domain. If more than one ASBR is advertising a default route, the defaults should be dynamic ”that is, the loss of a default route should be advertised. If an ASBR claims to have a default when it doesn't, packets can be forwarded to it instead of to a legitimate ASBR.

Case Study: Configuring On-Demand Routing

ODR is enabled with a single command, router odr . No networks or other parameters must be specified. CDP is enabled by default; it needs to be enabled only if it has been turned off for some reason. The command to enable the CDP process on a router is cdp run ; to enable CDP on a specific interface, the command is cdp enable .

Figure 12.17 shows a typical hub-and-spoke topology. To configure ODR, the hub router will have the router odr command. As long as all routers are running IOS 11.2 or later and the connecting medium supports SNAP (such as the Frame Relay or PVCs shown), ODR is operational and the hub will learn the stub networks. The only configuration necessary at the stub routers is a static default route to the hub.

Figure 12.17. Hub-and-spoke topologies such as this one are common across Frame Relay networks.

graphics/12fig17.gif

ODR can also be redistributed. If Baghdad in Figure 12.17 needs to advertise the ODR-discovered routes into OSPF, Baghdad's configuration might be:

 
routerodr
!
routerospf1
redistributeodrmetric100
network172.16.0.00.0.255.255area5


Routing TCP[s]IP (Vol. 11998)
Routing TCP[s]IP (Vol. 11998)
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 224

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net