The ipv6 route-static topology command configures IPv6 static routes for an IPv6 topology instance.
The undo ipv6 route-static topology command deletes the configured static routes from an IPv6 topology instance.
By default, no IPv6 static routes are configured for an IPv6 topology instance.
ipv6 route-static topology topology-name dest-ipv6-address prefix-length nexthop-ipv6-address [ recursive-lookup host-route ] [ preference preference | tag tag ] * [ no-advertise | no-install ] [ description text ]
ipv6 route-static topology topology-name dest-ipv6-address prefix-length { interface-name | interface-type interface-number } [ nexthop-ipv6-address ] [ preference preference | tag tag | cost cost-value ] * [ no-advertise | no-install ] [ description text ]
undo ipv6 route-static [ topology topology-name ] dest-ipv6-address prefix-length [ nexthop-ipv6-address | { interface-name | interface-type interface-number } [ nexthop-ipv6-address ] ]
Parameter | Description | Value |
---|---|---|
topology-name |
Specifies the name of the topology to which a static route belongs. |
The value is a string of 1 to 31 case-sensitive characters without spaces. The value must start with a letter (a to z or A to Z, case sensitive) and can contain numbers, hyphens (-), or underlines (_). When double quotation marks are used around the string, spaces are allowed in the string. |
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. |
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. |
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. |
no-advertise |
Prevents static routes from being advertised. |
- |
no-install |
Prevents the static route from being delivered to the FIB. |
- |
description text |
Specifies the description of a static route. 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::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. |
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 device to a destination, you can configure static routes.
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.
To easily view and maintain a static route, specify description to configure a description for the static route. To check the configured description, run the display this command in the system view or run the display current-configuration command.Precautions
When configuring unicast static routes, note the following rules:
<HUAWEI> system-view [~HUAWEI] ipv6 route-static 2001:db8:2::1 128 2001:db8:1::1 [~HUAWEI] undo ipv6 route-static 2001:db8:2::1 128
<HUAWEI> system-view [~HUAWEI] ipv6 topology red [*HUAWEI] ipv6 route-static topology red 2001:db8:2::1 128 2001:db8:1::1