ipv6 route-static topology

Function

The ipv6 route-static topology command configures IPv6 static routes for an IPv6 topology instance.

The undo ipv6 route-static topology command deletes the configured static routes from an IPv6 topology instance.

By default, no IPv6 static routes are configured for an IPv6 topology instance.

Format

ipv6 route-static topology topology-name dest-ipv6-address prefix-length nexthop-ipv6-address [ recursive-lookup host-route ] [ preference preference | tag tag ] * [ no-advertise | no-install ] [ description text ]

ipv6 route-static topology topology-name dest-ipv6-address prefix-length { interface-name | interface-type interface-number } [ nexthop-ipv6-address ] [ preference preference | tag tag | cost cost-value ] * [ no-advertise | no-install ] [ description text ]

undo ipv6 route-static [ topology topology-name ] dest-ipv6-address prefix-length [ nexthop-ipv6-address | { interface-name | interface-type interface-number } [ nexthop-ipv6-address ] ]

Parameters

Parameter Description Value
topology-name

Specifies the name of the topology to which a static route belongs.

The value is a string of 1 to 31 case-sensitive characters without spaces. The value must start with a letter (a to z or A to Z, case sensitive) and can contain numbers, hyphens (-), or underlines (_). 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 of 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.

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.

nexthop-ipv6-address

Specifies the next hop IPv6 address of a static route.

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

preference preference

Specifies the route priority.

The value is an integer ranging from 1 to 255. The default value is 60. The smaller the value, the higher the 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.

no-advertise

Prevents static routes from being advertised.

-

no-install

Prevents the static route from being delivered to the FIB.

-

description text

Specifies the description of a static route.

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.

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

On a simple network or when the device cannot use a dynamic routing protocol to establish a device to a destination, you can configure static routes.

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.

To easily view and maintain a static route, specify description to configure a description for the static route. To check the configured description, 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 rules:

  • If no priority is set for a static route, the static route uses the default priority (60).
  • If the destination address and mask of a static route are all 0s, the static route is a default route.
  • If the outbound interface type is not Point-to-Point (P2P), a next hop address must be specified. If the outbound interface type is P2P, you can specify an outbound interface only, without a next hop address specified.

    Running the undo ipv6 route-static topology command deletes all IPv6 routes in a specified topology. Therefore, exercise caution when running this command.

Example

# Delete IPv6 static routes on the public network.
<HUAWEI> system-view
[~HUAWEI] ipv6 route-static 2001:db8:2::1 128 2001:db8:1::1
[~HUAWEI] undo ipv6 route-static 2001:db8:2::1 128
# Configure an IPv6 static route in the topology instance red with the next hop of 2001:db8:1::1.
<HUAWEI> system-view
[~HUAWEI] ipv6 topology red
[*HUAWEI] ipv6 route-static topology red 2001:db8:2::1 128 2001:db8:1::1
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >