ipv6 route-static vpn-instance

Function

The ipv6 route-static vpn-instance command configures IPv6 static routes for an IPv6 address family-enabled VPN instance.

The undo ipv6 route-static vpn-instance command deletes the IPv6 static routes configured for an IPv6 address family-enabled VPN instance.

By default, no IPv6 static routes are configured for an IPv6 address family-enabled VPN instance.

Format

ipv6 route-static vpn-instance vpn-source-name dest-ipv6-address prefix-length { vpn-instance vpn-destination-name nexthop-ipv6-address | nexthop-ipv6-address [ public ] } [ 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 vpn-instance vpn-source-name 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 vpn-instance vpn-source-name dest-ipv6-address prefix-length { vpn-instance vpn-destination-name nexthop-ipv6-address | nexthop-ipv6-address [ public ] } [ recursive-lookup host-route ] [ preference preference | tag tag ] * [ inherit-cost | permanent ] [ inter-protocol-ecmp ] [ description text ]

ipv6 route-static vpn-instance vpn-source-name dest-ipv6-address prefix-length { vpn-instance vpn-destination-name | public } [ preference preference | tag tag ] * [ no-advertise | no-install ] [ description text ]

undo ipv6 route-static vpn-instance vpn-source-name dest-ipv6-address prefix-length [ { interface-name | interface-type interface-number } [ nexthop-ipv6-address ] | vpn-instance vpn-destination-name nexthop-ipv6-address | nexthop-ipv6-address [ public ] ]

undo ipv6 route-static vpn-instance vpn-source-name dest-ipv6-address prefix-length { vpn-instance vpn-destination-name | public }

Parameters

Parameter Description Value
vpn-source-name

Specifies the name of a source VPN instance. Each VPN instance has its own routing table. The configured static routes are added to the routing table of the specified VPN instance.

The value is a string of 1 to 31 case-sensitive characters, spaces not supported. The VPN instance name cannot be _public_. 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 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-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 based on the configured next hop 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 forwarding table of the source VPN instance 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 the device.

The value is a 32-digit hexadecimal number, in the format X:X:X:X:X:X:X:X.

public

Indicates the public network address of a gateway. After a certain Device is configured in an IPv6 address family-enabled VPN instance, the next hop or the next hop gateway of the Device belongs to this IPv6 address family-enabled VPN instance and the public network. If the keyword public is specified in the command, the next hop is specified as a public network device.

-

preference preference

Specifies the priority of a route.

The value is an integer ranging from 1 to 255. The default value is 60. A smaller value indicates a higher 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:

  • Among routes imported using the import-rib command and other routes.
  • Among black-hole routes and non-black-hole routes.
  • Among Vlink routes and non-Vlink routes.

-

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::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 static routes 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.

-

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.

dhcp

Sets the IP address of a DHCP gateway as the next hop of the static route.

-

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.

-

Views

System view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
route-base write

Usage Guidelines

Usage Scenario

To configure static routes for a simple IPv6 VPN, run the ipv6 route-static vpn-instance command.

If the destination address and mask of a static route are all 0s, the static route is a default route.

Prerequisites

A VPN instance has been created using the ip vpn-instance command.

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.

Configuration Impact

A static route can be bound to only one BFD session. To bind a static route to another session, you need to unbind the static route from the current BFD session first.

Follow-up Procedure

If a configured static route needs to be sent to the peer PE, import the static route into BGP running between the PEs.

Precautions

If a fault occurs on the network or the topology changes, static routes cannot automatically change. Therefore, exercise caution when configuring static routes.

During the configuration of a static route for a VPN instance, nexthop-address can belong to a VPN instance or a public network. When the next hop address of the static route is a public network address, you need to specify public following nexthop-address.

If the outbound interface is a broadcast interface, you need to specify the next hop address.

Suppose two static routes with the same destination IP address are both configured. One of the route has a next-hop IP address or outbound interface specified, and the Next-Table function is configured for the other static route, that is, only a VPN instance is specified for the route's next hop (with no outbound interface or next-hop IP address specified). In this case, if the two static routes have the same priority, the latter configured static route overwrites the previous one.

For static routes with the same prefix but different priorities, the following routes can be configured together:

  • Static route with a specified next-hop IP address and static route with only a VPN instance specified for the route's next hop.
  • Static route with a specified outbound interface and static route with only a VPN instance specified for the route's next hop.
  • Multiple static routes with only VPN instances specified for their next hops.

    After the static route configuration is saved and the device is restarted in CFG mode, the configuration sequence in the configuration file may be different from that before the restart.

Example

# Configure a default route with next hop 2001:db8:1::1.
<HUAWEI> system-view
[~HUAWEI] ip vpn-instance vpn1
[*HUAWEI-vpn-instance-vpn1] ipv6-family
[*HUAWEI-vpn-instance-vpn1-af-ipv6] quit
[*HUAWEI] ipv6 route-static vpn-instance vpn1 :: 0 2001:db8:1::1
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >