Send document comments to nexus7k-docfeedback@cisco.com.
13-4
Cisco Nexus 7000 Series NX-OS Unicast Routing Configuration Guide, Release 4.x
OL-20002-02
Chapter 13      Configuring Static Routing
Configuring Static Routing
Note If you are familiar with the Cisco IOS CLI, be aware that the Cisco NX-OS commands for this feature 
might differ from the Cisco IOS commands that you would use. 
Configuring a Static Route
You can configure a static route on the router.
BEFORE YOU BEGIN 
Ensure that you are in the correct VDC (or use the switchto vdc command).
SUMMARY STEPS
1. config t
2. ip route {ip-prefix | ip-addr ip-mask} {[next-hop | nh-prefix] | [interface next-hop | nh-prefix]} [tag 
tag-value [pref]
or
3. ipv6 route ip6-prefix {nh-prefix | link-local-nh-prefix} | {nh-prefix [interface] | link-local-nh-prefix 
[interface]} [tag tag-value [pref]
4. show {ip | ipv6} static-route 
5. copy running-config startup-config
DETAILED STEPS
Command Purpose
Step 1
config t
Example:
switch# config t
switch(config)#
Enters configuration mode.
Step 2
ip route {
ip-prefix 
| 
ip-addr
 
ip-mask
} 
{[
next-hop
 | 
nh-prefix
] | [
interface 
next-hop
 | 
nh-prefix
]} [tag t
ag-value
 
[
pref
]
Example:
switch(config)# ip route 192.0.2.0/8 
ethernet 1/2 192.0.2.4
Configures a static route and the interface for this 
static route. You can optionally configure the next-hop 
address. The preference value sets the administrative 
distance. The range is from 1 to 255. The default is 1.
ipv6 route 
ip6-prefix
 
{
nh-prefix
|
link-local-nh-prefix
} | 
(
nexthop
 [
interface
] | 
link-local-nexthop
 [
interface
]} [tag 
t
ag-value
 [
pref
]
Example:
switch(config)# ipv6 route 
2001:0DB8::/48 6::6 ethernet 2/1
Configures a static route and the interface for this 
static route. You can optionally configure the next-hop 
address. The preference value sets the administrative 
distance. The range is from 1 to 255. The default is 1.