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 Basic OSPF Functions

Configuring Basic OSPF Functions

Before constructing OSPF networks, you need to configure basic OSPF functions.

Usage Scenario

When OSPF is configured on multiple routers in the same area, most configuration data, such as the timer, filter, and aggregation, must be planned uniformly in the area. Incorrect configurations may cause neighboring routers to fail to send messages to each other or even causing routing information congestion and self-loops.

The OSPF-relevant commands that are configured in the interface view take effect regardless of whether OSPF is enabled. After OSPF is disabled, the OSPF-relevant commands also exist on interfaces.

Pre-configuration Tasks

Before configuring basic OSPF functions, complete the following tasks:

  • Configure a link layer protocol.

  • Configure IP addresses for interfaces to ensure that neighboring nodes are reachable at the network layer.

Configuration Procedures

Figure 5-1 Flowchart of configuring basic OSPF functions

Enabling OSPF

After an OSPF process is created, a router ID is configured for the router, an interface on which OSPF runs and the area to which the interface belongs are specified, routes can be discovered and calculated in the AS.

Context

OSPF on the router requires a router ID. The router ID is a 32-bit unsigned integer, which uniquely identifies the router in the AS. To ensure the stability of OSPF, manually set the router ID of each router during network planning.

OSPF prevents the link state database (LSDB) size from unexpectedly growing by partitioning an AS into different areas. An area is regarded as a logical group, and each group is identified by an area ID. At the border of an area resides the router instead of a link. A network segment (or a link) belongs to only one area. The area to which each OSPF interface belongs must be specified.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run ospf [ process-id | router-id router-id ] *

    An OSPF process is started, and the OSPF view is displayed.

    The NE40E supports OSPF multi-instance. To run OSPF in a VPN instance, run the ospf [ process-id | router-id router-id | vpn-instance vpn-instance-name ] * command.

    • The NE40E supports OSPF multi-process. Processes can be classified by service type. The routers exchange packets regardless of process IDs.

    • router-id router-id specifies the router ID of the router.

      By default, the router automatically selects the IP address of an interface as the router ID. When configuring the router ID, ensure that the router ID is unique in an AS. You can configure the IP address of an interface as the router ID.

      NOTE:
      Each router ID in an OSPF process must be unique. Otherwise, no OSPF neighbor relationships can be established, and routing information is incorrect.

      If a router ID conflict occurs, perform either of the following operations:

      • Run the ospf router-id router-id command to configure a new router ID.
      • Run the undo ospf router-id auto-recover disable command to enable the router ID automatic recovery function. After the function is enabled, the system automatically allocates a new router ID if a router ID conflict occurs.
        NOTE:
        • If the automatic recovery function is enabled and a router ID conflict occurs between indirectly connected routers in one OSPF area, the conflicting router ID is replaced with a newly calculated one, regardless of whether the conflicting router ID was manually configured or automatically generated.
        • The system can replace a router ID in a maximum of three attempts in case the router ID conflict persists.

      After a router ID is replaced, the reset ospf [ process-id ] process command needs to be run to validate the new router ID.

    • If a VPN instance is specified, the OSPF process belongs to this VPN instance. If a VPN instance is not specified, the OSPF process belongs to the public-network instance.

    You can run the description command to configure a description for the OSPF process for easier identification.

  3. Run area area-id

    The OSPF area view is displayed.

    OSPF areas are classified as a backbone area (with area ID 0) or non-backbone areas. The backbone area forwards inter-area routing information. The routing information exchanged between non-backbone areas must be forwarded through the backbone area.

    You can run the description command to configure a description for the OSPF area for easier identification.

  4. To configure OSPF, you can configure the network segments included in an area or enable OSPF on an interface.

    • To configure the network segments included in an area, run the network address wildcard-mask [ description text ] command, in which description specifies the description of the area.

      OSPF runs on an interface only when both of the following conditions are met:

      • The mask length of the interface's IP address is greater than or equal to that specified in the network command.

        NOTE:
        If wildcard-mask in the network command are all 0s and the IP address of the interface is the same as the IP address specified in the network address command, OSPF is also enabled on the interface.
      • The interface's primary IP address belongs to the network segment specified in the network command.

      By default, OSPF uses a host route with a 32-bit mask to advertise the IP address of a loopback interface, regardless of the mask length configured for the IP address. To allow a loopback interface to advertise network-segment routes, its network type must be set to NBMA or broadcast in the interface view. For details on how to set the network type, see Configuring Network Types for OSPF Interfaces.

    • Enable OSPF on an interface.
      1. Run the quit command twice to return to the system view.
      2. Run the interface interface-type interface-number command to enter the interface view.
      3. Run the ospf enable [ process-id ] area area-id command to enable OSPF on the interface. The specified area ID can be a decimal integer or in the format of an IPv4 address. Regardless of the specified format, the area ID is displayed as an IPv4 address.

  5. Run commit

    The configuration is committed.

(Optional) Creating OSPF Virtual Links

This section describes how to create logical links between backbone areas and to ensure the OSPF network connectivity.

Context

