In OSPF, routers have to become neighbors first before exchanging link- state advertisements (LSA).After configuring OSPF on routers it will start sending hello packets to each other.The Hello packets also serve as keepalives to allow routers to quickly discover if a neighbor is down. Hello packets also contain a neighbor field that lists the Router IDs of all neighbors the router is connected to.
OSPF routers will only become neighbors if the following parameters within a Hello packet are identical on each router:
- Area ID
- Subnet Mask
- Hello Interval
- Dead Interval