"OSPF routers go through the seven different states 'while building neighborship
with other routers' or 'before the neighbor is considered fully adjacent'. or if i
use the ""sh ip ospf neighbor"" command on R1 to check all my neighbor status, I can get something like - DOWN - Means no hello sent or received (heared) by R1/R2 interfaces or ospf is disable or link is down. ATTEMPT - Comes into picture when we are using unicast hello (like NBMA network using frame relay, where we have configured neighbor manually). So Normally when you are running OSPF over Frame-Relay with Network Type Non-Broadcast or DMVPN with network Type Non-Broadcast, your router will go from down to Attempt during Neighbor relationship establishement. If i see a neighbor as attempt state, it means i am trying to get to that neighbor or I have (R1) sent a unicast hello on NBMA network but no hello received back because of some issue at layer 2, like ospf (L3) is sending hello but due to L2 issue, its getting drop or not reaching to R2. INIT - Comes into picture when we are using Multicast hello (like Using Ethernet in Broadcast network). So Normally when you are running OSPF over ethernet your router will go from down to Init during neigbor relationship establishment. If i see a neighbor as init state which means I have sent a hello and i also have received a hello packet from that neighbor, however my router ID is not listed in the neighbor field of that received hello or bidirectional communication has not been established yet with that neighbor. If OSPF Hello parameters and values does not matches, then ospf routers will never progress beyond this state." "2-WAY - If i see a neighbor as 2-way state which means I have sent you a hello and you have received my hello and acknowledge my hello (or sent your hello) by putting my router id in your hello packet neighbor field. so let me go ahead and reset the dead timer of that neighbor in my neighbor table. Meaning we have Bi- directional communication or It means L2 transport is working. If router is not able to get to 2-Way state - it means there is something wrong with the L2 network like May be OSPF is filterd somewhere, or May be multicast is not supported or some other L1 issue like Link or interface down that stopping the router from communicating. If i have 4 router connected with a switch, R1, R2, R3 are Drother and R4 is DR and R5 is BDR. All the Drother routers (R1,R2,R3), will form neighbor adjacency with each other and stay in this state Meaning they can see each other but they won't exchange any LSA. In R1,R2,R3 neighbor table it has R4 (DR) and R5 (BDR) listed as full state and they can exchange LSA only with DR/BDR router." "Ex-START - It is First step of forming the actual adjacency between R1 and R2. Master slave election happens here - for the exchange of DBD packets (and in that DBD Seq. no is being negotiated), meaning once the DR and BDR are elected after 2- way state , the routers and their DR and BDR establish a master-slave relationship for LSDB syncing (Becuase Routers who decided to build adjacency will form a master / slave relationship) . R1 send its DBD (with DBD header only without LSA header or data is empty and set seq no. as 123) to R2, R2 will ignore that and send its own DBD (empty with seq no. 254) to R1, saying hey i am the master because i have highest priority (Router with higher router-id becomes master) you should use my DBD seq no. for further communication. (By default Priority is 1, and if it ties then router with highest router id becomes master). Then R1 will accept that and says ok i am slave, i will use your seq no. 253. EXCHANGE - In Exchange state Routers exchange the DBD Packets with LSA header (LSA body empty) inside of it. Meaning R4 send its DBD packet to R5, Saying here is the LSA header of R1, R2 and R3 which I have got, but the body of each LSA will be empty. [ Why empty LSA header is might be R5 already having the LSA of R2 and R3 but Not R3 becuse we added R3 link just a while ago). So In exchange state router exchange their DBD packet (with each router LSA header but data is emty inside LSA header) with each other to see if their database is synchronized or identical or not, meaning each router having the same LSA or not. LOADING - And in Loading state - R5 sees that and says, oh i don't have R3 LSA in my LSDB, so R5 will send a LSR packet to R4, Then R4 will send that LSA in LSU packet, after R5 will send a LSAck packet stating i have received that LSA. So exchange of LSR and LSU packet is happen in the loading state based on the information provided by the DBD in Exchange state."