After OSPF is divided into different areas, OSPF routes between non-backbone areas are updated through route exchanges within the backbone area. Therefore, OSPF requires that all non-backbone areas keep connected to the backbone area and devices within the backbone area also keep connected. In real-world scenarios, however, these requirements cannot be met due to various limitations. Configuring OSPF virtual links can solve the problem.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run ospf [ process-id ]

    The OSPF process is started and OSPF view is displayed.

  3. Run area area-id

    The OSPF area view is displayed.

  4. Run vlink-peer router-id [ dead dead-interval | hello hello-interval | retransmit retransmit-interval | trans-delay trans-delay-interval | [ simple [ [ plain ] plain-text | cipher cipher-text ] | { md5 | hmac-md5 | hmac-sha256 } [ key-id { plain plain-text | [ cipher ] cipher-text } ] | authentication-null | keychain keychain-name ] | smart-discover ] *

    A virtual link is created. The virtual link must also be configured on the neighboring router.

    The default value is recommended when a virtual link is created. You can modify the value as required. Suggestions for configuring parameters are as follows:
    • The smaller the hello value, the faster the router detects network topology changes, and the more network resources are consumed.
    • If the retransmit value is set too small, LSAs may be retransmitted. Setting the parameter to a large value is recommended on a low-speed network.
    • The authentication modes of a virtual link and the backbone area must be the same.

  5. Run commit

    The configuration is committed.

(Optional) Configuring a Route Selection Rule on the router

You can configure the router to comply with the route selection rule defined in RFC 1583 or RFC 2328.

Context

RFC 2328 and RFC 1583 define the route selection rule differently. After OSPF is enabled on the router, specify a route selection rule based on the router configuration. The router complies with the route selection rule defined in RFC 1583 by default. If the neighboring router complies with the route selection rule defined in RFC 2328, configure the local router to comply with that defined in RFC 2328. This allows all routers in the OSPF area to comply with the same route selection rule.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run ospf [ process-id ]

    The OSPF process view is displayed.

  3. Run undo rfc1583 compatible

    The router is configured to comply with the route selection rule defined in RFC 2328, not RFC 1583.

  4. Run commit

    The configuration is committed.

(Optional) Setting the OSPF Priority

When multiple routing protocols are used to select routes, you can set the OSPF priority to maneuver route selection.

Context

The routing protocols may share and select the routing information because the router may run multiple dynamic routing protocols at the same time. The system sets a priority for each routing protocol. When multiple routing protocols are used to select routes, the route selected by the routing protocol with a higher priority takes effect.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run ospf [ process-id ]

    The OSPF process view is displayed.

  3. Run preference [ ase | inter | intra ] { preference | route-policy route-policy-name | route-filter route-filter-name } *

    The OSPF priority is set.

    • ase: sets the priority of the AS-External route.

    • inter: sets the priority of the Inter-area route.

    • intra: sets the priority of the Intra-area route.

    • preference: sets the priority for OSPF. The smaller the value, the higher the priority.

    • route-policy-name: sets the priority for specified routes in the routing policy.

    • route-filter-name

      : sets the priority for specified routes in the route-filter policy.

  4. Run commit

    The configuration is committed.

(Optional) Configuring the Maximum Number of Packet Retransmission Attempts

When no response to DD packets, LSU packets, or LSR packets is received, the retransmission mechanism is used and the maximum number of packet retransmission attempts is set to prevent dead loops caused by repeated transmissions.

Context

If no response is received when the maximum number of packet retransmission attempts is reached, the neighbor relationship will be interrupted.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run ospf [ process-id ]

    The OSPF process view is displayed.

  3. Run retransmission-limit [ max-number ]

    The maximum number of OSPF packet retransmission attempts is set.

  4. Run commit

    The configuration is committed.

(Optional) Setting an Interval at Which an LSA Packet Is Retransmitted to the Neighboring router

You can control packet retransmission and improve the convergence rate by setting an interval at which an LSA packet is retransmitted to the neighboring router.

Context

After sending an LSA packet to the neighboring router, the router waits for a response. If no response is received within the set interval, the router retransmits the LSA packet to the neighboring router.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run interface interface-type interface-number

    The interface view is displayed.

  3. Run ospf timer retransmit interval

    An interval at which an LSA packet is retransmitted to the neighboring router is set.

    Setting the interval to a proper value is recommended. A rather small interval will cause unnecessary retransmission. The interval is generally longer than a round trip of one packet transmitted between two routers.

  4. Run commit

    The configuration is committed.

(Optional) Configuring an Interface to Fill in a DD Packet with the Interface MTU

You can configure an interface to fill in the Interface MTU field of a DD packet with the interface MTU.

Context

Different default MTUs may be used on devices provided by different vendors. To ensure consistency, the MTU is set to 0 by default when the interface sends DD packets.

Setting the MTU in a DD packet will have the neighbor relationship reestablished.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run interface interface-type interface-number

    The interface view is displayed.

  3. Run ospf mtu-enable

    The interface is configured to fill in a DD packet with the interface MTU and check whether the MTU in the DD packet from the neighboring router exceeds the MTU of the local router.

  4. Run commit

    The configuration is committed.

Verifying the Basic OSPF Configuration

