The ipv6 route-static vpn-instance command configures an IPv6 static route for a VPN instance.
The undo ipv6 route-static vpn-instance command deletes IPv6 static routes from a VPN instance.
By default, no IPv6 static routes are configured for VPN instances.
ipv6 route-static vpn-instance vpn-instance-name dest-ipv6-address prefix-length { [ interface-type interface-number [ nexthop-ipv6-address ] ] | nexthop-ipv6-address [ public ] | vpn-instance vpn-destination-name nexthop-ipv6-address } [ preference preference | tag tag ] * [ track bfd-session cfg-name ] [ description text ]
ipv6 route-static vpn-instance vpn-instance-name dest-ipv6-address prefix-length { public | vpn-instance vpn-destination-name } [ preference preference | tag tag ] * [ description text ] (support only by the S5720-HI, S5730-HI, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6720-HI, S6730-H, S6730S-H, S6730-S, and S6730S-S)
undo ipv6 route-static vpn-instance vpn-instance-name dest-ipv6-address prefix-length [ interface-type interface-number ] [ nexthop-ipv6-address ] [ preference preference | tag tag ] *[ track bfd-session ]
undo ipv6 route-static vpn-instance vpn-instance-name [ track bfd-session ] all
undo ipv6 route-static vpn-instance vpn-instance-name dest-ipv6-address prefix-length { public | vpn-instance vpn-destination-name } [ preference preference | tag tag ] * (support only by the S5720-HI, S5730-HI, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6720-HI, S6730-H, S6730S-H, S6730-S, and S6730S-S)
Parameter | Description | Value |
---|---|---|
vpn-instance vpn-instance-name |
Specifies the name of a VPN instance. Each VPN instance has its own unicast routing table. The configured static routes are added to the routing table of the specified VPN instance. |
The value must be an existing VPN instance name. |
dest-ipv6-address |
Specifies a 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. The length equals the number of consecutive 1s in the mask. |
The value is an integer that ranges from 0 to 128. |
interface-type |
Specifies the type of an interface. |
- |
interface-number |
Specifies the number of an 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. |
vpn-instance vpn-destination-name |
Specifies the name of the destination VPN instance. If the name of the destination VPN instance is specified, a static route searches the destination VPN instance for an outbound interface according to the configured next-hop address. If the nexthop-ipv6-address parameter is not specified, a device searches the destination VPN instance forwarding table to find a forwarding path. If vpn-instance vpn-destination-name is specified, devices can communicate with each other between VPNs. |
The value is a string of 1 to 31 case-sensitive characters with spaces. If the string is enclosed in double quotation marks (" "), the string can contain spaces. |
public |
Specifies a public network address as the next-hop address. |
- |
preference preference |
Specifies the preference of a static route. |
The value is an integer that ranges from 1 to 255. |
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, routing protocols can import static routes with specified tag values through routing policies. |
The value is an integer that ranges from 1 to 4294967295. The default value is 0. |
track bfd-session cfg-name |
Binds a static BFD session to a static route for fast fault detection. |
cfg-name is a string of 1 to 15 characters without spaces. The string can contain spaces if it is enclosed with double quotation marks ("). |
description text |
Specifies the description of a static route. |
The value is a string of 1 to 80 characters that can contain spaces. |
all |
Deletes all the IPv6 static routes configured for the specified VPN instance. |
- |
Usage Scenario
To configure VPN users to access a public network, you can perform network address translation (NAT) or run the ipv6 route-static vpn-instance command with the keyword public specified to configure a public network address as the VPN route's next-hop address.
You can specify description text to add a description for a static route so that the administrator can easily query and maintain the static route. To view the description of static routes, run the display this command in the system view or run the display current-configuration command.
Precautions
If a network fault occurs or the network topology changes, static routes cannot automatically change. Therefore, configure static routes with caution.
If the destination address and the prefix length are set to all 0s, a default route is configured.