OSPF is an interior gateway protocol (IGP) that runs within a single autonomous system (AS). Exterior gateway protocols (EGPs), such as Border Gateway Protocol (BGP), exchange routing information between ASs.
OSPF is a link-state routing protocol, similar to the Intermediate System–to–Intermediate System (IS-IS) routing protocol. It advertises the states of its local network links. This link advertisement distinguishes OSPF from some IGPs, such as Routing Information Protocol (RIP). A distance vector protocol, such as RIP, advertises the distances (that is, the number of hops) to each known destination within the network.
Each participating OSPF router within the AS has an identical database describing the AS’s topology. Each individual piece of this database is a particular router’s local state. From this database, OSPF calculates a routing table by constructing a shortest-path tree.
OSPF learns the best routes to reachable destinations. It can quickly detect changes in the topology of an AS and, after a short convergence period, calculate new loop-free routes. This protocol has been designed expressly for the TCP/IP Internet environment, including explicit support for classless interdomain routing (CIDR) and the tagging of externally derived routing information.
This chapter provides direction for customizing basic OSPF settings if you need to do so. For detailed information about the OSPF commands, see the JUNOSe Command Reference Guide.