Five packets are used to build the routing table on a new OSPFconfigured router. These are the Hello protocol; the database descriptor, which is used to send summary information to neighbors to synchronize topology databases; the link-state request, which works as a request for more detailed information that is sent when the router receives a database descriptor that contains new information; the link-state update, which works as the link-state advertisement (LSA) packet issued in response to the request for database information in the
link-state request packet; and the link-state acknowledgement, which acknowledges the link-state update.
When the new OSPF-configured router is connected to the network, it must learn the network from the
routers that are up and running. The router goes through three stages while exchanging information: the
down state, the init stage, and the two-way state. You can check what stage an interface running OSPF is in
by using the show ip ospf neighbor command or the debug ip ospf adjacency command.
• The new router starts in a down state. It transmits its own Hello packets to introduce itself to the
segment and to find any other OSPF-configured routers. This is sent out as a Hello to the multicast
address 224.0.0.5 (AllSPFRouters). It sets the designated router (DR) and the backup designated
router (BDR) in the Hello to 0.0.0.0. While the new router waits for a reply, which usually is four times the length of the Hello timer, the router is in the init state. Within the wait time, the new router hears a Hello from another router and learns the DR and the BDR. If there is no DR or BDR stated in the incoming Hello, an election takes place.
• Once the new router sees its own router ID in the list of neighbors, and a neighbor relationship is established, it changes its status to the two-way state. The new router and the DR have now established a neighbor relationship and need to ensure that the new
router has all the relevant information about the network. The DR must update and synchronize the topology
database of the new router. This is achieved by using the exchange protocol with the database description
packets (DDPs). There are four different stages that the router goes through while exchanging routing
information with a neighbor: the exstart state, the exchange state, the loading state, and the full state.
• During the exstart state, one of the routers will take seniority and become the master router, based on
highest IP interface address.
• Both routers will send out database description packets, changing the state to the exchange state. At this
stage, the new router has no knowledge and can inform the DR only of the networks or links to which it
is directly connected. The DR sends out a series of DDPs containing the networks, referred to as links
that are held in the topology database. Most of these links have been received from other routers via linkstate
advertisements (LSAs). The source of the link information is referred to by the router ID. Each link
will have an interface ID for the outgoing interface, a link ID, and a metric to state the value of the path.
The DDPs will contain a summary rather than all the necessary information. When the router has
received the DDPs from the neighboring router, it compares the received network information with that
in its topology table. In the case of a new router, all the DDPs are new.
• If the new router requires more information, it will request that particular link in more detail using the
link-state request packet (LSR). The LSR will prompt the master router to send the link-state update
packet (LSU). This is the same as a LSA used to flood the network with routing information. While the
new router is awaiting the LSUs from its neighbor, it is in the loading state.
• When these LSRs are received and the databases are updated and synchronized, the neighbors are fully
adjacent. This is the full state.