ipv6 route dest

This feature enables you to create static routes (including null routes with or without ICMP notification to the sender) by adding such routes directly to the route table in the routing switch.

Syntax

ipv6 route dest-ipv6-addr/prefix-length [next-hop-gateway-addr|vlan vid|tunnel tunnel-id|blackhole|reject][distance 1 - 255][namestring][tagtag-value ]

no ipv6 route dest-ipv6-addr/prefix-length [next-hop-gateway-addr|vlan vid|tunnel tunnel-id|blackhole|reject][distance 1 - 255][namestring][tagtag-value ]

Options

dest-ipv6-addr/prefix-length

Network prefix for the destination on IPv6 address.

[next-hop-gateway-addr|vlan vid|tunnel tunnel-id

The gateway for reaching the destination.

The next-hop address option (link-local or global unicast) is not required to be directly reachable on a local subnet. (If it is not directly reachable, the route is added to the routing table when a path to this address is learned.)

If the next-hop address is link-local, it must include both the address and the applicable VLAN VID.

For example: FE80::127%vlan10,where VLAN 10 is the interface where FE80::127 exists. For a tunnel, it would be FE80::127%tun3.

blackhole

Specifies a null route where IP traffic for the specified destination is discarded and no ICMP error notification is returned to the sender.

reject

Specifies a null route where IP traffic for the specified destination is discarded and an ICMP error notification is returned to the sender.

distance 1 - 255

Specifies the administrative distance to associate with a static route.

Default: 1; Range: 1 - 255

The example below configures two static routes for traffic delivery and identifies two other null routes for which traffic should be discarded instead of forwarded.

Example input

Configuring static routes

Switch(config)# ipv6 route 2001:db8:0:1::/64 fe80::10.1

Configures static route to a specific destination network . Notice that the next-hop gateway can be either a link-local or a global unicast address.

Switch(config)# ipv6 route 2001:db8:0:2::/64 reject

Configures a null route to drop traffic for the 2001:db8:0:2::/64 network and return an ICMP notice to the sender.

Switch(config)# ipv6 route 2001:db8:0:5::/64 blackhole

Configures a null route to drop traffic for the 2001:db8:0:2::/64 network without ICMP notice to the sender.

Switch(config)# ipv6 route 2001:db8::/48 vlan 66 distance 120

Configures a static route for traffic to destinations in the 2001:db8:0::/48 network. Sets the administrative distance higher than the default distance for any dynamic routes discovered for the same destination, which gives precedence in the routing table to dynamic routes.

Switch(config)# ipv6 route 2001:db8:0:3::/64 tunnel 3 distance 130

Configures a static route for traffic to destinations in the 2001:db8:0:3::/64 network.