12-Layer 3—IP Routing Configuration Guide

HomeSupportConfigure & DeployConfiguration GuidesH3C SecPath M9000 Configuration Guide(V7)(E9X71)-6W70012-Layer 3—IP Routing Configuration Guide
02-Static routing configuration
Title Size Download
02-Static routing configuration 140.16 KB

Configuring static routing

About static routes

Static routes are manually configured. If a network's topology is simple, you only need to configure static routes for the network to work correctly.

Static routes cannot adapt to network topology changes. If a fault or a topological change occurs in the network, the network administrator must modify the static routes manually.

vSystem support for features

Non-default vSystems do not support the following features:

·     Configuring a static route group.

·     Configuring static route FRR.

·     Allowing static routes to recurse to LSP tunnels.

For information about the support of non-default vSystems for the commands, see static routing command reference. For information about vSystem, see Virtual Technologies Configuration Guide.

Configuring a static route

1.     Enter system view.

system-view

2.     Configure a static route.

Public network:

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

By default, no static route is configured.

You can associate Track with a static route to monitor the reachability of the next hops. For more information about Track, see Network Management and Monitoring Configuration Guide.

VPN:

ip route-static vpn-instance s-vpn-instance-name dest-address { mask-length | mask } { interface-type interface-number [ next-hop-address ] | next-hop-address [ public ] | vpn-instance d-vpn-instance-name next-hop-address } [ permanent | track track-entry-number ] [ preference preference ] [ tag tag-value ] [ description text ]

By default, no static route is configured.

You can associate Track with a static route to monitor the reachability of the next hops. For more information about Track, see Network Management and Monitoring Configuration Guide.

3.     (Optional.) Configure the default preference for static routes.

ip route-static default-preference default-preference

The default setting is 60.

Configuring static routes for vSystem intercommunication

About static route configuration for vSystem intercommunication

Configure static routes to realize intercommunication between the default vSystem and a non-default vSystem or between two non-default vSystems. For example, configure a static route to allow a non-default vSystem to access the default vSystem. When data packets in the non-default vSystem match the static route, they are forwarded to the default vSystem. The default vSystem continues to forward them.

For more information about vSystems, see Virtual Technologies Configuration Guide.

Restrictions and guidelines for static route configuration for vSystem intercommunication

Do not specify the next hop address when you configure a static route for vSystem intercommunication.

Configuring a static route for a non-default vSystem to access the default vSystem

Restrictions and guidelines

Perform this task on a non-default vSystem.

Procedure

1.     Enter system view.

system-view

2.     Configure a static route for a non-default vSystem to access the default vSystem.

ip route-static dest-address { mask-length | mask } public [ track track-entry-number ] [ preference preference ] [ tag tag-value ] [ description text ]

By default, no static routes are configured for a non-default vSystem to access the default vSystem.

Configuring a static route for the default vSystem to access a non-default vSystem

Restrictions and guidelines

Perform this task on the default vSystem.

Make sure the specified destination VPN instance has the same name as the non-default vSystem.

Procedure

1.     Enter system view.

system-view

2.     Configure a static route for the default vSystem to access a non-default vSystem.

ip route-static dest-address { mask-length | mask } vpn-instance d-vpn-instance-name [ track track-entry-number ] [ preference preference ] [ tag tag-value ] [ description text ]

By default, no static routes are configured for the default vSystem to access a non-default vSystem.

Configuring a static route for one non-default vSystem to access another non-default vSystem

Restrictions and guidelines

Perform this task on the default vSystem.

Make sure the specified source and destination VPN instances have the same names as the non-default vSystems.

Procedure

1.     Enter system view.

system-view

2.     Configure a static route for one non-default vSystem to access another non-default vSystem.

ip route-static vpn-instance s-vpn-instance-name dest-address { mask-length | mask } vpn-instance d-vpn-instance-name [ track track-entry-number ] [ preference preference ] [ tag tag-value ] [ description text ]

By default, no static routes are configured for one non-default vSystem to access another non-default vSystem.

Configuring a static route group

About this task

This task allows you to batch create static routes with different prefixes but the same output interface and next hop.

You can create a static route group, and specify the static group in the ip route-static command. All prefixes in the static route group will be assigned the next hop and output interface specified in the ip route-static command.

Procedure

1.     Enter system view.

system-view

2.     Create a static route group and enter its view.

ip route-static-group group-name

By default, no static route group is configured.

3.     Add a static route prefix to the static route group.

prefix dest-address { mask-length | mask }

By default, no static route prefix is added to the static route group.

4.     Return to system view.

quit

