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

Fat AP and Cloud AP V200R010C00 Command Reference

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).
ip route-static

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, the system does not configure IPv4 unicast static routes.

Format

ip route-static ip-address { mask | mask-length } { nexthop-address | interface-type interface-number [ nexthop-address ] } [ preference preference | tag tag ] * [ permanent | inherit-cost ] [ description text ]

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

undo ip route-static all

Parameters

Parameter Description Value
ip-address Specifies a destination IP address. The value is in dotted decimal notation.
mask Specifies the subnet mask. The value is in dotted decimal notation.
mask-length Specifies the mask length. As 1s in a 32-bit mask must be consecutive, 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. -
preference preference Specifies the preference of a 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, other 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.
permanent

Configures permanent advertisement of static routes.

-
description text Configures the description of a static route. The value is a string of 1 to 35 characters that can contain spaces.
all Deletes all IPv4 unicast static routes. -
inherit-cost Configures static routes to inherit the cost of iterated routes. -

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

On a simple network, you only need to configure static routes to ensure that the network runs properly. When the wireless access point cannot use dynamic routing protocols or establish a route to the destination network, configure static routes.

Precautions

When configuring unicast static routes, note the following:

  • Only public routes can be used for tunnel iteration.

  • If no preference is configured 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 wireless access point cannot find a route in the routing table to forward packets, the wireless access point uses the default route to forward packets.

  • Setting different preferences 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 configure the description text parameter to add the description of static routes so that the administrator can check and maintain static routes easily. 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 wireless access point. In this manner, you do not need to modify the wireless access point configuration when the peer IP address changes.

Example

# Set the next-hop address of the default route to 172.16.0.1.

<Huawei> system-view
[Huawei] ip route-static 0.0.0.0 0.0.0.0 172.16.0.1
Translation
Download
Updated: 2019-11-21

Document ID: EDOC1100064352

Views: 208021

Downloads: 122

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