OSPF version 2 is an open standard link state routing protocol which uses protocol number 89 as a transport protocol without having to relay on external transport mechanism like TCP or UDP. Initially, OSPF has to have neighbor table built to keep track of its neighbors and exchange of LSA followed LSDB synchronization in every 30 minutes. In order send hello packets, OSPF uses 188.8.131.52 multicast address as a destination. The OSPF adjacency process passes through various stages where a number of parameters should match between two adjacent routers for successful communication between OSPF routers.
The hello and dead interval for regular OSPF interfaces like broadcast multi-access and point-to-point are 10 and 40 seconds respectively. The main difference between broadcast multi-access interface versus point-to-point is that DR/BDR is not elected for the point-to-point interfaces whereas the behavior is reversed for broadcast multi-access interfaces. By default, the interfaces with encapsulations like PPP and HDLC are considered as point-to-point since it has only one possible destination. In the other hand, the ethernet interfaces are counted as broadcast multi-access network. Optionally, we can change the interface type to point-to-point on the ethernet interfaces by using interface specific command. When we talk about DR/BDR election, it is required on the broadcast or non-broadcast multi-access network to avoid multiple copies of LSAs or updates between devices. One of the routers in the BMA network is elected as a DR, one BDR as a backup router and rest of the devices are considered to be DROTHERS. By default, all the Cisco devices has OSPF priority of 1 which is configurable up to 255 and configuration of priority 0 would enforce an OSPF router not to participate in the DR/BDR election.
Once we start OSPF process on a router, it has to pick a router-id before it sends initial hello packet to the connected devices. By default, the highest IP on a fully functional physical interface is preferred unless there is presence of loopback address. If multiple loopback interfaces exist, the highest IP address configured amongst loopback interfaces would be used as a router-id. However, it is recommended to set the router-id manually to avoid inconsistency due to possible changes made on the interfaces.
Since the OSPF has areas defined that controls flooding domain and LSAs are generated in accordance, the Type 1 and Type 2 LSAs are never advertised across the area and for inter-area communication, Type-3 Summary LSA is generated by the ABR (Area Boarder Router) and advertised between the respective areas. In addition, the Type-4 Summary LSA is used to indicate and give information about ASBR when there is redistribution operation between OSPF and non-OSPF or External routing domain. All the external routes are advertised via Type-5 External LSAs unless there is special OSPF area type NSSA in operation. In such cases, the Type-5 LSA is converted into Type-7 which is then converted back to Type-5 LSA by the respective ABR. In our design above, only type 1 and type 2 LSAs would be generated by all the devices since we are using single area OSPF. For the link between R3 and R4, only type 1 LSA would be generated since there is no presence of DR/BDR. Let’s recall that Type 2 LSAs are generated by DRs.
The configuration of OSPF on Cisco IOS and IOS-XE look similar and fairly straightforward. However, the IOS-XR has hierarchical configuration option where we can see the difference in command syntax. In this lab, R11 and R12 are IOS-XR platforms, rest of the devices are running IOS-XE software.