C
HAPTER
45
| IP Routing Commands
Global Routing Configuration
– 1020 –
ip route This command configures static routes. Use the no form to remove static
routes.
SYNTAX
ip route destination-ip netmask next-hop [distance]
no ip route {destination-ip netmask next-hop | *}
destination-ip – IP address of the destination network, subnetwork,
or host.
netmask - Network mask for the associated IP subnet. This mask
identifies the host address bits used for routing to specific subnets.
next-hop – IP address of the next hop router used for this route.
distance – An administrative distance indicating that this route can
be overridden by dynamic routing information if the distance of the
dynamic route is less than that configured for the static route. Note
that the default administrative distances used by the dynamic
unicast routing protocols is 110 for OSPF and 120 for RIP.
(Range: 1-255, Default: 1)
* – Removes all static routing table entries.
DEFAULT SETTING
No static routes are configured.
COMMAND MODE
Global Configuration
COMMAND USAGE
â—† Up to 512 static routes can be configured.
â—† Up to eight equal-cost multipaths (ECMP) can be configured for static
routing using the maximum-paths command.
â—† If an administrative distance is defined for a static route, and the same
destination can be reached through a dynamic route at a lower
administration distance, then the dynamic route will be used.
â—† If both static and dynamic paths have the same lowest cost, the first
route stored in the routing table, either statically configured or
dynamically learned via a routing protocol, will be used.
â—† Static routes are included in RIP and OSPF updates periodically sent by
the router if this feature is enabled by the RIP or OSPF redistribute
command (see page 1031 or page 1052, respectively).