IP Routing Protocol-Independent Commands
IP Routing Protocol-Independent Commands
78-21075-01 Command Line Interface Reference Guide
47.1
ip route
Use the ip route command in Global Configuration mode to establish static routes.
Use the no form of this command to remove static routes.
Syntax
prefix
mask
ip route
{
prefix
mask
no ip route
{
Parameters
•
prefix—IP route prefix for the destination.
•
mask—Prefix mask for the destination.
•
/prefix-length—Prefix mask for the destination.Specifies the number of bits
that comprise the IP address prefix. The prefix length must be preceded by
a forward slash (/). (Range: 0–32)
•
ip-address—IP address of the next hop that can be used to reach that
network.
•
reject-route—Stops routing to the destination network via all gateways.
•
metric cost—Cost (metric) of the route. The default cost is 1. Range: 1–255.
Default Configuration
No static routes are established. The default metric cost is 1.
Command Mode
Global configuration (config)
User Guidelines
Use the no ip route command without the i
static routes to the given subnet.
Use the no ip route command with the
static route to the given subnet via the given next hop.
prefix-length
ip-address
| /
} {{
prefix-length
ip-address
|
} [
ip-address
cost
[metric
]} | reject-route}
]
p-address
parameter to remove all
parameter to remove only one
47
767