OSPF - manual neighbor configuration
These network types don't inherently support broadcast or multicast capabilities for OSPF Hello packets. Thus, in order to form neighbor adjacencies, OSPF requires that a manual configuration of the neighbors be implemented so that unicast Hello packets can be sent directly to the indicated IP address. This can be done using the
neighbor command under the
ospf router configuration mode. An example of such a configuration can be found below:
R1(config)#router ospf 1 R1(config-router)#neighbor 192.168.123.2 R1(config-router)#neighbor 192.168.123.3
In the above configuration, two neighbors have been manually configured.
When this is configured, an interesting behavior will be noted:
When you configure one OSPF router with the
neighbor command, that router starts sending unicastunicast Hello packets to the specified neighbor. The receiving router (even if it hasn’t been configured with the corresponding neighbor command yet) will see those Hello packets and process them. If the Hello packets meet the criteria for forming an adjacency (matching area, subnet, hello/dead timers, etc.), the receiving router will respond with its own Hello packets and an adjacency can form.
So you can form an adjacency with the
neighbor command applied only to one of the OSPF routers.
However, this doesn’t mean the configuration is complete or optimal. For a resilient and predictable OSPF over NBMA network, both sides should be manually configured with neighbor commands to ensure that unicast Hellos are initiated in both directions. This also ensures that if one side is restarted or its OSPF process is reset, it will still attempt to re-establish the adjacency once it comes back up.
Although the OSPF adjacency can form with just one side configured, you should always configure both sides for best practices and operational predictability.