OSPF (Open Shortest Path First) routing protocol is a link state routing protocol. Therefore, every router sends a network update once a change happens in the routes in its routing table. In addition, this network updates contain only the affected routes, and are sent to the entire network.
This allows every router to build a database that reflects the structure of the entire network. In addition, allow every router to have a faster convergence time than the distance vector routing protocols.
The convergence time is the time required to find an alternative path to a certain network, once its main path is unavailable.
• It is a classless routing protocol. This means that it supports the CIDR, the VLSM and the disconiguous networks.
• The default cost of the path = ‘100M/BW’.
• It uses the ‘Dijkstra Shortest Path First (SPF)’ algorithm to determine the best path to every network.
• It logically segments the network into areas, as seen in figure (13.1).
• It uses ‘area 0’ (the backbone area) at the top of the hierarchy, this means that all other areas must be connected to ‘area 0’.
• It uses area numbers from the range (0: 65535).
• Routers send multicast ‘hello packets’ out of the OSPF interfaces to discover the OSPF neighbors.
• The hello packets are sent every time period called the ‘hello time’.
• If no hello packet is received from a certain router during a time period called the ‘dead time’, this router will be considered as unavailable.
• The hello packets are sent to a multicast IP address ‘188.8.131.52’.
• The network administrator may configure the routers to authenticate each other before exchanging the routing updates.
• The following conditions must be met for the neighborship to be established between two routers,
• The routers that exist in the same area elect one router as a ‘DR’ (Designated Router), and another router as a ‘BDR’ (Backup Designated Router).
• All routers in the area establish an adjacency with the ‘DR’ and the ‘BDR’.
• All network updates are sent to the ‘DR’ and the ‘BDR’ on the IP address ‘184.108.40.206’ using a ‘router LSA’ (Link State Advertisement).
• The ‘DR’ and the ‘BDR’ forward the network updates to the routers that exist in their area, this is done by sending a ‘network LSA’ on a multicast IP address ‘220.127.116.11’.
To configure the OSPF routing on a router, we write the following commands,
Router(config)# router ospf process number
Router(config-router)# network network IP wildcard mask area area number
The Process Number is a locally significant number on every router.
The network IP is the destination network IP.
The wildcard mask is a reversed subnet mask. To get it, change every ‘1’ to ‘0’ and every ‘0’ to ‘1’ as seen in figure (13.3).
Figure 13.3: the wildcard mask
Configuring an interface as a passive interface prevents it from sending or receiving the ‘hello packets’.
To configure an interface as a passive interface, we use the following command,
Router(config-router)# passive-interface interface
In the OSPF protocol, the routers in every area elect a ‘DR’ and a ‘BDR’.
When a router needs to send network updates to the other routers in the area, it sends this update to the ‘DR’ and the ‘BDR’. Then, the ‘DR’ and the ‘BDR’ forward this update to all the routers in the area.
The default router priority for every router is ‘1’.
The router priority can be changed manually using the following command,
Router(config-if)# ip ospf priority 2
Router (config)# router ospf 0
Router(config-router)# router-id 18.104.22.168
To configure a loopback interface, use the following commands,
Router(config)# interface loopback0
Router(config-if) ip address 10.10.10.10 255.255.255.255
Determine the ‘RID’ of the below router,
RID= the statically assigned RID = 22.214.171.124
If there wasn’t statically assigned RID,
RID = the highest loopback interface IP = 126.96.36.199
If there was not a loopback interface configured,
RID = the highest interface IP = 188.8.131.52