Send document comments to nexus7k-docfeedback@cisco.com.
13-6
Cisco Nexus 7000 Series NX-OS Unicast Routing Configuration Guide, Release 4.x
OL-20002-02
Chapter 13 Configuring Static Routing
Verifying Static Routing Configuration
This example shows how to configure a static route:
switch# config t
switch(config)# vrf context StaticVrf
switch(config-vrf)# ip route 192.0.2.0/8 192.0.2.10
switch(config-vrf)# copy running-config startup-config
Verifying Static Routing Configuration
To view configuration information, use the following commands:
Static Routing Example Configuration
This example shows how to configure static routing:
config t
ip route 192.0.2.0/8 192.0.2.10
copy running-config startup-config
Step 2
ip route {
ip-prefix
|
ip-addr
ip-mask
}
{
next-hop
|
nh-prefix
|
interface
} [tag
t
ag-value
[
pref
]
Example:
switch(config-vrf)# ip route 192.0.2.0/8
ethernet 1/2
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.
Step 3
show {ip | ipv6} static-route vrf
vrf-name
Example:
switch(config-vrf)# show ip static-route
(Optional) Displays information on static routes.
Step 4
copy running-config startup-config
Example:
switch(config-vrf)# copy running-config
startup-config
(Optional) Saves this configuration change.
Command Purpose
Command Purpose
show ip static-route Displays the configured static routes.
show ipv6 static-route vrf vrf-name Displays static route information per-VRF.
show ipv6 static-route Displays the configured static routes.