04-Layer 3 Command Reference

HomeSupportReference GuidesCommand ReferencesH3C WX Series Access Controllers Command References(R3308 R2308)-6W10704-Layer 3 Command Reference
14-Static Routing Commands
Title Size Download
14-Static Routing Commands 75.46 KB

delete static-routes all

Syntax

delete static-routes all

View

System view

Default level

2: System level

Parameters

None

Description

Use delete static-routes all to delete all static routes.

When you use this command to delete static routes, the system will prompt you to confirm the operation before deleting all the static routes.

Related commands: display ip routing-table and ip route-static.

Examples

# Delete all static routes.

<Sysname> system-view

[Sysname] delete static-routes all

This will erase all ipv4 static routes and their configurations, you must reconfigure all static routes

Are you sure?[Y/N]:Y

ip route-static

Syntax

ip route-static dest-address { mask | mask-length } { next-hop-address [ track track-entry-number ] | interface-type interface-number [ next-hop-address ] } [ preference preference-value ] [ permanent ] [ description description-text ]

undo ip route-static dest-address { mask | mask-length } [ next-hop-address | interface-type interface-number [ next-hop-address ] [ preference preference-value ]

View

System view

Default level

2: System level

Parameters

dest-address: Destination IP address of the static route, in dotted decimal notation.

mask: Mask of the IP address, in dotted decimal notation.

mask-length: Mask length, in the range of 0 to 32.

next-hop-address: IP address of the next hop, in dotted decimal notation.

interface-type interface-number: Specifies the output interface by its type and number. If the output interface is a broadcast interface, such as an Ethernet interface, a virtual template or a VLAN interface, the next hop address must be specified.

preference preference-value : Specifies the preference of the static route, which is in the range of 1 to 255 and defaults to 60.

permanent: Specifies the route as a permanent static route. If the output interface is down, the permanent static route is still active.

description description-text: Configures a description for the static route, which consists of 1 to 60 characters, including special characters like space, but excluding question marks (?).

control-packet: Implements BFD in the control mode.

echo-packet: Implements BFD in the echo mode.

bfd-source ip-address: Specifies the source address of BFD packets. H3C recommends you configure loopback interface address.

track track-entry-number: Associates the static route with a track entry. Use the track-entry-number argument to specify a track entry number, in the range of 1 to 1024.

Description

Use ip route-static to configure a unicast static route.

Use undo ip route-static to delete a unicast static route.

When you configure a unicast static route, follow these guidelines:

·     If the destination IP address and the mask are both 0.0.0.0 (or 0), the configured route is a default route. The default route will be used for forwarding a packet if no route is available for the packet in the routing table.

·     Implement different routing policies by tuning route preference. For example, to enable multiple routes to the same destination address to share load, assign the same preference for the routes; to enable them to back up one another, assign different preferences to them.

·     Specify the output interface or the next hop address of the static route as needed:

¡     If the output interface supports network address-to-link layer address resolution or is a point-to-point interface, you may specify only the interface or the next hop address.

¡     If the output interface is a Null 0 interface, no next hop address is required.

¡     If the output interface is a point-to-point interface, a PPP interface for example, you may specify only the output interface rather than the peer address or both the output interface and peer address. As only the output interface is specified, there is no need to change the configuration of the route even if the peer address is changed.

¡     If the output interface is an NBMA and P2MP interface, H3C recommends specifying both the interface and the next hop address for the route. This is because such interfaces support point-to-multipoint networks. For them, the router must establish IP address-to-link layer address mappings for successful packet delivery.

¡     H3C does not recommend specifying a broadcast interface (such as an Ethernet interface or a VLAN interface) as the output interface for a static route, because a broadcast interface may have multiple next hops. If you have to do so, you must specify the corresponding next hop of the interface at the same time.

·     The next hop address of a static route cannot be the IP address of a local interface, such as an Ethernet interface and VLAN interface. Otherwise, the static route does not take effect.

·     To configure track monitoring for an existing static route, simply associate the static route with a track entry. For a non-existent static route, configure it and associate it with a track entry.

·     If a static route needs route recursion, the associated track entry must monitor the nexthop of the recursive route instead of that of the static route. Otherwise, a valid route may be mistakenly considered invalid.

·     Do not specify the permanent keyword together with the track keyword.

Related commands: display ip routing-table and ip route-static default-preference.

Examples

# Configure a static route, whose destination address is 1.1.1.1/24, next hop address is 2.2.2.2, and description information is for internet & intranet.

<Sysname> system-view

[Sysname] ip route-static 1.1.1.1 24 2.2.2.2 description for internet & intranet

ip route-static default-preference

Syntax

ip route-static default-preference default-preference-value

undo ip route-static default-preference

View

System view

Default level

2: System level

Parameters

default-preference-value: Default preference for static routes, which is in the range of 1 to 255.

Description

Use ip route-static default-preference to configure the default preference for static routes.

Use undo ip route-static default-preference to restore the default.

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

If no preference is specified when configuring a static route, the default preference is used.

When the default preference is re-configured, it applies to newly added static routes only.

Related commands: display ip routing-table and ip route-static.

Examples

# Set the default preference of static routes to 120.

<Sysname> system-view

[Sysname] ip route-static default-preference 120

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Intelligent Storage
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
  • Technical Blogs
All Support
  • Become A Partner
  • Partner Policy & Program
  • Global Learning
  • Partner Sales Resources
  • Partner Business Management
  • Service Business
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网