After configuring basic OSPF functions, verify information about OSPF neighbors, interfaces, and routes.

Prerequisites

Basic OSPF functions have been configured.

Procedure

  • Run the display ospf [ process-id ] abr-asbr [ router-id ] command in any view to check information about the ABRs and ASBRs of OSPF.
  • Run the display ospf [ process-id ] cumulative command in any view to check information about OSPF statistics.
  • Run the display ospf [ process-id ] peer command in any view to check information about OSPF neighbors.
  • Run the display ospf [ process-id ] nexthop command in any view to check information OSPF next hop information.
  • Run the display ospf [ process-id ] error [ lsa | interface interface-type interface-number ] command in any view to check information about OSPF error information.
  • Run the display ospf [ process-id ] vlink command in any view to check information about OSPF virtual links.
  • Run the display ospf [ process-id ] interface [ all | no-peer | interface-type interface-number ] [ verbose ] command in any view to check information about OSPF interfaces.
  • Run the display ospf [ process-id ] routing command in any view to check information about the OSPF routing table.
  • Run the display ospf [ process-id ] topology [ area area-id ] [ statistics | verbose ] command in any view to check information about the topology calculated for OSPF routes.
  • Run the display ospf [ process-id ] spf-statistics [ verbose ] command in any view to check information about route calculation statistics in OSPF processes.
  • Run the display ospf [ process-id ] request-queue [ interface-type interface-number ] [ neighbor-id ] command in any view to check information about OSPF request list.
  • Run the display ospf [ process-id ] retrans-queue [ interface-type interface-number ] [ neighbor-id ] command in any view to check information about OSPF retransmission list.
  • Run the display ospf [ process-id ] statistics updated-lsa [ originate-router advertising-router-id | history ] command in any view to check information about the frequent updates of the LSAs that the LSDB receives
  • Run the display ospf [ process-id ] router-id conflict command in any view to check information about router ID conflicts (if any).

Example

Run the display ospf peer command, and you can view the Router IDs, addresses, and status of OSPF neighbors.

<HUAWEI> display ospf peer
          OSPF Process 1 with Router ID 1.1.1.1
                Neighbors

 Area 0.0.0.0 interface 192.168.1.1 ( GE3/0/0 )'s neighbors
 Router ID: 2.2.2.2         Address: 192.168.1.2
   State: Full       Mode:Nbr is  Slave   Priority: 1
   DR: 192.168.1.4   BDR: 192.168.1.3     MTU: 0
   Dead timer due in  32  sec
   Retrans timer interval: 0
   Neighbor is up for 00:00:03
   Authentication Sequence: [ 0 ]

Run the display ospf vlinkcommand, and you can view the OSPF virtual links.

<HUAWEI> display ospf vlink
          OSPF Process 1 with Router ID 1.1.1.1
                  Virtual Links
 Virtual-link Neighbor-id  -> 2.2.2.2, Neighbor-State: Full
 Interface: 10.1.1.1 (GigabitEthernet1/0/0)
 Cost: 1  State: P-2-P  Type: Virtual
 Transit Area: 0.0.0.1
 Timers: Hello 10 , Dead 40 , Retransmit 5 , Transmit Delay 1
 GR State: Normal

Run the display ospf interface command, and you can view the network types and status of OSPF interfaces.

<HUAWEI> display ospf interface
          OSPF Process 1 with Router ID 1.1.1.1
                  
 Area: 0.0.0.0               MPLS TE not enabled
 Interface                IP Address      Type      State    Cost    Pri
 GigabitEthernet1/0/0     192.168.1.1     P2P       P-2-P    1       100

Run the display ospf routing command, and you can view the destination addresses, link costs, and next hops of OSPF routes. For example:

<HUAWEI> display ospf routing
          OSPF Process 1 with Router ID 1.1.1.1
                   Routing Tables

 Routing for Network
 Destination        Cost       Type       NextHop         AdvRouter       Area

 172.16.1.0/24      2          Transit    192.168.1.2     3.3.3.3         0.0.0.1
 172.17.1.0/24      3          Inter-area 192.168.0.2     2.2.2.2         0.0.0.0
 192.168.2.0/24     2          Inter-area 192.168.0.2     2.2.2.2         0.0.0.0

 Total Nets: 3
 Intra Area: 1  Inter Area: 2  ASE: 0  NSSA: 0 

Run the display ospf [ process-id ] topology [ area area-id ] [ statistics | verbose ] command, and you can view the information about the topology calculated for OSPF routes.

<HUAWEI> display ospf topology
          OSPF Process 1 with Router ID 9.9.9.9
 Bits :
 B - ABR    E - ASBR    V - VIRTUAL    NT - NSSA translator

 OSPF Area 0.0.0.0 topology
 Type  ID           Bits   Metric   Next-Hop      Interface
 Rtr   8.8.8.8       B       1         11.11.11.1      GigabitEthernet1/0/0
 Rtr   9.9.9.9       E       1         -               -
 Net   11.11.11.1    B       1         11.11.11.2      GigabitEthernet1/0/0
Translation
Download
Updated: 2019-01-03

Document ID: EDOC1100055018

Views: 53964

Downloads: 209

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