Monday, February 14, 2011

The OSPF Neighbor States

Below describes the OSPF neighbor states in the order of progressing functionality:

Indicates that no Hello packets have been received from the neighbor yet. The router can send Hello packets and waiting to enter into the INIT state. If a router does not receive Hello packets from a neighbor within the RouterDeadInterval (4 missed Hellos) during the fully adjacent state, the neighbor state will change from FULL to DOWN.

This state only applicable for neighbors on NBMA networks. When a neighbor is in this state, it means that no information is received from the neighbor yet, but the local router is constantly sending a unicast Hello packet upon every HelloInterval (instead of the PollInterval) to contact the neighbor.

A router enters this state once received the 1st Hello packet from a neighbor. Upon receiving the Hello packet, the router declares a one-way state because it doesn’t see itself (its Router ID) in the neighbor list in the Hello packet yet. As a result, the 2-way or bidirectional communication is not established yet.

A router enters this state once received the Hello packet that includes itself in the neighbor list, which means that the neighbor has received its Hello packet. This state indicates that bidirectional communication has been established and is the initial stage of neighbor relationship between neighboring routers. The routers cannot exchange routing information yet. The DR/BDR election occurs in this state. As both routers have received the Hello packets from each other and know their physical IP addresses on the broadcast network, subsequent Hello packets would include the DR and BDR information.

This state is used for the initialization of the database synchronization process. The Master-Slave membership between the router and the DR and BDR of the network are elected in this state. The router that has the higher Router ID will be elected as the Master. The initial DD sequence number used for DBD exchange is also being decided in this state. The sequence number is set by the Master to a unique value in its first DD packet, and it is incremented in subsequent DBD packets exchanged between the neighboring routers.

This state is when an OSPF router uses DBD packets to describe all LSAs in its link-state database to a neighbor that is in the EXCHANGE state too for the neighbor to determine whether it has the same LSAs in its link-state database. As multiple DBD packets will be exchanged during the database synchronization process, the Init, More and Master/Slave flags are being used to manage the LSDB exchange via a master-slave polling mechanism.
Note: The DR/BDR is not necessary the Master in an exchange process!

This state is when the exchange of link-state information really occurs. An OSPF router would send only LSA headers instead of the entire LSDB to a neighbor during the EXCHANGE state. An OSPF router would use LSR packets to request more specific, recent, and complete LSAs from a neighbor router in which the link-state information discovered during the EXCHANGE state is not in its LSDB or is more recent than the entry in its LSDB. When a neighbor router received an LSR packet, it would reply with an LSU packet which contains the specific and complete LSAs. An LSAck packet is used to acknowledge the LSU sent from a neighbor router.

The final OSPF neighbor state after the complete database information has been distributed and the link-state databases of routers are fully synchronized.
Note: On broadcast and NBMA networks, a router would only establish FULL state with the DR and BDR. The neighbor state with other non-DR/BDR neighboring routers (DROTHERs) would stay in the 2-WAY state.

No comments:

Post a Comment