OSPF

OSPF Neighbor States

ospf-neighbor-stats

 

OSPF neighbor states is the states that a router will go through in order  to form a full relationship.

full relationship is called full adjacency, so it might happened that two routers have formed a neighbor relationship but because of some error they can’t proceed to full relationship. so they are neighbors but not full adjacent.

some routers are meant to stop at the 2-way state with some routers and full with other routers .

1: Down state 

  • if a router has a full relation with another, but for some reason they communication has stopped, the ospf will move the neighbor from full to down , generate a console message and remove it from the neighbors list

2: Attempt

  • this state will only be used for manually configured neighbors.
  • it means that a router is trying to communicate with its neighbor by sending hello’s to it .
  • hello’s that sent to manually configured neighbor are unicast , while normal hellos are multicast

3: Init

  • this state mean that a router received a hello from another router but his router id is not in the neighbor list inside that hello.
  • as a result for this, the receiving router will list the sender router id on the neighbor field inside its hellos.

4: 2-way 

  • A router will move to this state when the received hello include his router id on the neighbor field inside the hello
  • Now both routers see each other hello’s, and they are ready to move to the next step.

The first step will be Dr/BDR election and these are the winning rules ( per segment ).

  1. highest priority ( default is 1 ) ( zero priority = don’t participate on the election )
  2. highest router id ( the sub point indicate how the router id get assigned )
    1. hardcode via command.
    2. highest loop back address.
    3. highest physical addres.
  • unfortunately these election rules will only happen in the la la land, or by a magic way you managed to start all devices at the same time.
    • because first router will come online will elect itself as DR, and election will not happen again for that segment , unless of course the DR/BDR failed . and that’s why you use tweaks like priority 0 to prevent some router from entering the election from the first place.

after these election some routers neighbors will continue to full state and other will stop here at 2-way.  

  • In point-to-point router will form full adjacent with the next router .
  • In broadcast on non-broadcast a router will form
    • full adjacency with the DR and BDR only.
    • 2-way with other routers.

example :


that how the DR see other routers:

R1#show ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
2.2.2.2           1   FULL/BDR        00:00:37    10.10.10.2      FastEthernet0/0
3.3.3.3           1   FULL/DROTHER    00:00:32    10.10.10.3      FastEthernet0/0
4.4.4.4           1   FULL/DROTHER    00:00:37    10.10.10.4      FastEthernet0/0
5.5.5.5           1   FULL/DROTHER    00:00:31    10.10.10.5      FastEthernet0/0

that’s how non-DR see other routers:

R5#show ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
1.1.1.1         255   FULL/DR         00:00:34    10.10.10.1      FastEthernet0/0
2.2.2.2           1   FULL/BDR        00:00:36    10.10.10.2      FastEthernet0/0
3.3.3.3           1   2WAY/DROTHER    00:00:32    10.10.10.3      FastEthernet0/0
4.4.4.4           1   2WAY/DROTHER    00:00:36    10.10.10.4      FastEthernet0/0
  •  each router will have full/DR & full/BDR and 2-way with other routers .
  •  DR/BDR will have full with every one of them.

the next stages will be for routers that is going to the full state. but i wont go to much details about them.

5: Exstart 

  • before the exchange, Master and slave election are made, highest RID is the Master and it start the Exchange and determine the start sequence number
  • the DR/BDR can be a slave if they have lower RID, and the priority made them become DR/BDR.

6: Exchange 

  • Exchange the DBD that contain link state advertisement Headers, which describe the whole the database.

Problem : neighbor stuck on Exstart/Exchange

  • check MTU mismatch.

7 : loading

  • the actual exchange of link state information.
  • the router will check the DBD header that he receive during the exchange and will send LSA request for the missing part’s and the respond will be on LSA update .

8 : full 

  • done .

 

General information :

  • all DBD are resent every 30 minute.
  • a route will be deleted after an hour, so it gets a refresh every 30 min.
Standard

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.