Creating an ip
route to 0.0.0.0/0 is the
simplest way to configure a default route. This is done using the
following syntax:
Router(config)# ip route
0.0.0.0 0.0.0.0 [next-hop-ip-address | exit-interface]
To the Cisco IOS, network 0.0.0.0 /0
has special meaning as the gateway of last resort. All destination
addresses match this route because a mask of all 0s requires none of
the 32 bits in an address to be an exact match.
A route to 0.0.0.0 /0 is often called
a "quad-zero route." Manually configuring 0.0.0.0/0 routes
on every router might suffice in a simple network. You may want
routers to dynamically exchange default routes in more complex
situations. The exchange of default information works differently
depending on the routing protocol being used and can create severe
problems when improperly configured. Remember, default routes
typically point to the outside world, so when they fail, everyone
tends to notice!
Static routes to 0.0.0.0/0 are
automatically propagated to other routers in RIP updates. The only
way to stop this automatic update is to use a route filter, a
configuration option that is discussed in Chapter 7, Route
Optimization.
However, in IOS release 12.1, RIP
does not propagate a static default route automatically. If you are
using RIP and IOS 12.1, you must manually configure the RIP process
to advertise the static default by issuing the network
0.0.0.0 command.
Alternately, you can use either the default-information
originate command or the redistribute
static command to configure
static default route propagation. OSPF (regardless of the IOS
version) requires the default-information
originate command if you want
to propagate static default routes. The following example
illustrates this configuration for RIP (see the figure).
RTY(config)# ip route 0.0.0.0
0.0.0.0 172.16.1.2
RTY(config)# router rip
RTY(config-router)# default-information originate
Using the default-information
originate command, an
administrator can statically configure a single RIP router with a
0.0.0.0/0 route, and that default route will be propagated to other
routers. The default-information
originate command can also be
used with OSPF to achieve the same effect.
|