ipv6 route

Configures an IPv6 static route.

Syntax

ipv6 route dest-ipv6-prefix / prefix-length next-hop-ipv6-address [ metric ] [ distance number ] [ tag tag-number ] [ name name-value ]
ipv6 route dest-ipv6-prefix / prefix-length link-local-next-hop-ipv6-address [ ethernet slot/port ] [ metric ] [ distance number ] [ tag tag-number ] [ name name-value ]
ipv6 route dest-ipv6-prefix / prefix-length link-local-next-hop-ipv6-address [ port-channel number ] [ metric ] [ distance number ] [ tag tag-number ] [ name name-value ]
ipv6 route dest-ipv6-prefix / prefix-length link-local-next-hop-ipv6-address [ ve ve-id ] [ metric ] [ distance number ] [ tag tag-number ] [ name name-value ]
ipv6 route next-hop-recursion
no ipv6 route dest-ipv6-prefix / prefix-length next-hop-ipv6-address
no ipv6 route dest-ipv6-prefix / prefix-length link-local-next-hop-ipv6-address [ ethernet slot/port ]
no ipv6 route dest-ipv6-prefix / prefix-length link-local-next-hop-ipv6-address [ port-channel number ]
no ipv6 route dest-ipv6-prefix / prefix-length link-local-next-hop-ipv6-address [ ve ve-id ]
no ipv6 route next-hop-recursion

Command Default

No IPv6 static route is configured by default.

Parameters

dest-ipv6-prefix
Destination IPv6 prefix in hexadecimal with 16-bit values between colons, as specified in RFC 2373.
prefix-length
A decimal value specifying the length of the IPv6 address prefix.
next-hop-ipv6-address
IPv6 address of the next-hop gateway.
link-local-next-hop-ipv6-address
IPv6 address of the link-local next-hop gateway.
ethernet slot/port
Specifies the Ethernet slot and port.
port-channel number
Specifies a port-channel interface.
ve ve-id
Specifies the virtual Ethernet (VE) interface.
metric
Specifies a value that the Layer 3 switch uses to compare this route to other static routes in the IPv6 static route table that have the same destination. The metric applies only to routes that the Layer 3 switch has already placed in the IPv6 static route table. Two or more routes to the same destination with the same metric will load share (as in ECMP load sharing). The range is from 1 through 16. The default is 1.
distance number
Specifies an administrative distance. The range is from 1 through 254. The default is 1. This is a value that the Layer 3 switch uses to compare this route with routes from other route sources that have the same destination. By default, static routes take precedence over routes learned by routing protocols. To choose a dynamic route over a static route, configure the static route with a higher administrative distance than the dynamic route. A distance of 255 is considered unreachable.
tag
Specifies a tag value for the route. The route tag can be used for route redistribution to routing protocols by means of route maps (as in IPv4 static route redistribution).
tag-number
A number from 0 through 4294967295. The default is 0.
next-hop-recursion
Specifies that if the next hop for a static route is reachable, then that route is added to the routing table.
name name-value
Specifies the name to be assigned to this IPv6 route. This field can be used to assign a meaningful, human readable description to this route configuration. Maximum length 127 characters.

Modes

Global configuration mode

VRF configuration mode

Usage Guidelines

Use the no form of the command with the same parameters to remove the IPv6 static route.

Examples

The following example creates an IPv6 static route for a destination network with the prefix 2001:DB8::0/32 and a next-hop gateway with the global address 2001:DB8:0:ee44::1. It also assigns a name to it.

device# configure terminal
device(config)# ipv6 route 2001:DB8::0/32 2001:DB8:0:ee44::1 name route-sj-01

The following example configures non-recursive lookup in the default VRF.

device(config)# ipv6 route next-hop-recursion
 

The following example configures non-recursive lookup in a non-default VRF named red.

device(config)# vrf red
device(config-vrf-red)# address-family ipv6 unicast
device(config-vrf-red-ipv6-unicast)# ipv6 route next-hop-recursion