Users Guide

Layer 3 Routing Commands 1517
Example
The following example identifies the next-hop-ip and a preference value of
200.
console(config)#ip route default 192.168.10.1.200
ip route distance
Use the ip route distance command in Global Configuration mode to set the
default distance (preference) for static routes. Lower route preference values
are preferred when determining the best route. The ip route and ip route
default commands allow optional setting of the distance of an individual
static route. The default distance is used when no distance is specified in
these commands. Changing the default distance does not update the
distance of existing static routes, even if they were assigned the original
default distance. The new default distance are applied to static routes created
after invoking the ip route distance command.
Use of the optional vrf parameter executes the command within the context
of the VRF specific routing table.
Syntax
ip route distance [vrf vrf-name]integer
no ip route distance integer
vrf-name—The name of the VRF associated with the routing table context
used by the command. If no vrf is specified, the global routing table
context is used.
integer — Specifies the distance (preference) of an individual static route.
(Range 1-255)
Default Configuration
Default value of distance is 1.
Command Mode
Global Configuration mode