| The gateway of last
resort is the term applied to a routing entry in the Cisco
routing table that the router forwards packets to when it lacks a
more specific route. The gateway of last resort can be learned from
a route provided by another router that is tagged as candidate
default by the advertising router. The
ip default-network
command is one way to make a router tag a route as a gateway of last
resort.
The
ip
default-network xxx.xxx.xxx.xxx command causes a router to treat
xxx.xxx.xxx.xxx as a gateway of last resort. A router can have
multiple IP default networks entered.
The ip
default-gateway command is used with routers that have IP
routing disabled. It gives them an address to which they can forward
packets whose destination IP addresses are not in their address
space. Cisco 2500s in boot ROM mode are a good example of this
situation. The version of Cisco IOSŪ software that runs from the
Cisco 2500 boot ROM doesn't understand the default-network
command.
Note:
To upgrade a Cisco 2500 with a single Flash memory partition, you
must reconfigure the configuration registers so that the router
comes up in boot ROM mode the next time it is rebooted.
The local domain
refers to networks a router has local knowledge (context) of because
it has a direct connection to them. Using secondary addresses
is a way to use the same interface on a router to connect to two or
more subnets. A secondary address is sometimes used when all host
addresses from one subnet have been assigned and there are still
more hosts on the physical network that need an IP address.
If a LAN segment has
a subnetted address space of 168.71.2.16 with a mask of
255.255.255.240, only 14 host addresses are available. If more than
14 hosts are attached to the network, another IP address space
(subnet) is required. In this situation, hosts in different subnets
attached to the same LAN must use the router to forward packets to
one another.
In the main figure,
if router C did not have an explicit route to subnet 168.72.6.0 or
the major network 168.72.0.0, it would need a gateway of last resort
to send packets to this subnet.
In the
routing table from router C, you can see that router C has installed
a gateway of last resort network 10.0.0.0 with a next hop of
168.71.9.1. You can also see that there is no route to 168.72.6.0 or
168.72.0.0. (see RouterC#show ip route
command output).
The gateway of last
resort is being advertised by router A as a candidate default route.
It is up to the router receiving a candidate default route to
determine whether it should install it as the gateway of last
resort. In this scenario, having router A advertise 10.0.0.0 as the
candidate default route also caused router B to send a route to
router C for 10.0.0.0 that router B flagged as a candidate default
route.
 |
 |
Lab
Activity |
| |
In this lab,
you will learn how to configure OSPF with a
passive-interface, static route and a default route. |
|
|
|
The main figure shows that as far as router C is concerned, the link between router
C and router A is the best path for reaching 10.0.0.0 because router
B increases the metric for 10.0.0.0 when advertising it to router C.
The router A metric is smaller than the router B metric.
Interestingly, as far as reaching 168.71.6.0 is concerned, both of
router C physical paths --- via router A or router B --- could be of
equal cost if all links in the network were the same delay and
bandwidth. However, because this scenario relies on using the
gateway of last resort to 10.0.0.0 to reach 168.71.6.0, only one
path is used, even if they are equal cost in theory.
The
configuration from router A shows how to enable this function. (see RouterA#show
running-config
command output).
The following is a
step-by-step explanation of enabling a router to advertise a gateway
of last resort. The steps do not have to be performed in this exact
order, but all steps must be completed.
- Enter the
appropriate
ip default-network
command. In this
case, network 10.0.0.0 is used.
Interestingly,
this network does not have to actually exist anywhere in the
network. Because IP packets are forwarded on a hop-by-hop basis,
it is necessary only to convince a router to send a packet to
the next hop to ensure that the packet is making forward
progress to its destination. What this command is doing is
telling other routers that somewhere there is a router
advertising 10.0.0.0 and that the router knows how to reach
every other network in the world. Therefore, a packet forwarded
in the general direction of this router is on its way to
reaching its ultimate destination.
Configure a
next-hop address to reach the default network. In this case, a
host in the secondary address space on Ethernet0
(171.68.207.129) is used. This is a static (manually configured)
route.
Enable the
redistribute
static
command for the routing protocol in use. In this
case, IGRP is being used. If you fail to enter this command, the
static route is not advertised.
Configure a
default metric. If you fail to do so, the router uses the
unreachable metric (infinity) when advertising this route,
preventing the route from being accepted by other routers.
The
default
metric
command takes the following form: bandwidth,
delay, reliability, load, and maximum transmission unit (MTU).
Remember that by default only bandwidth and delay are used by
IGRP. The delay in a route is cumulative, and the minimum
bandwidth is used for all links in the path.
|