ipv6 route

Adds a static route to the IPv6 routing tables.
Syntax
ipv6 route [ vrf vrf-name ] dest-ipv6-prefix [ ethernet unit/slot/port | lag lag-id | ve ve-num ] [ next-hop-vrf vrf-name | default-vrf ] next-hop-ipv6-address [ metric ] [ bfd ] [ distance number ]
ipv6 route [ vrf vrf-name ] dest-ipv6-prefix { tunnel num | null0 } [ metric ] [ distance number ]
no ipv6 route[ vrf vrf-name ] dest-ipv6-prefix [ ethernet unit/slot/port | lag lag-id | ve ve-num ] [ next-hop-vrf vrf-name | default-vrf ] next-hop-ipv6-address [ metric ] [ bfd ] [ distance number ]
no ipv6 route[ vrf vrf-name ] dest-ipv6-prefix { tunnel num | null0 } [ metric ] [ distance number ]
Parameters
vrf vrf-name
Specifies the VRF that contains the next-hop router (gateway) for the route.
dest-ipv6-prefix
Specifies the destination IPv6 address, including prefix length.
ethernet unit/slot/port
Configures the outgoing interface as the specified Ethernet interface.
lag lag-id
Specifies a LAG interface
ve ve-num
Configures the outgoing interface as the specified Virtual Ethernet interface.
next-hop-vrf vrf-name
Specifies the next-hop VRF.
default-vrf
Specifies the next-hop default VRF.
next-hop-ipv6-address
Specifies the IPv6 address of a next-hop gateway. The next-hop address may be a global IPv6 address or a link-local IPv6 address.
metric
Specifies the cost metric of the route. Valid values range from 1 through 16. The default is 1.
bfd
Enables Bidirectional Forwarding Detection (BFD) for the IP static route.
distance number
Specifies the administrative distance of the route. The default value is 1.
tunnel num
Configures the outgoing interface as the specified tunnel interface.
null0
Drops packets with this destination.
Modes

Global configuration mode

Usage Guidelines

By default, static routes take precedence over routes learned by routing protocols.

Before configuring a static IPv6 route, you must enable the forwarding of IPv6 traffic on the Layer 3 switch using the ipv6 unicast-routing command and enable IPv6 on at least one interface by configuring an IPv6 address or explicitly enabling IPv6 on that interface.

ICX 7150 and ICX 8100 devices do not support tunnels or VRFs.

If a non-default VRF is configured, the no form of the command removes the static IPv6 route configuration from a VRF. When no VRF is configured, the no form of the command removes the IPv6 static route.

When a tunnel is configured as the next hop for a static route, the tunnel must already be configured if the destination is a non-default VRF. In contrast, a tunnel can be designated as the next hop in the default VRF before it is configured. The default VRF is used when no VRF is specified in the command.

Examples

The following example configures inter-VRF route leaking between two VRFs.

device# configure terminal
device(config)# ipv6 route vrf blue 2000:44:1:1::/64 next-hop-vrf red 2000:131:1:1::3

The following example configures inter-VRF route leaking by specifying the next-hop VRF.

device# configure terminal
device(config)# ipv6 route 32::32/128 next-hop-vrf red 2002::2

The following example configures inter-VRF route leaking by specifying the outgoing interface of another VRF.

device# configure terminal
device(config)# ipv6 route 32::32/128 ve 100
Info: Outgoing interface vrf red is different from route vrf default-vrf

The following example configures a static IPv6 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.

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

The following example configures a static IPv6 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 in the non-default VRF named blue.

device# configure terminal
device(config)# ipv6 route vrf blue 2001:DB8::0/32 2001:DB8:0:ee44::1 

The following example configures tunnel 1 as the next-hop gateway for 2001:DB8::0/32 destination addresses. Because the destination is a non-default VRF (VRF blue), the tunnel must be configured before the static route is configured.

device# configure terminal
device(config)# ipv6 route vrf blue 2001:DB8::0/32 tunnel 1

The following example configures a null route that discards packets to the destination IPv6 route 2001 : DB8 : : 0/32 when the preferred route using virtual interface 3 (ve 3) through the next hop with the link-local address fe80::1 is not available. The null route has a higher metric (2) than the preferred route, which has a default metric of 1.

device# configure terminal
device(config)# ipv6 route 2001 : DB8 : : 0/32 ve 3 fe80::1
device(config)# ipv6 route 2001 : DB8 : : 0/32 null0 2

The following example configures BFD for an IPv6 static route.

device# configure terminal
device(config)# ipv6 route 2001:1::3:1/64 2001:2::3:1 bfd
 
History
Release version Command history
08.0.95 This command was modified to add the next-hop-vrf vrf-name and default-vrf options.