![Cisco Nexus 3548 series Command Reference Manual Download Page 226](http://html.mh-extra.com/html/cisco/nexus-3548-series/nexus-3548-series_command-reference-manual_2609162226.webp)
206
Cisco Nexus 3548 Switch NX-OS Unicast Routing Command Reference
OL-27852-01
Chapter Unicast Routing Commands
ip route
ip route
To configure a static route, use the
ip route
command. To remove the static route, use the
no
form of this
command.
ip route
ip-prefix
/
mask
{[
interface
]
next-hop
} [
preference
] [
tag
id
]
no ip route
ip-prefix
/
mask
{[
interface
]
next-hop
}} [
preference
] [
tag
id
]
Syntax Description
Command Default
None
Command Modes
Global configuration mode
Command History
Usage Guidelines
Static routes have a default administrative distance of 1. If you want a dynamic routing protocol to take
precidence over a static route, you must configure the static route preference argument to be greater than
the administrative distance of the dynamic routing protocol. For example, routes derived with the
Enhanced Interior Gateway Routing Protocol (EIGRP) have a default administrative distance of 100. To
have a static route that would be overridden by an EIGRP dynamic route, you should specify an
administrative distance greater than 100.
This command does not require a license.
Examples
This example shows how to create a static route for destinations with the IP address prefix
192.168.1.1/32, reachable through the next-hop address 10.0.0.2:
switch#
configure terminal
switch(config)#
ip route 192.168.1.1/32 10.0.0.2
switch(config)#
ip-prefix
/
length
IP prefix and prefix length. The format is x.x.x.x/length. The length is 1 to 32.
interface
(Optional) Interface on which all packets are sent to reach this route. Use
?
to
display a list of supported interfaces.
next-hop
IP address of the next hop that can be used to reach that network. You can
specify an IP address and an interface type and interface number. The format
is x.x.x.x/length. The length is 1 to 32.
preference
(Optional) Route preference that is used as the administrative distance to this
route. The range is from 1 to 255. The default is 1.
tag
id
(Optional) Assigns a route tag that can be used to match against in a route
map. The range is from 0 to 4294967295. The default is 0.
Release
Modification
5.0(3)A1(1)
This command was introduced.