Configuring an IPv6 static route

Before you configure an IPv6 static route, complete the following tasks:

To configure an IPv6 static route:

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Configure an IPv6 static route.

  • Method 1:ipv6 route-static ipv6-address prefix-length { interface-type interface-number [ next-hop-address ] | next-hop-address | vpn-instance d-vpn-instance-name next-hop-address } [ permanent ] [ preference preference-value ] [ tag tag-value ] [ description description-text ]

  • Method 2:ipv6 route-static vpn-instance s-vpn-instance-name ipv6-address prefix-length { interface-type interface-number [ next-hop-address ] | next-hop-address [ public ] | vpn-instance d-vpn-instance-name next-hop-address } [ permanent ] [ preference preference-value ] [ tag tag-value ] [ description description-text ]

By default, no IPv6 static route is configured.

3. (Optional.) Configure the default preference for IPv6 static routes.

ipv6 route-static default-preference default-preference-value

The default setting is 60.

4. (Optional.) Delete all IPv6 static routes, including the default route.

delete ipv6 [ vpn-instance vpn-instance-name ] static-routes all

The undo ipv6 route-static command deletes one IPv6 static route.