OSPF Neighbor States

When OSPF adjacency is formed, a router goes through several state changes before it becomes fully adjacent with its neighbor. Those states are defined below:


Down
  • This is the first OSPF neighbor state.
  • It means that no hellos have been received from this neighbor, but hello packets can still be sent to the neighbor in this state.

Attempt
  • This state is only  valid for manually configured neighbors in an NBMA environment.
  • In Attempt state, the router sends unicast hello packets every poll interval to the neighbor, from which hellos have not been received within the dead interval.

    Init
    • This state specifies that the router has received a hello packet from its neighbor, but the receiving router's ID was not included in the hello packet.
    • When a router receives a hello packet from a neighbor, it should list the sender's router ID in its hello packet as an acknowledgment that it received a valid hello packet.
      
    2-Way
    • This state designates that bi-directional communication has been established between two routers. Bi-directional means that each router has seen the other's hello packet.
    • This state is attained when the router receiving the hello packet sees its own Router ID within the received hello packet's neighbor field.
    •  At the end of this stage, the DR and BDR for broadcast and non-broadcast multiacess networks are elected.
     Exstart
    • In this state, the routers establish a master-slave relationship and choose the initial sequence number for adjacency formation.
    • The router with the higher router ID becomes the master and starts the exchange.
    •  Master is the only router that can increment the sequence number of DBD packets in next stage.

    Exchange
    • In the exchange state, OSPF routers exchange database descriptor (DBD) packets.
    • Master initiates the exchange of DBD packets, which are explicitly acknowledged by slave.
    • Database descriptors contain link-state advertisement (LSA) headers only and describe the contents of the entire link-state database.
    • The contents of the DBD received are compared to the information contained in the routers link-state database to check if new or more current link-state information is available with the neighbor.

    Loading
    • In this state, the actual exchange of link state information occurs.
    • Based on the information provided by the DBDs, routers send link-state request packets. The neighbor then provides the requested link-state information in link-state update packets.

     Full
    • In this state, routers are fully adjacent with each other. All the router and network LSAs are exchanged and the routers' databases are fully synchronized. 
    Full is the normal state for an OSPF router. If a router is stuck in another state, it's an indication that there are problems in forming adjacencies. The only exception to this is the 2-way state, which is normal in a broadcast network. Routers achieve the full state with their DR and BDR only. Neighbors always see each other as 2-way.

    Comments

    Popular posts from this blog

    Specifying SSH port in Ansible Inventory

    Ansible-Playbook to display output of multiple show commands (using stdout_lines with Loop)

    Filtering Routes in BGP using Route-maps and Prefix-list

    Ansible Playbook for Network OS Upgrade with pre and post checks

    Bypassing Proxy Server in Google Chrome

    VMware NSX Traffic Flow — East-West & North-South

    Export or Backup Azure Network Security Groups into CSV using PowerShell

    Ansible-playbook for backing up running config of Cisco IOS