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

NE40E V800R010C10SPC500 Configuration Guide - IP Routing 01

This is NE40E V800R010C10SPC500 Configuration Guide - IP Routing
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).
Configuring IPv4 Static Routes

Configuring IPv4 Static Routes

On a network, you can control route selection by configuring IPv4 Static Routes.

Usage Scenario

IPv4 static routes can be configured for a network with simple structure to achieve connectivity.

The NE40E supports common static routes and those associated with VPN instances. The static routes associated with VPN instances are used to manage VPN routes. For details about VPN instances, see the HUAWEI NetEngine40E Universal Service Router Configuration Guide - VPN.

Pre-configuration Tasks

Before configuring IPv4 Static Routes, configure parameters of the link layer protocol and IP addresses for interfaces and ensure that the link layer protocol on the interfaces is Up.

Configuration Procedures

Figure 3-1 Flowchart of configuring IPv4 Static Routes

Creating IPv4 Static Routes

To create an IPv4 static route, configure its destination address, outbound interface, and next hop.

Context

When creating an IPv4 static route, you need the following information:

  • Destination address and mask

    In the ip route-static command, the IPv4 address is expressed in dotted decimal notation, and the mask is expressed either in dotted decimal notation or represented by the mask length.

  • Outbound interface and next hop address

    When creating a static route, you can specify an outbound interface, a next hop address, or both of them, depending on actual requirements.

    Actually, each routing entry requires a next hop address. Before sending a packet, a device needs to search its routing table for the route matching the destination address in the packet based on the longest match rule. The device can find the associated link layer address to forward the packet only when the next hop address of the packet is available.

    When specifying an outbound interface, note the following rules:

    • For a Point-to-Point (P2P) interface, if the outbound interface is specified, the next hop address is the address of the remote interface connected to the outbound interface. For example, when a GE interface is encapsulated with Point-to-Point Protocol (PPP) and obtains the remote IP address through PPP negotiation, you need to specify only the outbound interface rather than the next hop address.

    • Non-Broadcast Multiple-Access (NBMA) interfaces are applicable to Point-to-Multipoint networks. Therefore, you need to configure IP routes and the mappings between IP addresses and link layer addresses. In this case, next hop addresses need to be configured.

    • An Ethernet interface is a broadcast interface and a virtual-template (VT) interface can be associated with multiple virtual access (VA) interfaces. If the Ethernet interface or the VT interface is specified as the outbound interface of a static route, the next hop cannot be determined because multiple next hops exist. Therefore, do not specify an Ethernet interface or a VT interface as the outbound interface unless necessary. If you need to specify a broadcast interface (such as an Ethernet interface) or a VT interface as the outbound interface, specify the associated next hop address.

  • Other attributes

    You can configure different priorities for different static routes so that routing management policies can be flexibly applied. For example, when creating multiple routes to the same destination address, you can set the same priority for these routes to implement load balancing. You can also set different priorities to implement routing redundancy.

    By configuring different tag values, you can classify static routes to implement different routing policies. For example, other protocols can import static routes with specified tag values based on routing policies.

    If service traffic needs to be forwarded along a specified path, regardless of the link status, you can configure permanent advertisement of static routes by using permanent.

    In network maintenance scenarios, static routes are required to verify services. If you do not want these static routes to be imported by other protocols, specify no-advertise to prevent these static routes from being advertised.

    If you set the destination address and the mask to all 0s (0.0.0.0 0.0.0.0) in the ip route-static command, a default route is configured.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run either of the following commands as required:

    • Run ip route-static ip-address { mask | mask-length } { nexthop-address | interface-type interface-number [ nexthop-address ] | vpn-instance vpn-instance-name nexthop-address } [ preference preference ] [ tag tag ] [ permanent ] [ no-advertise | no-install ] [ description text ]

      An IPv4 static route is configured in public network.

    • Run ip route-static vpn-instance vpn-source-name destination-address { mask | mask-length } { nexthop-address | interface-type interface-number [ nexthop-address ] | vpn-instance vpn-instance-name nexthop-address } [ preference preference | tag tag ] * [ permanent ] [ no-advertise ] [ description text ]

      An IPv4 static route is configured in VPN network.

    • Run ip route-static topology topology-name ip-address { mask | mask-length } { nexthop-address | interface-type interface-number [ nexthop-address ] } [ preference preference | tag tag ] * [ no-advertise | no-install ] [ description text ]

      An IPv4 route is configured in a non-base topology instance.

    NOTE:

    If the outbound interface of a static route is a broadcast interface or an NBMA interface, the next hop of the outbound interface must be specified.

  3. Run commit

    The configuration is committed.

(Optional) Setting the Default Priority for IPv4 Static Routes

You can change the default priority for IPv4 static routes.

Context

