No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

Command Reference

S1720, S2700, S5700, and S6720 V200R011C10

This document describes all the configuration commands of the device, including the command function, syntax, parameters, views, default level, usage guidelines, examples, and related commands.
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Static Route Configuration Commands

Static Route Configuration Commands

Command Support

For details about command support, see the description of each command. If no command support information is provided, all switch models support the command by default.

ip route recursive-lookup bgp-vpnv4-route

Function

The ip route recursive-lookup bgp-vpnv4-route enable command enables a static route to be iterated to a cross route on the remote VPN.

The ip route recursive-lookup bgp-vpnv4-route disable command disables a static route from being iterated to a cross route on the remote VPN.

The undo ip route recursive-lookup bgp-vpnv4-route disable command enables a static route to be iterated to a cross route on the remote VPN.

By default, a static route can be iterated to a cross route on the remote VPN.

NOTE:

Only the S5720EI, S5720HI, S6720S-EI and S6720EI support this command.

Format

ip route recursive-lookup bgp-vpnv4-route { enable | disable }

undo ip route recursive-lookup bgp-vpnv4-route disable

Parameters

Parameter Description Value
enable Enables a static route to be iterated to a cross route on the remote VPN. -
disable Disables a static route from being iterated to a cross route on the remote VPN. -

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

A static route needs to be iterated if its next hop is not directly reachable. You can run the ip route recursive-lookup bgp-vpnv4-route enable command to enable the static route to be iterated to a cross route on the remote VPN. The static route can then inherit the Label and Token information about the cross route. The device can forward data through the tunnel to which the static route is iterated.

Precautions

The ip route recursive-lookup bgp-vpnv4-route enable command and the undo ip route recursive-lookup bgp-vpnv4-route disable command have the same function and do not generate configurations in the configuration file.

This command allows IPv4 static routes to be iterated to VPN remote cross routes, not applicable to IPv6 static routes.

Example

# Enable a static route to be iterated to a cross route on the remote VPN.

<HUAWEI> system-view
[HUAWEI] ip route recursive-lookup bgp-vpnv4-route enable

# Disable a static route from being iterated to a cross route on the remote VPN.

<HUAWEI> system-view
[HUAWEI] ip route recursive-lookup bgp-vpnv4-route disable

# Enable a static route to be iterated to a cross route on the remote VPN.

<HUAWEI> system-view
[HUAWEI] undo ip route recursive-lookup bgp-vpnv4-route disable

ip route recursive-lookup blackhole protocol static

Function

The ip route recursive-lookup blackhole protocol static disable command prevents static routes from being iterated to blackhole routes.

The ip route recursive-lookup blackhole protocol static enable command allows static routes to be iterated to blackhole routes.

The undo ip route recursive-lookup blackhole protocol static disable command allows static routes to be iterated to blackhole routes.

By default, static routes can be iterated to blackhole routes.

Format

ip route recursive-lookup blackhole protocol static { disable | enable }

undo ip route recursive-lookup blackhole protocol static disable

Parameters

Parameter Description Value
disable Prevents static routes from being iterated to blackhole routes. -
enable Allows static routes to be iterated to blackhole routes. -

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

If IGP, static, and blackhole routes exist on a network and a link fault occurs, services may be interrupted because static routes may be iterated to blackhole routes and remain active. To ensure uninterrupted services, run the ip route recursive-lookup blackhole protocol static disable command. This command will prevent static routes from being iterated to blackhole routes so that static routes will become inactive and IGP routes will be selected.

Precautions

The ip route recursive-lookup blackhole protocol static enable and undo ip route recursive-lookup blackhole protocol static disable commands have the same function. You only need to run one of them.

Example

# Prevent static routes from being iterated to blackhole routes.

<HUAWEI> system-view
[HUAWEI] ip route recursive-lookup blackhole protocol static disable

# Allow static routes to be iterated to blackhole routes.

<HUAWEI> system-view
[HUAWEI] ip route recursive-lookup blackhole protocol static enable

# Allow static routes to be iterated to blackhole routes.

<HUAWEI> system-view
[HUAWEI] undo ip route recursive-lookup blackhole protocol static disable

ip route-static

Function

The ip route-static command configures a unicast static route.

The undo ip route-static command deletes a unicast static route.

By default, no IPv4 unicast static routes are configured.

Format

ip route-static ip-address { mask | mask-length } { nexthop-address | interface-type interface-number [ nexthop-address ] | vpn-instance vpn-instance-name nexthop-address } [ preference preference | tag tag ] * [ track { bfd-session cfg-name | efm-state interface-type interface-number | nqa admin-name test-name } | permanent ] [ description text ]