5.     Configure a static route.

Public network:

ip route-static group group-name { interface-type interface-number [ next-hop-address ] | next-hop-address | vpn-instance d-vpn-instance-name next-hop-address } [ permanent | track track-entry-number ] [ preference preference ] [ tag tag-value ] [ description text ]

VPN:

ip route-static vpn-instance s-vpn-instance-name group group-name { interface-type interface-number [ next-hop-address ] | next-hop-address [ public ] | vpn-instance d-vpn-instance-name next-hop-address } [ permanent | track track-entry-number ] [ preference preference ] [ tag tag-value ] [ description text ]

By default, no static route is configured.

Configuring the DHCP-designated default router as the next hop of a static route

About this task

After an interface obtains an IP address and gateway address through DHCP, the device automatically generates a static route with the interface as the output interface. The destination address of the static route is 0.0.0.0/0 and the next hop of the static route is the default router (the gateway address designated by the DHCP server). This static route cannot form ECMP routes with manually configured static routes. The device uses this static route to guide traffic forwarding only after the manually configured static routes become invalid.

Perform this task to use both the automatically generated static route and the manually configured static routes to guide traffic forwarding. The task is applicable when the device has dual egress WAN links.

This task enables the device to automatically generate a static route destined for the specified network with the DHCP-designated default router of the output interface as the next hop. This static route takes effect only after the output interface obtains an IP address and gateway address through DHCP, and becomes invalid upon the DHCP lease expiration. The next hop of this static route changes as the gateway address of the output interface changes. In addition, this static route can form ECMP routes with manually configured static routes.

Restrictions and guidelines

When you configure the next hop of a static route as the DHCP-designated default router, make sure the output interface of the static route is a broadcast interface.

Procedure

1.     Enter system view.

system-view

2.     Configure a static route and specify the default router designated by the DHCP server for the output interface as the next hop of the static route.

Public network:

ip route-static { dest-address { mask-length | mask } | group group-name } interface-type interface-number dhcp [ backup-interface interface-type interface-number [ backup-nexthop backup-nexthop-address ] [ permanent ] | permanent | track track-entry-number ] [ preference preference ] [ tag tag-value ] [ description text ]

VPN:

ip route-static vpn-instance s-vpn-instance-name dest-address { mask-length | mask } interface-type interface-number dhcp [ backup-interface interface-type interface-number [ backup-nexthop backup-nexthop-address ] [ permanent ] | permanent | track track-entry-number ] [ preference preference ] [ tag tag-value ] [ description text ]

ip route-static vpn-instance s-vpn-instance-name group group-name interface-type interface-number dhcp [ backup-interface interface-type interface-number [ backup-nexthop backup-nexthop-address ] [ permanent ] ] [ preference preference ] [ tag tag-value ] [ description text ]

By default, no static route is configured with the DHCP-designated default router as the next hop.

Deleting static routes

About this task

To delete a static route, use the undo ip route-static command. To delete all static routes including the default route, use the delete static-routes all command.

Procedure

1.     Enter system view.

system-view

2.     Delete all static routes.

Public network:

delete static-routes all

VPN:

delete vpn-instance vpn-instance-name static-routes all

CAUTION

CAUTION:

This command might interrupt network communication and cause packet forwarding failure. Before executing the command, make sure you fully understand the potential impact on the network.

Configuring BFD for static routes

IMPORTANT

IMPORTANT:

Enabling BFD for a flapping route could worsen the situation.

 

About BFD

BFD provides a general-purpose, standard, medium-, and protocol-independent fast failure detection mechanism. It can uniformly and quickly detect the failures of the bidirectional forwarding paths between two routers for protocols, such as routing protocols and MPLS.

For more information about BFD, see Network Management and Monitoring Configuration Guide.

Configuring BFD control packet mode

About this task

This mode uses BFD control packets to detect the status of a link bidirectionally at a millisecond level.

BFD control packet mode can be applied to static routes with a direct next hop or with an indirect next hop.

Restrictions and guidelines for BFD control packet mode

If you use BFD control packet mode at the local end, you must use this mode also at the peer end.

Configuring BFD control packet mode for a static route (direct next hop)

1.     Enter system view.

system-view

2.     Configure BFD control packet mode for a static route.

Public network:

ip route-static dest-address { mask-length | mask } interface-type interface-number { dhcp | next-hop-address } bfd { control-packet | static session-name } [ preference preference ] [ tag tag-value ] [ description text ]

VPN:

ip route-static vpn-instance s-vpn-instance-name dest-address { mask-length | mask } interface-type interface-number { dhcp | next-hop-address } bfd { control-packet | static session-name } [ preference preference ] [ tag tag-value ] [ description text ]

