The ipv6 route-static command configures IPv6 static routes.
The undo ipv6 route-static command deletes configured IPv6 static routes.
By default, no IPv6 static routes are configured.
ipv6 route-static dest-ipv6-address prefix-length vpn-instance vpn-instance-name nexthop-ipv6-address [ recursive-lookup host-route ] [ preference preference | tag tag ] * [ bfd enable | track { bfd-session cfg-name | nqa admin-name test-name } | permanent ] [ no-advertise | no-install ] [ inter-protocol-ecmp ] [ description text ]
ipv6 route-static dest-ipv6-address prefix-length nexthop-ipv6-address [ recursive-lookup host-route ] [ preference preference | tag tag ] * [ bfd enable | track { bfd-session cfg-name | nqa admin-name test-name } | permanent ] [ no-advertise | no-install ] [ inter-protocol-ecmp ] [ description text ]
ipv6 route-static dest-ipv6-address prefix-length { interface-name | interface-type interface-number } [ nexthop-ipv6-address ] [ preference preference | tag tag | cost cost-value ] * [ bfd enable | track { bfd-session cfg-name | nqa admin-name test-name } | permanent ] [ no-advertise | no-install ] [ inter-protocol-ecmp ] [ description text ]
ipv6 route-static dest-ipv6-address prefix-length [ vpn-instance vpn-instance-name ] nexthop-ipv6-address [ recursive-lookup host-route ] [ preference preference | tag tag ] * inherit-cost [ inter-protocol-ecmp ] [ description text ]
ipv6 route-static dest-ipv6-address prefix-length vpn-instance vpn-instance-name [ preference preference | tag tag ] * [ no-advertise | no-install ] [ description text ]
undo ipv6 route-static dest-ipv6-address prefix-length vpn-instance vpn-instance-name
undo ipv6 route-static dest-ipv6-address prefix-length vpn-instance vpn-instance-name nexthop-ipv6-address
Parameter | Description | Value |
---|---|---|
dest-ipv6-address |
Specifies a destination IPv6 address. |
The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X. |
prefix-length |
Specifies the length of an IPv6 prefix. |
It is an integer ranging from 0 to 128. |
vpn-instance vpn-instance-name |
Specifies the name of an IPv6 address family-enabled VPN instance. If the name of a VPN instance is specified, the outbound interface of a static route can be found in the routing table of the VPN instance based on the configured nexthop-ipv6-address. If the nexthop-ipv6-address parameter is not configured, that is, the Next-Table function is configured. In this case, after receiving packets, the device searches the public network forwarding table for a forwarding entry with the destination VPN instance. Then, the device searches the forwarding table of the destination VPN instance for the corresponding forwarding entry. |
The value is a string of 1 to 31 case-sensitive characters, spaces not supported. In addition, the VPN instance name must not be _public_. When double quotation marks are used around the string, spaces are allowed in the string. |
nexthop-ipv6-address |
Specifies the next hop IPv6 address of a static route. |
The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X. |
preference preference |
Specifies the route priority. |
The value is an integer ranging from 1 to 255. The default value is 60. The smaller the value, the higher the priority. |
tag tag |
Specifies the tag attribute value of a static route. To implement different route management policies, you can configure different tag attribute values to classify static routes. For example, other protocols can import the static routes with specified tag attribute values based on a routing policy. |
The value is an integer ranging from 1 to 4294967295. The default value is 0. |
bfd |
Associates a dynamic BFD session with the static route to fast detect faults. |
- |
enable |
Associates a dynamic BFD session with the static route to fast detect faults. |
- |
track |
Specify a track object. |
- |
bfd-session cfg-name |
Associates a static BFD session with the static route to fast detect faults. The undo ip route-static [ track bfd-session ] all command with track bfd-session cfg-name specified dissociates the static route from the current BFD session only without deleting the static route. |
The value is a string of 1 to 64 case-sensitive characters, spaces not supported. |
nqa admin-name |
Associates the static route with an NQA test instance to fast detect faults so that the system determines whether to activate the static route based on the NQA link detection result to control route advertisement and guide remote traffic. Currently, only ICMP NQA test instances and TCP NQA test instances can be bound to static routes to implement fast fault detection. |
The value is a string of 1 to 32 case-sensitive characters. |
test-name |
Associates the static route with an NQA test instance to fast detect faults so that the system determines whether to activate the static route based on the NQA link detection result to control route advertisement and guide remote traffic. Currently, only ICMP NQA test instances and TCP NQA test instances can be bound to static routes to implement fast fault detection. |
The value is a string of 1 to 32 case-sensitive characters. |
inter-protocol-ecmp |
If a static route is the optimal or suboptimal route and the optimal and suboptimal routes share the same priority, the static route and the routes of dynamic routing protocols can participate in inter-protocol load balancing. If inter-protocol load balancing among static routes and the routes of dynamic routing protocols is enabled for any static route in the routing table, the other static routes in the routing table that have the same prefix as that of this static route can also participate in inter-protocol load balancing with the routes of dynamic routing protocols. Intra-protocol and inter-process load balancing and inter-protocol load balancing are mutually exclusive. If you configure them both, the former takes effect. Inter-protocol load balancing does not take effect in the following cases:
|
- |
description text |
Specifies the description of a static route. To check the configured description, run the display this or display current-configuration command in the system view. The description parameter cannot be followed by other parameters, such as bfd and preference. Otherwise, the configuration will be used only as the description. For example, if ipv6 route-static 2001:db8::1 128 NULL0 description aa preference 10 is run, aa preference 10 is used as the description. |
The value is a string of 1 to 150 characters, spaces supported. |
permanent |
Configures permanent advertisement of the static route. If service traffic needs to be forwarded along a specified path, regardless of the link status, you can specify permanent to configure permanent advertisement of static routes. |
- |
no-advertise |
Prevents the static route from being advertised. In network maintenance scenarios, static routes are required to verify services. If you do not want these static routes to be imported by other protocols, specify no-advertise to prevent these static routes from being advertised. no-advertise takes effect only when it is configured for all the active static routes with the same destination address and mask. |
- |
no-install |
Prevents the static route from being delivered to the FIB. If multiple static routes with the same prefix and mask length are configured using the command repeatedly, all the static routes can be delivered to the FIB as long as no-install is not specified in the command when configuring one of the static routes. The no-install and no-advertise parameters are mutually exclusive. |
- |
interface-type |
Specifies the type of an interface. |
- |
interface-number |
Specifies the number of an interface. |
The value is a string of 1 to 63 case-sensitive characters, spaces not supported. |
cost cost-value |
Specifies a cost value for a static route. |
The value is an integer ranging from 1 to 4294967295. The default value is 0. |
inherit-cost |
Enables a static route to inherit the cost of recursive routes. |
- |
recursive-lookup |
Recursive route lookup policy. |
- |
host-route |
Recurses the static route to a 128-bit host route. |
- |
Usage Scenario
On a simple network or when the device cannot use a dynamic routing protocol to establish a route to a destination, you can configure static routes.
If you specify a VPN instance for a static route, a device searches the routing table of the VPN instance for an outbound interface of the static route and adds the static route to the public routing table. To configure a static route in a VPN instance, run the ipv6 route-static vpn-instance command.Prerequisites
BFD has been enabled so that static routes can be associated with the BFD session.
An NQA test instance has been created so that static routes can be associated with the NQA test instance.Precautions
When configuring unicast static routes, note the following rules: