11-17
IP Routing—Configuring Static Routes
Configuring Static Routes
You can also configure a floating static route that only appears when a route
discovered using a routing protocol becomes invalid and is removed from the
routing table. Simply, specify an administrative distance in the floating static
route that is higher than that for the protocol.
For example, your router has learned a route to network 192.168.115.0 /24 by
running OSPF on the PPP 1 interface. The router uses an ISDN module for
backup. Configure a floating static route through the demand interface that
will only appear if the PPP 1 interface fails:
ProCurve(config)# ip route 192.168.115.0 /24 demand 1 120
Because OSPF routes have an administrative distance of 110, specify 120 for
the floating static route’s administrative distance. (Refer to Table 11-1 on page
11-11 for the administrative distance of various routing protocols.)
Configuring a Default Route
A default route is a special static route that applies to all traffic. Typically,
when the router receives a packet that it does not know how to forward, it
drops it. A default route allows the router to forward all such packets toward
the destination most likely to be able to route them.
To configure a default route, enter a route to a destination address of all zeros
with an all-zero subnet mask. The all-zero subnet mask indicates to the router
that a packet’s IP address does not have to match any of the destination
address bits in order for the route to be valid. Because the router always
matches traffic to the most specific route, it will only use the default route for
traffic that would otherwise be dropped.
To configure the default route, move to the global configuration mode context
and enter this command:
Syntax: ip route 0.0.0.0 [0.0.0.0 | /0] <next hop A.B.C.D | forwarding interface ID> [track
<name>] [<administrative distance>]
The ProCurve Secure Router allows you to enter the default route in CIDR
notation.
Instead of configuring a route to a default next-hop address, you can configure
a default forwarding interface. A default route is often used to forward
external traffic. In this case, specifying the WAN interface as the default
forwarding interface can be a good idea so that the default remains valid no
matter what IP address the remote router has.