By default, BFD control packet mode for a static route is not configured.

Configuring BFD control packet mode for a static route (indirect next hop)

1.     Enter system view.

system-view

2.     Configure BFD control packet mode for a static route.

Public network:

ip route-static dest-address { mask-length | mask } { next-hop-address bfd control-packet bfd-source ip-address | vpn-instance d-vpn-instance-name next-hop-address bfd { control-packet bfd-source ip-address | static session-name } } [ preference preference ] [ tag tag-value ] [ description text ]

VPN:

ip route-static vpn-instance s-vpn-instance-name dest-address { mask-length | mask } { next-hop-address bfd { control-packet bfd-source ip-address | static session-name } | vpn-instance d-vpn-instance-name next-hop-address bfd { control-packet bfd-source ip-address | static session-name } } [ preference preference ] [ tag tag-value ] [ description text ]

By default, BFD control packet mode for a static route is not configured.

Configuring BFD echo packet mode

About this task

With BFD echo packet mode enabled for a static route, the output interface sends BFD echo packets to the destination device, which loops the packets back to test the link reachability.

Restrictions and guidelines

You do not need to configure BFD echo packet mode at the peer end.

Do not use BFD for a static route with the output interface in spoofing state.

Procedure

1.     Enter system view.

system-view

2.     Configure the source address of echo packets.

bfd echo-source-ip ip-address

By default, the source address of echo packets is not configured.

For more information about this command, see Network Management and Monitoring Command Reference.

3.     Configure BFD echo packet mode for a static route.

Public network:

ip route-static dest-address { mask-length | mask } interface-type interface-number { dhcp | next-hop-address } bfd { echo-packet | static session-name } [ preference preference ] [ tag tag-value ] [ description text ]

VPN:

ip route-static vpn-instance s-vpn-instance-name dest-address { mask-length | mask } interface-type interface-number { dhcp | next-hop-address } bfd { echo-packet | static session-name } [ preference preference ] [ tag tag-value ] [ description text ]

By default, BFD echo packet mode for a static route is not configured.

Configuring static route FRR

About static route FRR

A link or router failure on a path can cause packet loss. Static route fast reroute (FRR) enables fast rerouting to minimize the impact of link or node failures.

Figure 1 Network diagram

 

As shown in Figure 1, upon a link failure, packets are directed to the backup next hop to avoid traffic interruption. You can either specify a backup next hop for FRR or enable FRR to automatically select a backup next hop (which must be configured in advance).

Restrictions and guidelines for static route FRR

Do not use static route FRR and BFD (for a static route) at the same time.

Equal-cost routes do not support static route FRR.

Besides the configured static route for FRR, the device must have another route to reach the destination. When the state of the primary link (with Layer 3 interfaces staying up) changes from bidirectional to unidirectional or down, static route FRR quickly redirects traffic to the backup next hop. When the Layer 3 interfaces of the primary link are down, static route FRR temporarily redirects traffic to the backup next hop. In addition, the device searches for another route to reach the destination and redirects traffic to the new path if a route is found. If no route is found, traffic interruption occurs.

Configuring static route FRR by specifying a backup next hop

Restrictions and guidelines

A static route does not take effect when the backup output interface is unavailable.

To change the backup output interface or next hop, you must first remove the current setting. The backup output interface and next hop must be different from the primary output interface and next hop.

Procedure

1.     Enter system view.

system-view

2.     Configure static route FRR.

Public network:

ip route-static dest-address { mask-length | mask } interface-type interface-number [ { dhcp | next-hop-address } [ backup-interface interface-type interface-number [ backup-nexthop backup-nexthop-address ] ] ] [ permanent ] [ preference preference ] [ tag tag-value ] [ description text ]

VPN:

ip route-static vpn-instance s-vpn-instance-name dest-address { mask-length | mask } interface-type interface-number [ { dhcp | next-hop-address } [ backup-interface interface-type interface-number [ backup-nexthop backup-nexthop-address ] ] ] [ permanent ] [ preference preference ] [ tag tag-value ] [ description text ]

By default, static route FRR is disabled.

Configuring static route FRR to automatically select a backup next hop

1.     Enter system view.

system-view

2.     Configure static route FRR to automatically select a backup next hop.

ip route-static fast-reroute auto

By default, static route FRR is disabled from automatically selecting a backup next hop.

Enabling BFD echo packet mode for static route FRR

About this task

