background image
382
Chapter 10
Route Optimization
Let's examine the syntax used in Figure 10.10:
ip route 10.0.0.0 255.0.0.0 null0
The standard syntax of the ip route command is
ip route network network_mask
{address | interface}
where address is the IP number of the next-hop address (the next router on
the way to the destination network) and interface is the interface on the
local router to which traffic should be forwarded.
In our example, interface is the logical interface Null0. Therefore, all
traffic destined for network 10.0.0.0/8 is discarded.
Static, Connected, and Default Routes
So far in this chapter, we have examined how to take routes from one routing
protocol and re-advertise them into a different routing protocol. We'll now
take a look at some special redistribution cases.
If we want to redistribute static routes that we have created or routes that
are part of directly connected interfaces on a router, we can use the following
commands:
redistribute static
which redistributes routes that have been manually configured.
redistribute connected
which redistributes routes of networks that are connected directly to the
local router. These routes may or may not be a part of a routing process.
The Null0 interface example we considered earlier would be an example
of a static route, as would a default route. A default route tells a router where
to send packets if the destination network is not in its routing table. For
example, if a client were trying to reach an IP address on the Internet, and the
local router did not have an explicit route to the destination, then the packet
would be sent along the default route to either a particular router interface
or to the IP address of the next-hop router. When creating a static default
route, the syntax is as follows:
ip route 0.0.0.0 0.0.0.0 {
address | interface}
where 0.0.0.0 0.0.0.0 is the network number for a default route.
Redistributing a default route can be particularly useful for systems such
as older Unix hosts that run RIP. In the case of these hosts, some do not have
a default gateway setting. Rather, these hosts rely on RIP advertisements to
find the default gateway, as shown in Figure 10.11.
Copyright ©2001 SYBEX , Inc., Alameda, CA
www.sybex.com