Shortest Path First (SPF) or Dijkstra's alrgorith,
OSPFv1 -> OLD and not used
OSPFv2 -> Used for IPv4
OSPFv3 -> Used for IPv6 and IPv4
LSA -> Link State Advertisements
LSDB -> Link State Database
Routers will flood LSAs until all routers in the OSPF area develop the same LSDB.
Router ID is in IPv4 format, and can be manually configured, taken from highest loopback, or highest physical interface.
SPF is used to calculate the best path to a network based on the LSAs in the LSDB, for every route.
Each LSA has a 30 minute expiration.
Three main steps to determine the best path:
1. Become neighbors with other routers connected to the same segment.
2. Exchange LSAs with neighbor routers
3. Calculate the best route to the destination and add it to the routing table.
Area -> group of routers that share the same LSDB
Backbone Area -> special area that all other areas must connect to
Internal Routers -> only connected to one area
Backbone Router, any router in the backbone area. Can also be ABRs.
Area Border Routers -> Routers that connect to more than one area
- Keeps a different LSDB for each area, be careful, can overburden
Autonomous System Border Router -> routers that connect backbone to another routing protocol or AS
Intra-Area Route -> Route which destination is in the same area
Interarea Route -> Route which destination is in a different area
All OSPF areas must have atleast one ABR connected to the Backbone area.
```
router ospf 1
router-id 1.1.1.1
network 10.0.12.0 0.0.0.3 area 0
```
Process ID is only locally significant.
```
ip route 0.0.0.0 0.0.0.0 203.113.2
router ospf 1
default-informaion originate
```
When you configure `default-information originate` command, that router will automatically become an ASBR.
OSPF does support ECMP load balanceing over 4 paths by default.
```
router ospf 1
maximum-paths 4
```
```
route ospf 1
distance 110
```
Run the `show ip protocols` command to see all the above info.