By default, static route FRR uses ARP to detect primary link failures. Perform this task to enable static route FRR to use BFD echo packet mode for fast failure detection on the primary link.

Procedure

1.     Enter system view.

system-view

2.     Configure the source IP address of BFD echo packets.

bfd echo-source-ip ip-address

By default, the source IP address of BFD echo packets is not configured.

The source IP address cannot be on the same network segment as any local interface's IP address.

For more information about this command, see Network Management and Monitoring Command Reference.

3.     Enable BFD echo packet mode for static route FRR.

ip route-static primary-path-detect bfd echo

By default, BFD echo packet mode for static route FRR is disabled.

Enabling LDP and static route synchronization

About this task

When LDP establishes LSPs based on static routes, if LDP and the static routes are not synchronized, MPLS traffic forwarding might be interrupted.

LDP is not synchronized with a static route when one of the following situations occurs:

·     A static route uses a link in up state, but the LDP LSP on this link has not been established.

·     A static route uses a link on which an LDP session is down and LDP LSPs on the link have been removed.

After LDP and static route synchronization is enabled, a static route becomes Active only when LDP is converged on the link used by the static route. Before LDP convergence is completed, the static route is in Inactive state. In this way, the device can avoid discarding MPLS packets when no LDP LSP is established on the static route.

On a network where primary and backup LDP LSPs are established based on static routes, LDP and static route synchronization helps minimize traffic interruption when the primary LSP fails:

1.     When the primary LSP fails, LDP and static route synchronization places the static route of the primary LSP to Inactive state. MPLS traffic is switched to the backup LSP.

2.     LDP and static route synchronization keeps the Inactive route state during the recovery of the primary LSP.

3.     After the primary LSP completely recovers, LDP and static route synchronization places the static route to Active state, and then MPLS traffic is switched back to the primary LSP.

LDP and static route synchronization allows the primary LSP and the static route to become available synchronously. This ensures that when MPLS traffic arrives, the LSP has been established, so as to avoid MPLS traffic loss.

Procedure

1.     Enter system view.

system-view

2.     Enable LDP and static route synchronization.

Public network:

ip route-static { dest-address { mask-length | mask } | group group-name } interface-type interface-number [ dhcp | next-hop-address ] [ backup-interface interface-type interface-number [ backup-nexthop backup-nexthop-address ] [ permanent ] | bfd { control-packet | echo-packet } | permanent | track track-entry-number ] ldp-sync [ preference preference ] [ tag tag-value ] [ description text ]

VPN:

ip route-static vpn-instance s-vpn-instance-name dest-address { mask-length | mask } interface-type interface-number [ dhcp | next-hop-address ] [ backup-interface interface-type interface-number [ backup-nexthop backup-nexthop-address ] [ permanent ] | bfd { control-packet | echo-packet } | permanent | track track-entry-number ] ldp-sync [ preference preference ] [ tag tag-value ] [ description text ]

ip route-static vpn-instance s-vpn-instance-name group group-name interface-type interface-number [ dhcp | next-hop-address ] [ bfd { control-packet | echo-packet } | backup-interface interface-type interface-number [ backup-nexthop backup-nexthop-address ] [ permanent ] ] ldp-sync [ preference preference ] [ tag tag-value ] [ description text ]

By default, LDP and static route synchronization is disabled.

Display and maintenance commands for static routing

IMPORTANT

IMPORTANT:

Non-default vSystems do not support some of the display and maintenance commands. For information about vSystem support for these commands, see static routing command reference.

Execute display commands in any view.

 

Task

Command

Display static route information.

display ip routing-table protocol static [ inactive | verbose ]

Display static route next hop information.

display route-static nib [ nib-id ] [ verbose ]

Display static routing table information.

display route-static routing-table [ vpn-instance vpn-instance-name ] [ ip-address { mask-length | mask } ]

 

For more information about the display ip routing-table protocol static [ inactive | verbose ] command, see basic IP routing in Layer 3—IP Routing Command Reference.


Configuring a default route

A default route is used to forward packets that do not match any specific routing entry in the routing table. Without a default route, packets that do not match any routing entries are discarded and an ICMP destination-unreachable packet is sent to the source.

A default route can be configured in either of the following ways:

·     The network administrator can configure a default route with both destination and mask being 0.0.0.0. For more information, see "Configuring static routing."

·     Some dynamic routing protocols (such as OSPF, IS-IS, and RIP) can generate a default route. For example, an upstream router running OSPF can generate a default route and advertise it to other routers. These routers install the default route with the next hop being the upstream router. For more information, see the respective chapters on these routing protocols in this configuration guide.

 

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
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
新华三官网