Wednesday, 17 April 2019

OSPF Series 2: OSPF Neighbor States, OSPF Interface States and OSPF Neighborship Formation Requirements

OSPF NEIGHBOR STATES:

    • The below are the neighbour OSPF states:

\1. Down: no OSPF neighbors detected at this moment.

\2. Init: Hello packet received.

\3. Two-way: own router ID found in received hello packet. Then, DR and BDR determined

\4. Exstart: master and slave roles determined.

\5. Exchange: database description packets (DBD) are sent.

\6. Loading: exchange of LSRs (Link state request) and LSUs (Link state update) packets.

\7. Full: OSPF routers now have an adjacency.

  • http://www.computernetworkingnotes.com/ccna-study-guide/ospf-neighbor-states-explained-with-example.html ---> Crazy document (see this to understand everything)

  • Also, only DR-BDR, DR-DRO, BDR-DRO can go to exstart state after the Two-way state. DRO-DRO will always be in two-way state only as they won’t communicate between each other.

  • Routers use a multicast address 224.0.0.6 to update the DR.

  • DR uses a multicast address 224.0.0.5 to update the all routers.

  • Priority value is 8 bit in length. Default priority value is 1. We can set any value from range 0 to 255. We can change it from Interface Sub-configuration mode with #ip ospf priority command.

  • Till 2-way start, all communication happens using Hello Packets and uses Multicast destination IP address.

  • Exstart State: The Master-Slave is decided by the Election Process in Exstart State:

    • During the first, both the master and slave sets init bit as well as master bit in DBD and sends to each other. Here, the master and slave both use a random sequence number.
    • Then, after they receive each other’s DBD, they elect on the master using each others’ Router ID- ELECTION PROCESS
    • From now on, the init bit becomes 0 for both master and slave. Also, the master sets its master bit as 1 and the slave sets its master bit as 0.
    • From now on, they continue with the sequence number of the Master. The slave also replies with the sequence number of master itself.
    • For next DBD, the master increments sequence number by 1 and sends to slave.
  • Exchange State:

    • First, we get DBD from our neighbours .ie. either master or slave on each of the interfaces. (but only the master can start sending DBD first)
    • We compare the DBD information with the information already there in our LSD (Link State database)
    • If we don’t have any information, we use LSR (link State Request) to ask for the missing information. It is very specific to the missing information. (If many information is missing, it sends LSR in multiple sequence numbers)
    • The router which is requesting is in exchange state and the router which is sending LSU (Link State Update) for that request is in loading state on each other’s neighbor state table.
  • Loading State:

    • If any neighbor router (R2) is requesting data from R1, we move that device to exchange state in R1’s neighbor state table. (In R1, R2’s state will be Exchange)
    • In R2, since we are loading data from other device R1, it will be in loading state. (In R2, R1’s state is Loading)
    • Only after one router (R2) stops the LSRs to R1, the other router (R1) can request R2.
  • Full State:

    • If R2 has completed all LSR to R1, then, we send DBD with More bit as 0. Then, R1 moves the R2 to Full State in its neighbor state table.
    • Similarly, after R1 completes loading all information, it also moves into Full state.

OSPF NEIGHBORSHIP FORMATION REQUIREMENTS:

http://www.computernetworkingnotes.com/ccna-study-guide/ospf-neighborship-condition-and-requirement.html

  • In order to become OSPF neighbor following values must be match on both routers.

    • Area ID
    • Netmask
    • Authentication
    • Hello and Dead Intervals
    • Stub Flag
    • MTU Size (neighborship gets formed, but adjacency cannot be formed)
  • Even though MTU is not a requirement, if they don’t match problem occurs as the LSU packets can be larger than the smaller router’s MTU. So, the RFC specifies that if a router notices that the MTU advertised by the other router is larger than its interface MTU in the OSPF DBD packet, then, immediately drop that packet and avoid further connection in-order to prevent adjacency formation. SO, the two routers will be stuck in Exchange/Exstart state. To solve it, make the MTU of both routers same.

 

OSPF INTERFACE STATES: (not that important)

  • The states are there for both (own) Interface as well as Neighbour

  • The Interface states are:

    • Down
    • Loopback
    • Waiting
    • Point to Point
    • Other DR
    • BDR
    • DR

No comments:

Post a Comment