25
523
25.3 ip route
To establish static routes, use the ip route command in global configuration mode.
To remove static routes, use the no form of this command.
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.
•
value
metric
—Metric of the route. The default metric is 6. Range: 1–255.
•
reject-route—Stopping routing to the destination network.
Default Configuration
No static routes are established.
Command Mode
Global Configuration mode
User Guidelines
Use the no ip route comamnd without the i
static routes to the given subnet.
Use the no ip route comand with the
static route to the given subnet via the given next hop.
prefix-length
ip-address
| /
} {{
prefix-length
ip-address
| /
} [
ip-address
Cisco Sx350 Ph. 2.2.5 Devices - Command Line Interface Reference Guide
IP Routing Protocol-Independent Commands
value
[metric
]} | reject-route}
]
p-address
parameter to remove all
parameter to remove only one