|
A router does not use a gateway of last resort
for addresses that are part of its local domain. A local domain is a major
network to which the router is connected. In the figure,
RTX has two interfaces configured with IP addresses that belong to the
major network, 172.16.0.0.
If all three routers are running IGRP, RTX
will not learn about the subnet 172.16.1.1/30 because a variable-length
subnet mask is used. (IGRP does not support VLSM.) So, after statically
configuring a 0.0.0.0/0 route, RTX's routing table is shown in the figure.
(Click on the topology to view the table).
What happens when you issue a ping to 172.16.1.1 from RTX? Because the
network 172.16.1.0/30 is not in RTX's routing table, you may expect RTX to
use its default route to send the ping to RTZ. However, because RTX has
interfaces connected to the major net 172.16.0.0, RTX considers 172.16.0.0
a local domain and will not use a default route to reach 172.16.1.0 or any
other local domain address. Without additional configuration, RTX's ping
to 172.16.1.1 will fail.
You can solve this problem in several ways.
The first and best approach is to configure the router with the ip
classless global configuration
command. With ip classless
enabled (which is the default in Cisco IOS versions 11.3 and greater), the
router uses the best prefix match available, including a supernet route,
such as 172.0.0.0/8 or, ultimately, 0.0.0.0/0. By enabling ip
classless you can get RTX to use
the 0.0.0.0/0 route to reach unknown subnets within its local domain,
172.16.0.0.
A second approach is to give RTX an
explicit route for the major network 172.16.0.0, as shown:
RTX(config)#ip route 172.16.0.0
255.255.0.0 172.16.3.1
Without a more specific route available for
172.16.1.1, RTX uses this static route to the major network number
172.16.0.0/16 and will successfully route packets destined for 172.16.1.1.
|