The ip route-static vpn-instance command configures static routes for a VPN instance.
The undo ip route-static vpn-instance command deletes static routes for a VPN instance.
By default, the system does not configure static routes for a VPN instance.
ip route-static vpn-instance vpn-source-name destination-address { mask | mask-length } interface-type interface-number [ nexthop-address ] [ preference preference | tag tag ] * [ track { bfd-session cfg-name | ip-link link-name } | permanent | ldp-sync ] [ description text ]
ip route-static vpn-instance vpn-source-name destination-address { mask | mask-length } vpn-instance vpn-destination-name nexthop-address [ preference preference | tag tag ] * [ track { bfd-session cfg-name | ip-link link-name | nqa admin-name test-name } | permanent | inherit-cost ] [ description text ]
ip route-static vpn-instance vpn-source-name destination-address { mask | mask-length } nexthop-address [ public ] [ preference preference | tag tag ] * [ track { bfd-session cfg-name | ip-link link-name | nqa admin-name test-name } | permanent | inherit-cost ] [ description text ]
ip route-static vpn-instance vpn-source-name destination-address { mask | mask-length } vpn-instance vpn-destination-name nexthop-address [ recursive-lookup host-route ] [ preference preference | tag tag ] * [ permanent | inherit-cost ] [ description text ]
ip route-static vpn-instance vpn-source-name destination-address { mask | mask-length } nexthop-address [ public ] [ recursive-lookup host-route ] [ preference preference | tag tag ] * [ permanent | inherit-cost ] [ description text ]
ip route-static vpn-instance vpn-source-name destination-address { mask | mask-length } [ preference preference | tag tag ] * [ track bfd-session cfg-name ] [ description text ]
ip route-static vpn-instance vpn-source-name destination-address { mask | mask-length } nexthop-address [ public ] [ preference preference | tag tag ] * [ track bfd-session cfg-name ] [ description text ]
ip route-static vpn-instance vpn-source-name destination-address { mask | mask-length } interface-type interface-number nexthop-address [ preference preference | tag tag ] * [ track bfd-session cfg-name ] [ description text ]
undo ip route-static vpn-instance vpn-source-name destination-address { mask | mask-length } interface-type interface-number [ nexthop-address ] [ preference preference | tag tag ] * [ track { bfd-session | ip-link } | permanent | ldp-sync ]
undo ip route-static vpn-instance vpn-source-name destination-address { mask | mask-length } [ preference preference | tag tag ] * [ track bfd-session ]
undo ip route-static vpn-instance vpn-source-name destination-address { mask | mask-length } [ interface-type interface-number ] [ nexthop-address ] [ preference preference | tag tag ] * [ track { bfd-session | ip-link } | inherit-cost | permanent ]
undo ip route-static vpn-instance vpn-source-name all
| Parameter | Description | Value |
|---|---|---|
| vpn-instance 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 must be the name of an existing VPN instance. The value is a string of 1 to 31. |
| destination-address | Specifies the destination IP address of a static route. | Expressed in dotted decimal notation. |
| mask | Specifies the subnet mask. | Expressed in dotted decimal notation. |
| mask-length | Specifies the mask length. | An integer ranging from 0 to 32. |
| interface-type interface-number | Specifies the type and number of an outbound interface of a static route. | - |
| 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 nexthop-address. If vpn-instance vpn-destination-name is specified, devices can communicate with each other between VPNs. | The value must be the name of an existing VPN instance. |
| nexthop-address | Specifies the next hop address of a static route. If vpn-instance is directed to vsys, this parameter cannot be set. |
Expressed in dotted decimal notation. |
| public | Indicates that the specified nexthop-address is a public network address rather than a source VPN instance address.
|
- |
| preference preference | Specifies the preference of static routes. | 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, routing protocols can import routes with specified tag values through routing policies. | An integer ranging from 1 to 4294967295. By default, it is 0. |
| track bfd-session cfg-name | Specifies the BFD session bound to a static route. You
can specify track bfd-session in the command
to configure BFD to detect the link status and provide the detection
mechanism for static routes. If vpn-instance is directed to vsys, this parameter cannot be set. |
The value must be the name of an existing BFD session. |
| track ip-link link-name | Specifies the IP link bound to a static route. | The value must be the name of an existing IP link. |
| track nqa admin-name test-name | Specifies the administrator name and test name of the NQA test instance. | The value of admin-name and test-name must be the administrator name and the test instance name respectively. |
| permanent | Configures permanent advertisement of static routes. |
- |
| ldp-sync | Enables synchronization between LDP and static routes.
NOTE:
Only the USG6510E/6510E-POE/6530E do not support this parameter. |
- |
| description text | Specifies the description of a static route. You can specify description to add the description of static routes. This makes it convenient for the administrator to check and maintain static routes. | A string of 1 to 80 characters that can contain spaces. |
| recursive-lookup host-route | Specifies static routes to iterate to host routes. |
- |
| inherit-cost | Specifies static routes to inherit the cost of iterated routes. | - |
| all | Deletes all static routes of a VPN instance. | - |
Applicable Environment
You can configure track bfd-session cfg-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.
After the track nqa admin-name test-name command is run, the system determines whether to activate a static route according to the NQA test result. This helps control the advertisement of static routes and guide traffic to an available path.
If service traffic needs to be forwarded along a specified path, you can detect links by pinging the destination addresses of static routes. In this manner, you can monitor services at a low cost. You can configure permanent advertisement of static routes by configuring permanent. Links can then be detected through a ping operation.
Only a static route with a specified outbound interface can be configured with synchronization between LDP and static routes. The specified outbound interface cannot be a loopback or null interface.
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 display current-configuration command in the system view to view the description.
Prerequisite
The ip vpn-instance command has been used to create a VPN instance.
Follow-up Procedure
If a static route needs to be sent to the peer Provide Edge (PE) after being configured, import the static route into the BGP running between the PEs.
Precautions
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 non-Point-to-Point (non-P2P) interface, specify the next hop address.