Checking Whether OSPF Neighbor Information Is Displayed

Procedure

  1. Run the display ospf peer command on the device to check OSPF neighbor information.

    <Huawei> display ospf peer
    
             OSPF Process 1 with Router ID 1.1.1.1 
                     Neighbors  
     
     Area 0.0.0.0 interface 10.1.1.1(GigabitEthernet0/0/0)'s neighbors 
     Router ID: 2.2.2.2          Address: 10.1.1.2    
       State: Full  Mode:Nbr is  Master  Priority: 1 
       DR: 10.1.1.2  BDR: None   MTU: 0     
       Dead timer due in 34  sec  
       Retrans timer interval: 5  
       Neighbor is up for 00:00:03      
       Authentication Sequence: [ 0 ] 
    

  2. If no OSPF neighbor information is displayed, check whether the physical status and protocol status of interfaces on both ends are Up and stable and whether the interfaces have lost or error packets.

    If the physical status of the interfaces is not Up or unstable (interfaces flap for example), check the physical link and link layer protocol and ensure that the physical status and protocol status of the interfaces are Up and the interfaces have no error packet statistics.

    Run the ping command to check whether the two switches that need to establish an OSPF neighbor relationship can ping each other successfully and whether packets are lost during a long ping test.

    <Huawei> ping 10.1.1.2
      PING 10.1.1.2: 56  data bytes, press CTRL_C to break 
        Reply from 10.1.1.2: bytes=56 Sequence=1 ttl=255 time=2 ms 
        Reply from 10.1.1.2: bytes=56 Sequence=2 ttl=255 time=2 ms 
        Reply from 10.1.1.2: bytes=56 Sequence=3 ttl=255 time=1 ms 
        Reply from 10.1.1.2: bytes=56 Sequence=4 ttl=255 time=1 ms 
        Reply from 10.1.1.2: bytes=56 Sequence=5 ttl=255 time=2 ms 
     
      --- 10.1.1.2 ping statistics --- 
        5 packet(s) transmitted 
        5 packet(s) received 
        0.00% packet loss 
        round-trip min/avg/max = 1/3/13 ms
    

  3. If the two devices can ping each other successfully but no OSPF neighbor information is displayed, check whether OSPF is running normally on the local interface.
    1. Check whether the primary IP address of the local interface belongs to the network segment specified by the network command.

      Run the display ospf [ process-id ] interface [ all | interface-type interface-number ] command on the interface to check whether the interface advertises its primary IP address to the specified OSPF process.

      NOTE:
      Devices cannot establish OSPF neighbor relationships using secondary IP addresses of interfaces. Therefore, ensure that the local interface advertises its primary IP address to the specified OSPF process. If only the secondary IP address of this interface belongs to the network segment specified by the network command, OSPF does not run on this interface.
      <Huawei> display ospf 1 interface
       
        OSPF Process 1 with Router ID 1.1.1.1 
         Interfaces  
       Area: 0.0.0.0          (MPLS TE not enabled) 
       IP Address      Type         State    Cost    Pri   DR              BDR  
       10.1.1.1        Broadcast    DROther  1       1     10.1.1.4        10.1.1.3
      

      If the primary IP address of the interface does not belong to the network segment specified by the network command, run the network network-address wildcard-mask command in the specified OSPF process to advertise this primary IP address.

      <Huawei> system-view
      [Huawei] ospf 1
      [Huawei-ospf-1] area 1
      [Huawei-ospf-1-area-0.0.0.1] network 10.1.1.1 0.0.0.0
      [Huawei-ospf-1-area-0.0.0.1] return
      <Huawei>

      Alternatively, run the ospf enable process-id area area-id command on the interface to run OSPF on this interface.

      <Huawei> system-view
      [Huawei] interface GigabitEthernet 0/0/0
      [Huawei-GigabitEthernet0/0/0] ospf enable 1 area 1
      [Huawei-GigabitEthernet0/0/0] return
      <Huawei>

    2. Check whether the interface is configured as a silent interface.

      A silent interface is prohibited from receiving and sending OSPF packets. Subsequently, an OSPF neighbor relationship cannot be established on this interface.

      <Huawei> display current-configuration configuration ospf 
      [V200R007C00SPC900]
      #
      ospf 1 router-id 1.1.1.1 
       silent-interface GigabitEthernet0/0/0 
       area 0.0.0.0 
        network 12.1.1.1 0.0.0.0 
       area 0.0.0.1 
        network 10.1.1.1 0.0.0.0
      #
      return
      <Huawei>
      

      If this interface is configured as a silent interface, modify the interface configuration in the specified OSPF process.

      <Huawei> system-view
      [Huawei] ospf 1
      [Huawei-ospf-1] undo silent-interface GigabitEthernet 0/0/0
      [Huawei-ospf-1] return
      <Huawei>
      

  4. Check that correct OSPF parameters have been configured for interfaces on both ends.

    Run the display ospf [ process-id ] error interface interface-type interface-number command multiple times to check OSPF parameter error statistics during OSPF neighbor relationship establishment. Run this command once every 10 seconds, and compare the displayed statistics, especially continuously increasing statistics. Ensure that OSPF parameters are configured correctly.

    To ensure that OSPF parameters are configured correctly, perform the following operations:

    1. Check that router IDs in OSPF processes on both ends are unique.

      Each router ID in an OSPF process must be unique. Otherwise, an OSPF neighbor relationship cannot be established and routing information is incorrect.

      # Check the router ID in OSPF process 1.

      <Huawei> display ospf 1 brief
       
               OSPF Process 1 with Router ID 1.1.1.1 
                       OSPF Protocol Information 
       
       RouterID: 1.1.1.1          Border Router:  
       Multi-VPN-Instance is not enabled 
       Global DS-TE Mode: Non-Standard IETF Mode 
       Graceful-restart capability: disabled
      

      If router IDs in OSPF processes on both ends are not unique, change the router IDs to make them unique. To make the new router IDs take effect, restart the two OSPF processes in the user view.

      <Huawei> system-view
      [Huawei] ospf 1 router-id 1.1.1.1
      [Huawei-ospf-1] return
      <Huawei> reset ospf 1 process
      Warning: The OSPF process will be reset. Continue? [Y/N]:y
      

    2. Check that OSPF area IDs and area types of interfaces on both ends are consistent.

      OSPF area IDs and area types (for example, NSSA, stub area, or common area) of interfaces on both ends must be consistent. Otherwise, an OSPF neighbor relationship cannot be established between the two interfaces. To check the OSPF area ID and area type of the local interface, run the display ospf [ process-id ] brief command.

      <Huawei> display ospf 1 brief
       
               OSPF Process 1 with Router ID 1.1.1.1 
                       OSPF Protocol Information 
       
       RouterID: 1.1.1.1          Border Router:  AREA  AS  
       ¡­¡­ 
        
       Area: 0.0.0.1          (MPLS TE not enabled) 
       Authtype: None   Area flag: Stub  
       SPF scheduled Count: 4      
       ExChange/Loading Neighbors: 0 
       Router ID conflict state: Normal 
       Area interface up count: 1 
       
       Interface: 10.1.1.1 (GigabitEthernet0/0/0) 
       Cost: 1       State: Waiting    Type: Broadcast    MTU: 1500   
       ¡­¡­
      

      If OSPF area IDs of interfaces on both ends are inconsistent, change them to be consistent.

      # 10.1.1.1/32 was first advertised to Area 1 and now advertised to Area 0.

      <Huawei> display current-configuration configuration ospf 
      [V200R007C00SPC900] 
      #
      ospf 1 router-id 1.1.1.1 
       area 0.0.0.0 
        network 12.1.1.1 0.0.0.0 
       area 0.0.0.1 
        network 10.1.1.1 0.0.0.0 
      #
      return
      <Huawei> system-view
      [Huawei] ospf 1
      [Huawei-ospf-1] area 1
      [Huawei-ospf-1-area-0.0.0.1] undo network 10.1.1.1 0.0.0.0
      [Huawei-ospf-1-area-0.0.0.1] quit
      [Huawei-ospf-1] area 0
      [Huawei-ospf-1-area-0.0.0.0] network 10.1.1.1 0.0.0.0
      [Huawei-ospf-1-area-0.0.0.0] return
      <Huawei>

      If OSPF area types of interfaces on both ends are inconsistent, change them to be consistent. By default, the OSPF area type is Normal.

      # Change area type of Area 1 to stub.

      <Huawei> system-view
      [Huawei] ospf 1
      [Huawei-ospf-1] area 1
      [Huawei-ospf-1-area-0.0.0.1] stub
      [Huawei-ospf-1-area-0.0.0.1] return
      <Huawei>
      

    3. Check that OSPF authentication modes and passwords on the two devices are consistent.

      If OSPF authentication is configured on the two switches, the two devices must use the same authentication mode and password. Otherwise, the two devices cannot establish an OSPF neighbor relationship.

      # Check whether OSPF authentication is configured on GE0/0/0.

      <Huawei> display current-configuration interface GigabitEthernet0/0/0
      [V200R007C00SPC900]
      #
      interface GigabitEthernet0/0/0 
       ip address 10.1.1.1 255.255.255.0 
       ip address 10.2.1.1 255.255.255.0 sub 
       ospf authentication-mode md5 1 cipher %@%@z#UE)ok^"*^=IMJ36>$41FVP%@%@ 
      #
      return
      

      # Check whether OSPF authentication is configured in the specified OSPF area.

      <Huawei> display current-configuration configuration ospf
      [V200R007C00SPC900]
      #
      ospf 1 router-id 1.1.1.1 
       area 0.0.0.0 
        authentication-mode md5 1 cipher %@%@N^O.C,IYy$d=sTMMlXYU1@n.%@%@     
        network 10.1.1.1 0.0.0.0 
        network 12.1.1.1 0.0.0.0 
       area 0.0.0.1
      #
      return
      

      If OSPF authentication modes or passwords on the two devices are inconsistent, change them to be consistent in the required view according to the configured authentication mode (interface authentication or area authentication).

      # Configure OSPF area authentication in Area 0, authentication mode to MD5, authentication identifier to 1, and password to huawei. OSPF authentication modes, authentication identifiers, and passwords in Area 0 must be consistent.

      <Huawei> system-view
      [Huawei] ospf 1
      [Huawei-ospf-1] area 0
      [Huawei-ospf-1-area-0.0.0.0] authentication-mode md5 1 cipher huawei 
      [Huawei-ospf-1-area-0.0.0.0] return
      <Huawei>
      

    4. Check that OSPF interfaces on both ends have the same network type, intervals for sending Hello packets, and neighbor dead interval configured.

      OSPF interfaces on both ends must have the same network type, interval for sending Hello packets, and neighbor dead interval configured. Otherwise, an OSPF neighbor relationship cannot be established and routing information is incorrect.

      # Run the display ospf interface verbose command to check the network type, interval for sending Hello packets, and neighbor dead interval.

      <Huawei> display ospf interface verbose 
       
               OSPF Process 1 with Router ID 1.1.1.1 
                       Interfaces  
       
       Area: 0.0.0.0          (MPLS TE not enabled) 
       
       Interface: 10.1.1.1 (GigabitEthernet0/0/0) 
       Cost: 1       State: Down      Type: Broadcast    MTU: 1500   
       Priority: 1 
       Designated Router: 0.0.0.0 
       Backup Designated Router: 0.0.0.0 
       Timers: Hello 10 , Dead 40 , Poll  120 , Retransmit 5 , Transmit Delay 1  
        IO Statistics 
        ¡­¡­
      

      If OSPF interface network types on both ends are inconsistent, change them to be consistent.

      # Set the OSPF network type to broadcast for GE0/0/0.

      <Huawei> system-view
      [Huawei] interface GigabitEthernet 0/0/0
      [Huawei-GigabitEthernet0/0/0] ospf network-type broadcast 
      [Huawei-GigabitEthernet0/0/0] return
      <Huawei>
      

      If the interval for sending Hello packets and neighbor dead interval on both ends are inconsistent, change them to be consistent.

      # Set the interval for sending Hello packets to 10s and neighbor dead interval to 40s on GE0/0/0.

      <Huawei> system-view
      [Huawei] interface GigabitEthernet 0/0/0
      [Huawei-GigabitEthernet0/0/0] ospf timer hello 10 
      [Huawei-GigabitEthernet0/0/0] ospf timer dead 40
      [Huawei-GigabitEthernet0/0/0] return
      <Huawei>
      

    5. Check whether OSPF interfaces on both ends use the same IP address mask.

      The IP address masks of OSPF interfaces on both ends must be the same. Otherwise, the two OSPF interfaces cannot establish an OSPF neighbor relationship.

      <Huawei> display current-configuration interface GigabitEthernet 0/0/0
      [V200R007C00SPC900]
      #
      interface GigabitEthernet0/0/0 
       ip address 10.1.1.1 255.255.255.0 
      #
      return
      

      If IP address masks of OSPF interfaces on both ends are inconsistent, change them to be consistent.

      <Huawei> system-view
      [Huawei] interface GigabitEthernet 0/0/0
      [Huawei-GigabitEthernet0/0/0] ip address 10.1.1.1 24
      [Huawei-GigabitEthernet0/0/0] return
      <Huawei>
      

Back | Next


Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.