Two routers do not become neighbors unless the following conditions are met.
Two way communication between routers is possible. Determined by flooding Hello packets.
Interface should belong to the same area;
Interface should belong to the same subnet and have the same network mask, unless it has network-type configured as point-to-point;
Routers should have the same authentication options, and have to exchange same password (if any);
Hello and Dead intervals should be the same in Hello packets;
External routing and NSSA flags should be the same in Hello packets.