The ip route-static command configures an IPv4 static route in the virtual system view.
The undo ip route-static command deletes an IPv4 static route configured in the virtual system view.
By default, no IPv4 static routes are configured in the virtual system view.
ip route-static ip-address { mask | mask-length } { nexthop-address | interface-type interface-number [ nexthop-address ] } [ preference preference | tag tag ] * [ track ip-link ip-link-name ] [ description text ]
ip route-static ip-address { mask | mask-length } public [ preference preference | tag tag ] * [ track ip-link ip-link-name ] [ description text ]
undo ip route-static ip-address { mask | mask-length } [ interface-type interface-number ] [ nexthop-address | public ] [ preference preference | tag tag ] * [ track ip-link ]
undo ip route-static track ip-link { all | ip-link-name ip-link-name }
| Parameter | Description | Value |
|---|---|---|
| ip-address | Specifies a destination IP address. | The value is in dotted decimal notation. |
| mask | Specifies the mask of an IP address. | The value is in dotted decimal notation. |
| mask-length | Specifies the mask length. The 32-bit mask is represented by consecutive 1s. Therefore, the mask in dotted decimal notation can be replaced by the mask length. | The value is an integer ranging from 0 to 32. |
| nexthop-address | Specifies the next hop IP address of a route. | The value is in dotted decimal notation. |
| interface-type interface-number | Specifies the type and number of the static route's outbound interface. | - |
| preference preference | Specifies a priority of an IPv4 static route. | 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 a tag value of a static route. Static routes can be classified based on the tag to implement RM policies. For example, a protocol can use a routing policy to import a specified static route. | The value is an integer ranging from 1 to 4294967295. The default value is 0. |
| track ip-link ip-link-name | Associates the IP-link of a specified name with a static route. | The value must be the name of an existing IP link. |
| description text | Specifies the description of a static route. | The value is a string of 1 to 80 characters, spaces supported. |
| public | Specifies that the next hop of a static route is the public system. You can set the public parameter to allow the virtual system to access the public system. | - |
| all | Deletes all IPv4 unicast static routes. | - |
| ip-link-name ip-link-name | Unbind the static route from the current IP link. |
The value must be the name of an existing IP link. |
To implement communication between users of the virtual system, run the ip route-static ip-address { mask | mask-length } { nexthop-address | interface-type interface-number [ nexthop-address ]} [ preference preference | tag tag ] * [ track ip-link ip-link-name ] [ description text ] command.
To implement communication between users of the virtual system and Internet users, run the ip route-static ip-address { mask | mask-length } public [ preference preference | tag tag ] * [ track ip-link ip-link-name ] [ description text ] command.