After an IPv4 static route is configured, the default priority is used if no priority is specified for the static route. After the default priority is re-set, the new default priority takes effect only on new IPv4 static routes.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run ip route-static default-preference preference

    The default priority is set for static routes.

  3. Run commit

    The configuration is committed.

(Optional) Configuring Iterative Depth-based Static Route Selection

To enable the system to select the static route with the smallest iterative depth as the active route, configure iterative depth-based static route selection.

Context

Among static routes with the same prefix but different iterative depths, static routes with lower iterative depths are more stable. After iterative depth-based static route selection is configured, the system selects the static route with the smallest iterative depth as the active route and delivers it to the Forwarding Information Base (FIB) table. The other routes become inactive.

To prevent loops when Gateway GPRS Support Node (GGSN) services are forwarded between boards, run the ip route-static selection-rule relay-depth command to configure iterative depth-based static route selection.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run ip route-static selection-rule relay-depth

    Iterative depth-based static route selection is configured.

  3. Run commit

    The configuration is committed.

(Optional) Configuring a Device to Iterate Static Routes to ARP Vlink Routes

To prevent traffic loss caused by a black-hole route in a scenario where a Layer 2 VPN accesses a Layer 3 VPN, configure devices to iterate static routes to ARP Vlink routes.

Context

Configuring a device to iterate static routes to ARP Vlink routes prevents traffic loss caused by a black-hole route in a scenario where a Layer 2 VPN accesses a Layer 3 VPN.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run ip route recursive-lookup arp vlink-direct-route protocol static

    The device is configured to iterate static routes to ARP Vlink routes.

    In a scenario where a Layer 2 VPN accesses a Layer 3 VPN, to configure a device to iterate static routes to ARP Vlink routes, run the ip route-static command with recursive-lookup host-route specified and ip route recursive-lookup arp vlink-direct-route protocol static.

  3. Run commit

    The configuration is committed.

(Optional) Preventing an IPv4 Static Route from Being Selected If the BFD Session Associated with It Is in the AdminDown State

This section describes how to configure the router not to select an IPv4 static route if the BFD session associated with it is in the AdminDown state. This ensures that Huawei devices can interwork with non-Huawei devices.

Context

By default, an IPv4 static route can still be selected by Huawei devices even though the BFD session associated with it is in the AdminDown state, but not by non-Huawei devices. As a result, Huawei devices cannot interwork with non-Huawei devices.

To address this problem, run the ip route-static track bfd-session admindown invalid command to configure the router not to select the IPv4 static route if the BFD session associated with it is in the AdminDown state.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run ip route-static track bfd-session session-name bfd-name admindown invalid

    The router has been configured not to select the IPv4 static route if the BFD session associated with it is in the AdminDown state.

  3. Run commit

    The configuration is committed.

Verifying the IPv4 Static Route Configuration

After configuring an IPv4 static route, verify the configuration.

Prerequisites

An IPv4 static route has been configured.

Procedure

  • Run the display ip routing-table command to check brief information about the IPv4 routing table.
  • Run the display ip routing-table verbose command to check detailed information about the IPv4 routing table.

Example

# Run the display ip routing-table command to check the priority, next hops, and outbound interface of the static route.

<HUAWEI> display ip routing-table
Route Flags: R - relay, D - download
to fib, T - to vpn-instance, B - black hole route
------------------------------------------------------------------------------
Routing Tables: Public
         Destinations : 12        Routes : 12

Destination/Mask    Proto  Pre  Cost   Flags    NextHop         Interface

        0.0.0.0/0   Static 60   0        RD      1.1.4.2    GigabitEthernet1/0/0
        1.1.1.0/24  Direct 0    0         D       1.1.1.1         GigabitEthernet2/0/0
        1.1.1.1/32  Direct 0    0         D       127.0.0.1       GigabitEthernet2/0/0
      1.1.1.255/32  Direct 0    0         D       127.0.0.1       GigabitEthernet2/0/0
        1.1.4.0/30  Direct 0    0         D       1.1.4.1         GigabitEthernet1/0/0
        1.1.4.1/32  Direct 0    0         D       127.0.0.1       GigabitEthernet1/0/0
        1.1.4.2/32  Direct 0    0         D       1.1.4.2         GigabitEthernet1/0/0
        1.1.4.3/32  Direct 0    0         D       127.0.0.1       GigabitEthernet1/0/0
      127.0.0.0/8   Direct 0    0         D       127.0.0.1       InLoopBack0
      127.0.0.1/32  Direct 0    0         D       127.0.0.1       InLoopBack0
127.255.255.255/32  Direct 0    0         D       127.0.0.1       InLoopBack0
255.255.255.255/32  Direct 0    0         D       127.0.0.1       InLoopBack0
Translation
Download
Updated: 2019-01-03

Document ID: EDOC1100055018

Views: 55941

Downloads: 211

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