ipv6 route-static
Function
The ipv6 route-static command configures IPv6 static routes.
The undo ipv6 route-static command deletes configured static routes.
By default, no IPv6 static route is configured.
Format
ipv6 route-static dest-ipv6-address prefix-length { interface-type interface-number [ nexthop-ipv6-address ] | nexthop-ipv6-address } [ preference preference | tag tag ] * [ description text ]
ipv6 route-static dest-ipv6-address prefix-length nexthop-ipv6-address [ { preference preference | tag tag } * ] [ description text ]
undo ipv6 route-static dest-ipv6-address prefix-length [ interface-type interface-number [ nexthop-ipv6-address ] | nexthop-ipv6-address ] [ preference preference | tag tag ] *
undo ipv6 route-static all
Parameters
Parameter | Description | Value |
---|---|---|
dest-ipv6-address | Specifies the destination IPv6 address. | The value is a 32-bit hexadecimal number, in X:X:X:X:X:X:X:X format. |
prefix-length | Specifies the length of an IPv6 prefix, namely, the number of consecutive 1s in the mask. | The value is an integer that ranges from 0 to 128. |
interface-type interface-number | Specifies the type and number of an outbound interface. | - |
nexthop-ipv6-address | Specifies the next-hop IPv6 address | The value is a 32-bit hexadecimal number, in X:X:X:X:X:X:X:X format. |
preference preference | Specifies the preference of an IPv6 static route. | The value is an integer that ranges from 1 to 255. The default value is 60. |
tag tag | Specifies the tag value of a static route. By configuring different tag values, you can classify static routes to implement different routing policies. For example, other routing protocols can import static routes with specified tag values through routing policies. | The value is an integer that ranges from 1 to 4294967295. |
description text | Specifies the description of a static route. | The value is a string of 1 to 35 characters that can contain spaces. |
all | Deletes all IPv6 static routes. | - |
Usage Guidelines
Usage Scenario
On a simple network, you only need to configure static routes to ensure that the network runs properly. When the router cannot use dynamic routing protocols or establish a route to the destination network, configure static routes on the router.
You can configure description text to add the description of static routes so that the administrator can query and maintain static routes easily. To view the description of static routes, 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:
If no preference is set for a static route, the static route uses the default preference 60.
If the destination address and mask of a static route are all 0s, the static route is a default route.