operation

 

 

When everything is first turned on, OSPF routers detect which networks are directly accessible. They also try to determine who heir neighboring routers are. Routers identify neighboring routers by transmitting "hello" packets on all their ports. In these packets, each router identifies itself.

Authentication can be used to validate the communication between routers, but this is optional since an explicit trust relationship can be setup between routers so they "trust" one another. When a router receives a "hello" packet from a neighbor a "relationship" is established and information is exchanged. When it is determined that more than one router is present within an area, a primary (designated) router is selected as well as a backup designated router.

Once the designated router is selected, all other routers establish a relationship with it to exchange database information. The database exchange process uses OSPF request and response messages to exchange data. Once the databases are fully exchanged and synchronized, the routers are said to be in a full state.

After they are synchronized, the routers run the shortest path algorithm. Each outer constructs a tree structure from itself to all known destinations. By building this structure, the routers are able to determine how to best forward a packet to any destination across the network. A similar database relationship is also established with the backup router; however, this is only used in case of the designated router's failure.

Once the network is up and running, the routers periodically send "hello" packets on their interfaces. This is done to verify that all links are still active and also to make sure of the neighboring routers' status. If a link failure or loss of communication between neighboring devices occurs, the router or routers that detect the change advertise this information to other routers, so they can update their databases. This guarantees that all routers are updated with the most current network topology information as quickly as possible.

 

Dijkstra's algorithm >>