undo ip route-static ip-address { mask | mask-length } [ nexthop-address | interface-type interface-number [ nexthop-address ] ] [ preference preference | tag tag ] * [ track { bfd-session | efm-state } | permanent ]

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

Parameters

Parameter Description Value
ip-address Specifies a destination IP address. The value is in dotted decimal notation.
mask Specifies a subnet mask. The value is in dotted decimal notation.
mask-length Specifies the mask length. The mask length equals the number of consecutive 1s in a 32-bit mask. The mask in dotted decimal notation can be replaced by the mask length. The value is an integer that ranges from 0 to 32.
nexthop-address Specifies the next-hop address. The value is in dotted decimal notation.
interface-type interface-number Specifies the type and number of the interface that forwards packets. -
vpn-instance vpn-instance-name Specifies the name of a VPN instance. If the VPN instance name is specified, a static route searches the routing table of the VPN instance for an outbound interface according to nexthop-address. The value must be an existing VPN instance name.
preference preference Specifies the preference of a static route. A smaller value indicates a higher preference. The value is an integer that ranges from 1 to 255. The default value is 60.
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 (").
track efm-state interface-type interface-number Detects the EFM OAM state of a specified interface. -
track nqa admin-name test-name Specifies the administrator name of an NQA test instance bound to a static route, and the name of the test instance. The values of admin-name and test-name are both a string of 1 to 32 case-sensitive characters without spaces.
permanent

Configures permanent advertisement of static routes.

-
description text Configures a description for a static route. The value is a string of 1 to 80 characters that can contain spaces.
all Deletes all IPv4 unicast static routes. -
NOTE:

Only the S6720EI, S6720S-EI, S5720HI, S5720EI, S6720SI, S6720S-SI, S5730SI, S5730S-EI, S5720SI, and S5720S-SI support track bfd-session cfg-name parameters.

Only the S6720EI, S6720S-EI, S5720HI, S5720EI, S6720SI, S6720S-SI, S5730SI, S5730S-EI, S5720SI, S5720S-SI, S6720LI, S6720S-LI, S5720LI, S5720S-LI, S2720EI, S1720X-E, S1720GW-E, S1720GWR-E, S1720GW, S1720GWR, S1720X support vpn-instance vpn-instance-name parameters.

S1720GFR does not support track efm-state interface-type interface-number parameters.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

On a simple network, you can configure static routes to ensure network connectivity. If a device cannot use dynamic routing protocols for network connectivity, static routes can also be configured on the device.

Precautions

When configuring unicast static routes, note the following:

  • Only public routes can be used for tunnel iteration.

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

  • When both the destination IP address and the mask are set to 0.0.0.0, a default route is configured. If the switch cannot find a route in the routing table to forward packets, the switch uses the default route to forward packets.

  • By setting different preferences, you can implement different routing management policies. For example, if multiple routes to the same destination are configured with the same preference, load balancing can be implemented. If multiple routes to the same destination are configured with different preferences, route backup can be implemented.

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

  • When configuring static routes, you can specify outbound interfaces or next-hop addresses based on the outbound interface type. For example, you can specify only outbound interfaces for static routes on P2P interfaces and specify only next hops for static routes on NBMA interfaces, and you must specify next hops for static routes on broadcast interfaces.

  • In some cases, for example, the link layer protocol is PPP and the peer IP address is unknown, you can also specify outbound interfaces when configuring a switch. In this manner, you do not need to modify the switch configuration when the peer IP address changes.

Example

# Set a static route with the destination address and mask are both 0.0.0.0 and the next-hop address 172.16.0.1.

<HUAWEI> system-view
[HUAWEI] ip route-static 0.0.0.0 0.0.0.0 172.16.0.1

ip route-static default-preference

Function

The ip route-static default-preference command sets a default preference for an IPv4 static route.

The undo ip route-static default-preference command restores the default preference of IPv4 static routes.

By default, the default preference of IPv4 static routes is 60.

Format

ip route-static default-preference preference

undo ip route-static default-preference

Parameters

Parameter Description Value
preference Specifies a default preference for IPv4 static routes. A smaller value indicates a higher preference. The value is an integer that ranges from 1 to 255.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Applicable Environment

You can change the status of a route by changing the preference of the route. You can use the ip route-static default-preference command to change the default preference of all the new IPv4 static routes.

Configuration Impact

After the ip route-static default-preference command is used, all the new IPv4 static routes that use the default preference are restored to a new default preference.

Precautions

After a default preference is specified, the new default preference is valid for subsequent rather than existing IPv4 static routes.

Example

# Set the default preference of IPv4 static routes to 70.

<HUAWEI> system-view
[HUAWEI] ip route-static default-preference 70

ip route-static track bfd-session admindown invalid

Function

The ip route-static track bfd-session admindown invalid command disables a switch from selecting a static route if the BFD session associated with the route is in the AdminDown state.

The undo ip route-static track bfd-session admindown invalid command restores the default configuration.

By default, a static route can participate in route selection even if its bound BFD session is in the AdminDown state.

Product

Support

S6720EI, S6720S-EI, S5720HI, S5720EI, S6720SI, S6720S-SI, S5730SI, S5730S-EI, S5720SI, S5720S-SI

Supported

S6720LI, S6720S-LI, S5720LI, S5720S-LI, S5710-X-LI, S5700LI, S5700S-LI, S2750EI, S2720EI, S1720GFR, S1720GW-E, S1720GWR-E, S1720X-E, S1720GW, S1720GWR, S1720X

Not supported

Format

ip route-static track bfd-session session-name bfd-name admindown invalid

undo ip route-static track bfd-session session-name bfd-name admindown invalid

undo ip route-static track bfd-session admindown invalid

Parameters

Parameter Description Value
session-name bfd-name

Specifies a BFD session bound to a static route.

The value is a string of 1 to 15 case-insensitive characters without spaces. If the string is enclosed within double quotation marks ("), the string can contain spaces.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

By default, if a BFD session associated with a static route is in the AdminDown state, the route can participate in route selection on Huawei switches, but is not allowed for route selection on some non-Huawei devices. As a result, Huawei switches cannot communicate with such non-Huawei devices.

To address this problem, run the ip route-static track bfd-session admindown invalid command to configure the device not to select the static route if its bound BFD session is in the AdminDown state.

Prerequisites

The BFD session specified by bfd-name has been created.

Example

# Disable a switch from selecting a static route if the BFD session associated with the route is in AdminDown state.

<HUAWEI> system-view
[HUAWEI] bfd
[HUAWEI-bfd] quit
[HUAWEI] bfd bfda bind peer-ip 1.1.1.1
[HUAWEI-bfd-session-bfda] discriminator local 20
[HUAWEI-bfd-session-bfda] discriminator remote 10
[HUAWEI-bfd-session-bfda] commit
[HUAWEI-bfd-session-bfda] quit
[HUAWEI] ip route-static track bfd-session session-name bfda admindown invalid

ip route-static vpn-instance

Function

The ip route-static vpn-instance command configures a static route for a VPN instance.

The undo ip route-static vpn-instance command deletes static routes from a VPN instance.

By default, no static route is configured for a VPN instance.

Product

Support

S6720EI, S6720S-EI, S5720HI, S5720EI, S6720SI, S6720S-SI, S5730SI, S5730S-EI, S5720SI, S5720S-SI, S6720LI, S6720S-LI, S5720LI, S5720S-LI, S2720EI, S1720X-E, S1720GW-E, S1720GWR-E, S1720GW, S1720GWR, S1720X

Supported

S5710-X-LI, S5700LI, S5700S-LI, S2750EI, S1720GFR

Not supported

Format

ip route-static vpn-instance vpn-source-name destination-address { mask | mask-length } { nexthop-address [ public ] | interface-type interface-number [ nexthop-address ] | vpn-instance vpn-destination-name nexthop-address } [ preference preference | tag tag ] * [ track { bfd-session cfg-name | efm-state interface-type interface-number | nqa admin-name test-name } | permanent ] [ description text ]

undo ip route-static vpn-instance vpn-source-name destination-address { mask | mask-length } [ nexthop-address | interface-type interface-number [ nexthop-address ] ] [ preference preference | tag tag ] * [ track { bfd-session | efm-state } | permanent ]

undo ip route-static vpn-instance vpn-source-name all

Parameters

Parameter Description Value
vpn-instance vpn-source-name Specifies the name of the 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 must be an existing VPN instance name.
destination-address Specifies the destination IP address of a static route. The value is in dotted decimal notation.
mask Specifies the subnet mask of the destination IP address. The value is in dotted decimal notation.
mask-length Specifies the mask length of the destination IP address. The value is an integer that ranges from 0 to 32.
interface-type interface-number Specifies the type and number of the outbound interface of a static route. -
nexthop-address Specifies the next-hop address of a static route. If the outbound interface of a static route is a broadcast interface, the next-hop address must be specified for the static route. The value is in dotted decimal notation.
public Specifies the next-hop address as a public network address but not an address in the source VPN instance. -
preference preference Specifies the preference of a static route. The value is an integer that ranges from 1 to 255. If this parameter is not specified, the default preference of a static route is 60.
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.
track efm-state interface-type interface-number Detects the EFM OAM state of a specified interface. -
track nqa admin-name test-name Specifies the administrator name of an NQA test instance bound to a static route, and the name of the test instance. The values of admin-name and test-name are both a string of 1 to 32 case-sensitive characters without spaces.
permanent

Configures permanent advertisement of static routes.

-
description text Specifies the description of a static route. You can specify description to add a description for static routes, facilitating static route query and maintenance. The value is a string of 1 to 80 characters that can contain spaces.
vpn-instance vpn-destination-name Specifies the name of the VPN instance to which the local device belongs. The system searches the routing table of the VPN instance for the outbound interface of a static route according to the configured next-hop address. The value is a string of 1 to 31 case-sensitive characters without spaces.
all Deletes all static routes from a VPN instance. -

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

You need to configure static routes for a VPN instance on a PE in the following scenarios:
  • The PE connects to a CE.
  • The specified VPN connects to the Internet.

Follow-up Procedure

After a static route is configured, import the static route to BGP running between PEs if the static route needs to be sent to the peer PE.

Precautions

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

If the outbound interface of a static route is a broadcast interface, you must specify the next-hop address for the static route.

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.

Example

# Configure a static route for VPN instance named vpn1, and set the destination address of the static route to 10.1.1.0/24 and next-hop address to 192.168.1.2 (IP address of VPN instance vpn2).

<HUAWEI> system-view
[HUAWEI] ip vpn-instance vpn1
[HUAWEI-vpn-instance-vpn1] route-distinguisher 100:200
[HUAWEI-vpn-instance-vpn1-af-ipv4] quit
[HUAWEI-vpn-instance-vpn1] quit
[HUAWEI] ip vpn-instance vpn2
[HUAWEI-vpn-instance-vpn2] route-distinguisher 300:400
[HUAWEI-vpn-instance-vpn2-af-ipv4] quit
[HUAWEI-vpn-instance-vpn2] quit
[HUAWEI] ip route-static vpn-instance vpn1 10.1.1.0 24 vpn-instance vpn2 192.168.1.2

ipv6 route-static

Function

The ipv6 route-static command configures an IPv6 static route.

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

By default, no IPv6 static route is configured.

Format

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

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

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

Parameters

Parameter Description Value
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 value is an integer that ranges from 0 to 128.
interface-type interface-number Specifies the type and number of an outbound interface. -
vpn-instance vpn-destination-name Specifies the name of a VPN instance. If the VPN instance name is specified, a switch searches the routing table of the VPN instance for the outbound interface of a static route according to the configured next-hop address. The value must be an existing VPN instance name.
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.
preference preference Specifies the preference of an IPv6 static route. The value is an integer that ranges from 1 to 255. The default value is 60.
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 IPv6 static routes. -
NOTE:

Only the S6720EI, S6720S-EI, S5720HI, S5720EI, S6720SI, S6720S-SI, S5730SI, S5730S-EI, S5720SI, and S5720S-SI support track bfd-session cfg-name parameters.

Only the S6720EI, S6720S-EI, S5720HI, S5720EI, S6720SI, S6720S-SI, S5730SI, S5730S-EI, S5720SI, S5720S-SI, S6720LI, S6720S-LI, S5720LI, S5720S-LI, S2720EI, S1720X-E, S1720GW-E, S1720GWR-E, S1720GW, S1720GWR, S1720X support vpn-instance vpn-instance-name parameters.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

On a simple network, you can configure static routes to ensure network connectivity. If a device cannot use dynamic routing protocols for network connectivity, static routes can also be configured on the device.

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

When configuring unicast static routes, note the following:

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

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

Example

# Configure an IPv6 static route on a public network.

<HUAWEI> system-view
[HUAWEI] ipv6 route-static fc00:0:0:2001::1 128 fc00:0:0:2002::2

ipv6 route-static default-preference

Function

The ipv6 route-static default-preference command sets a default preference for an IPv6 static route.

The undo ipv6 route-static default-preference command restores the default preference of IPv6 static routes.

By default, the default preference of IPv6 static routes is 60.

Format

ipv6 route-static default-preference preference

undo ipv6 route-static default-preference

Parameters

Parameter Description Value
preference Specifies the default preference of IPv6 static routes. A smaller value indicates a higher preference. The value is an integer that ranges from 1 to 255.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

You can change the activation status of routes by changing their preference. To change the default preference of a new IPv6 static route, run the ipv6 route-static default-preference command.

Configuration Impact

After the ipv6 route-static default-preference command is used, the default preference of all the new IPv6 static routes is changed.

The new default preference is valid only for new IPv6 static routes but not for existing IPv6 static routes.

Example

# Set the default preference of IPv6 static routes to 70.

<HUAWEI> system-view
[HUAWEI] ipv6 route-static default-preference 70

ipv6 route-static track bfd-session admindown invalid

Function

The ipv6 route-static track bfd-session admindown invalid command disables a switch from selecting an IPv6 static route if the BFD session associated with the route is in the AdminDown state.

The undo ipv6 route-static track bfd-session admindown invalid command restores the default configuration.

By default, an IPv6 static route can participate in route selection even if the BFD session associated with it is in the AdminDown state.

Product

Support

S6720EI, S6720S-EI, S5720HI, S5720EI, S6720SI, S6720S-SI, S5730SI, S5730S-EI, S5720SI, S5720S-SI

Supported

S6720LI, S6720S-LI, S5720LI, S5720S-LI, S5710-X-LI, S5700LI, S5700S-LI, S2750EI, S2720EI, S1720GFR, S1720GW-E, S1720GWR-E, S1720X-E, S1720GW, S1720GWR, S1720X

Not supported

Format

ipv6 route-static track bfd-session session-name bfd-name admindown invalid

undo ipv6 route-static track bfd-session [ session-name bfd-name ] admindown invalid

Parameters

Parameter Description Value
session-name bfd-name

Specifies a BFD session bound to an IPv6 static route.

The value is a string of 1 to 15 case-insensitive characters without spaces. The string can contain spaces if it is enclosed with double quotation marks (").

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

By default, if a BFD session associated with an IPv6 static route is in the AdminDown state, the route can participate in route selection on Huawei switches, but is not allowed for route selection on some non-Huawei devices. As a result, Huawei switches cannot communicate with such non-Huawei devices.

To address this problem, run the ipv6 route-static track bfd-session admindown invalid command to configure the switch not to select the IPv6 static route if the BFD session associated with it is in the AdminDown state.

Prerequisites

The BFD session specified by bfd-name has been created.

Precautions

The undo ipv6 route-static track bfd-session admindown invalid command enables all IPv6 static routes to participate in route selection even if the BFD sessions associated with them are in the AdminDown state.

Example

# Disable a switch from selecting an IPv6 static route if the BFD session associated with the route is in the AdminDown state.

<HUAWEI> system-view
[HUAWEI] bfd
[HUAWEI-bfd] quit
[HUAWEI] bfd bfda bind peer-ipv6 2001:db8:1::1
[HUAWEI-bfd-session-bfda] discriminator local 20
[HUAWEI-bfd-session-bfda] discriminator remote 10
[HUAWEI-bfd-session-bfda] commit
[HUAWEI-bfd-session-bfda] quit
[HUAWEI] ipv6 route-static track bfd-session session-name bfda admindown invalid

ipv6 route-static vpn-instance

Function

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.

Product

Support

S6720EI, S6720S-EI, S5720HI, S5720EI, S6720SI, S6720S-SI, S5730SI, S5730S-EI, S5720SI, S5720S-SI, S6720LI, S6720S-LI, S5720LI, S5720S-LI, S2720EI, S1720X-E, S1720GW-E, S1720GWR-E, S1720GW, S1720GWR, S1720X

Supported

S5710-X-LI, S5700LI, S5700S-LI, S2750EI, S1720GFR

Not supported

Format

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 ]

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

Parameters

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. The value must be an existing VPN instance name.
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. -

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

On a simple IPv6 VPN network, you can run the ipv6 route-static vpn-instance command to configure static routes for this VPN.
  • 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.

Example

# Configure a default route with next-hop address FC00:0:0:2001::1.

<HUAWEI> system-view
[HUAWEI] ipv6 route-static vpn-instance vpn1 :: 0 fc00:0:0:2001::1
Related Topics
Translation
Download
Updated: 2019-04-18

Document ID: EDOC1000178165

Views: 42851

Downloads: 1107

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next