| IP Routing Commands
C
45
HAPTER
Global Routing Configuration
ip route
This command configures static routes. Use the no form to remove static
routes.
S
YNTAX
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.
D
S
EFAULT
ETTING
No static routes are configured.
C
M
OMMAND
ODE
Global Configuration
C
U
OMMAND
SAGE
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
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
command (see
page 1031
– 1020 –
command.
or
page
1052, respectively).
redistribute