If the physical status of the interfaces is not Up or unstable (interfaces flap for example), check whether the link connection is normal and whether the protocol status of the interfaces is Up. Ensure that no error packet statistics exist on the interfaces.
If packet loss occurs during the ping test, check whether the MTUs of device interfaces along which ping packets travel are properly set.
Run the display ospf [ process-id ] brief command on the two devices respectively to check the OSPF process router IDs of them.
Each router ID in an OSPF process must be unique on the entire network. Otherwise, devices on both ends of the link cannot establish an OSPF neighbor relationship, and routing information will be incorrect.
If the two devices have the same OSPF process router ID, run the ospf [ process-id ] router-id router-id command in the system view to change the OSPF process router IDs and ensure that the two devices have different OSPF process router IDs.
After changing an OSPF process router ID, run the reset ospf [ process-id ] process command in the user view to make the new router ID take effect.
Run the display ospf [ process-id ] brief command on the two devices respectively to check the OSPF area IDs of them.
If the two devices have different OSPF area IDs, run the area area-id command in the OSPF view to change the OSPF area IDs and ensure that the two devices have the same OSPF area ID.
Run the display ospf [ process-id ] interface command on the two devices respectively to check the OSPF interface network types of them.
The OSPF interfaces on both ends of a link must have the same network type; otherwise, the two interfaces cannot establish an OSPF neighbor relationship.
If the network types of the two OSPF interfaces are different, run the ospf network-type { broadcast | nbma | p2mp | p2p } command in the OSPF interface view to change the OSPF interface network types and ensure the network type consistency between the two interfaces.
If the network types of OSPF interfaces on both ends of the link are NBMA, run the peer ip-address [ dr-priority priority ] command in the OSPF view to configure NBMA neighbors.
Run the display current-configuration interface interface-type interface-number command on the two devices respectively to check the IP addresses of the specified OSPF interfaces on the devices.
The OSPF interfaces on both ends of a link must have the same IP address mask; otherwise, the two interfaces cannot establish an OSPF neighbor relationship. On a P2MP network, to disable devices from checking the network masks so that an OSPF neighbor relationship can be established, run the ospf p2mp-mask-ignore command in the OSPF interface view.
If the two OSPF interfaces have different IP address masks, run the ip address ip-address { mask | mask-length } command in the OSPF interface view to change the IP address masks and ensure the IP address mask consistency between the two interfaces.
Run the display current-configuration interface interface-type interface-number command on the two devices respectively to check IP addresses of the OSPF interfaces on both ends of the link, and run the display current-configuration configuration ospf command on the two devices respectively to check the OSPF process configuration.
OSPF can run on an interface only when the following conditions are met:
If the IP address of an interface does not meet the preceding conditions, run the ip address ip-address { mask | mask-length } command in the OSPF-enabled interface view to change the IP address of the interface. Alternatively, in the view of the area to which the OSPF process belongs, run the network command to change the configured network segment so that the IP address of the interface can meet the preceding conditions.
Run the display ospf [ process-id ] interface command on the two devices respectively to check the DR priorities of the OSPF interfaces.
On a broadcast or NBMA network, at least one OSPF interface needs to have a DR priority higher than 0 so that the DR can be elected. Otherwise, the neighbor status of devices on both ends of the link only can reach 2-Way.
If the DR priorities of the two OSPF interfaces are both 0, run the ospf dr-priority priority command in the OSPF interface view to change the DR priorities. Ensure that there is at least one OSPF interface has a DR priority higher than 0.