< Home

ipv6 route-static

Function

The ipv6 route-static command configures IPv6 static routes.

The undo ipv6 route-static command deletes the configured static routes.

By default, no IPv6 static routes are configured.

Format

ipv6 route-static dest-ipv6-address prefix-length interface-type interface-number [ nexthop-ipv6-address ] [ { preference preference | tag tag } * ] [ track bfd-session bfd-name ] [ description text ]

ipv6 route-static dest-ipv6-address prefix-length nexthop-ipv6-address [ { preference preference | tag tag } * ] [ track bfd-session bfd-name ] [ description text ]

ipv6 route-static dest-ipv6-address prefix-length vpn-instance vpn-instance-name nexthop-ipv6-address [ { preference preference | tag tag } * ] [ track bfd-session bfd-name ] [ description text ]

ipv6 route-static dest-ipv6-address prefix-length vpn-instance vsys-name [ { preference preference | tag tag } * ] [ description text ]

undo ipv6 route-static dest-ipv6-address prefix-length [ interface-type interface-number ] [ nexthop-ipv6-address ] [ { preference preference | tag tag } * ] [ track bfd-session ]

undo ipv6 route-static [ track bfd-session ] all

undo ipv6 route-static dest-ipv6-address prefix-length vpn-instance vsys-name [ { preference preference | tag tag } * ]

Parameters

Parameter Description Value

dest-ipv6-address

Specifies the 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, that is, the number of consecutive 1s in the mask.

It is an integer ranging from 0 to 128 .

interface-type interface-number

Specifies the type and number of an outbound interface.

-

nexthop-ipv6-address

Specifies the IPv6 address of the next hop.

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

preference preference

Specifies the preference of an IPv6 static route.

It is an integer ranging from 1 to 255. By default, it is 60. The smaller the value is, the higher the preference is.

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 protocols can import static routes with specified tag values through routing policies.

The value is an integer ranging from 1 to 4294967295. By default, it is 0.

track bfd-session bfd-name

Specifies the BFD session bound to a static route.

The value is a string of 1 to 15 case-insensitive characters, spaces not supported.

description text

Specifies the description of a static route.

It is a string of 1 to 80 characters that can contain spaces.

vpn-instance vpn-instance-name

Specifies the name of a VPN instance.

NOTE:

If the destination VPN instance is specified as a VPN instance, the next hop must be configured. After a VPN instance with the next hop configured is switched to a virtual system, the next hop configuration is deleted.

-

vpn-instance vsys-name

Specifies the name of virtual system.

NOTE:

If the destination VPN instance is specified as a virtual system, the next hop cannot be configured.

-

all

Deletes all IPv6 unicast static routes.

-

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Applicable Environment

On a simple network, only static routes need to be configured to ensure the proper operation of the network. When the A string of 1 to 47 case-sensitive characters without any spaces. cannot run any dynamic routing protocol or cannot generate any route to the destination network, configure static routes on the A string of 1 to 47 case-sensitive characters without any spaces..
  • After configuring static routes for a specified VPN instance, you can search the routing table of the VPN instance for the outbound interface and then install the static routes into the public network routing table. To configure static routes in a VPN instance, see ipv6 route-static vpn-instance.

  • You can configure track bfd-session bfd-name to configure BFD for static routes to bind BFD sessions to static routes. BFD sessions can detect the link status, which provides the detection mechanism for static routes.

    The undo command with track bfd-session specified can only unbind the static route from the current BFD session and cannot delete the static route.

  • You can configure description text to add the description of static routes so that the administrator can check and maintain static routes easily. You can run the display this or display current-configuration command in the system view to view the description.

Precautions

When configuring unicast static routes, note the following points:

  • If no preference is set for a static route, the static route uses the default preference (60).

  • If the outbound interface of a static route is a broadcast interface, you can specify only the outbound interface and choose whether to specify the next hop of the static route. The next hop address to be specified may not be a link-local address.

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

Example

# In the public network, configure the static route with the next hop being 2001:db8:1::2 in the VPN instance named aa.

<sysname> system-view
[sysname] ipv6 route-static 2001:db8:1::1 128 vpn-instance aa 2001:db8:1::2
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >