background image
Implementing Basic DDR 151
Default Routes
From time to time, a router is faced with a dilemma that it would dread (if it could dread, that
is). The dilemma is what to do when it doesn't know what to do. As it stands now, in the absence
of a suitable routing table entry to a given destination, a router has no choice but to return an
ICMP "Destination Unreachable" message to the sender.
This dilemma, however, is easily remedied. By giving the router a default route, it can forward
the traffic on to another router that may have a suitable entry in a routing table to keep the traffic
flow alive. This is known as the gateway of last resort.
The default route can be entered in a number of different ways. Depending on the routing
protocol and its configuration, the default route can even be injected into the routing table
automatically.
If the default route must be entered manually (as with RIP), you can issue the ip default-
network
command. There is a catch here, however: The router must have a valid route (either
static or dynamic) to the default network. If the routing table does not have an entry for the
default network, one must be entered. Example 6-12 illustrates this concept.
As mentioned earlier, you may have the option of performing this function in another way: If
the routing protocol supports it, a static default route to the network 0.0.0.0 0.0.0.0 is used. The
entry is that of a static route. Example 6-13 illustrates the static default route.
Notice that a specific next hop was specified. This is significant in that a static route with a
specific next hop is not redistributed automatically. If the overall desire is to have this route
automatically redistribute, an outbound interface can be specified. This is true with all static
routes, not just the static default route. Example 6-14 illustrates the same configuration, but with
one that does have to be manually redistributed.
In this case, any traffic for which the router does not have a suitable routing entry is forwarded
out interface serial 0 to the device on the other side of the link.
Example 6-12
Static Route with ip default-network
RouterB(config)#ip route 10.11.1.0 255.255.255.0 10.12.1.1
RouterB(config)#ip default-network 10.11.1.0
Example 6-13
Static Default Route
RouterB(config)#ip route 0.0.0.0 0.0.0.0 10.12.1.1
Example 6-14
Automatically Redistributed Default Route
RouterB(config)#ip route 0.0.0.0 0.0.0.0 Serial 0