OSPF Fundamentals Flashcards
OSPF advertises link-state advertisements (LSAs) that contain the link state and link metric to neighboring routers. Received LSAs are stored in a local database called the link-state database (LSDB) and advertise the link-state information to neighboring routers exactly as the original advertising router advertised it.
This process floods the LSA throughout the OSPF routing domain just as the advertising router advertised it. All OSPF routers maintain a synchronized identical copy of the LSDB within an area.
LSDB
The LSDB provides the topology of the network, in essence providing the router a complete map of the network. All OSPF routers run Dijkstra’s shortest path first (SPF) algorithm to construct a loop-free topology of shortest paths.
OSPF runs the SPF algorithm to calculate the SPT (Shortest Path Tree), finding the shortest path to each destination.
Each router sees itself as the root or top of the SPF tree (SPT), and the SPT contains all network destinations within the OSPF domain. The SPT differs for each OSPF router, but the LSDB used to calculate the SPT is identical for all OSPF routers.
SPT (Shortest Path Tree)
The SPTs give the illusion of no redundancy in a network, but remember that the SPT shows the shortest path to reach a network and is built from the LSDB, which contains all the links for an area. During a topology change, the SPT is rebuilt and may change.
OSPF Process
A router can run multiple OSPF processes. Each process maintains its own unique database,
and routes learned in one OSPF process are not available to a different OSPF process without redistribution of routes between processes. The OSPF process numbers are locally significant and do not have to match among routers. If OSPF process number 1 is running on one router
and OSPF process number 1234 is running on another, the two routers can become neighbors.
Areas
OSPF provides scalability for the routing table by splitting segments of the topology into multiple OSPF areas within the routing domain.
Area membership is set at the interface level, and the area ID is included in the OSPF hello packet. An interface can belong to only one area. All routers within the same OSPF area
maintain an identical copy of the LSDB.
Single Area trade-offs
An OSPF area grows in size as the number of network links and number of routers increase in the area. While usi1ng a single area simplifies the topology, there are trade-offs:
- A full SPT calculation runs when a link flaps within the area.
- With a single area, the LSDB increases in size and becomes unmanageable.
- The LSDB for the single area grows, consumes more memory, and takes longer during the SPF computation process.
- With a single area, no summarization of route information occurs.
Multiple Areas
If a router has interfaces in multiple areas, the router has multiple LSDBs (one for each area).
The internal topology of one area is invisible from outside that area. If a topology change occurs (such as a link flap or an additional network added) within an area, all routers in the same OSPF area calculate the SPT again. Routers outside that area do not calculate the full SPT again but do perform a partial SPF calculation if the metrics have changed or a prefix is removed.
In essence, an OSPF area hides the topology from another area but allows the networks to be visible in other areas within the OSPF domain. Segmenting the OSPF domain into multiple areas reduces the size of the LSDB for each area, making SPT calculations faster and decreasing LSDB flooding between routers when a link flaps.
Backbone Area
Area 0 is a special area called the backbone.
By design, OSPF uses a two-tier hierarchy in which all areas must connect to the upper tier, Area 0, because OSPF expects all areas to inject routing information into Area 0. Area 0 advertises the routes into other nonbackbone areas. The backbone design is crucial to preventing routing loops.
Area ID
The area identifier (also known as the area ID) is a 32-bit field and can be formatted in simple decimal (0 through 4294967295) or dotted decimal (0.0.0.0 through 255.255.255.255).
When configuring routers in an area, if you use decimal format on one router and
dotted-decimal format on a different router, the routers will be able to form an adjacency.
OSPF advertises the area ID in the OSPF packets.
ABRs
Area border routers (ABRs) are OSPF routers connected to Area 0 and another OSPF area, per Cisco definition and according to RFC 3509.
ABRs are responsible for advertising routes from one area and injecting them into a different OSPF area.
Every ABR needs to participate in Area 0 to allow for the advertisement of routes into another area. ABRs compute an SPT for every area that they participate in.
Routes Advertisement between Areas
R1 is connected to Area 0, Area 1, and Area 2.
Routes from Area 1 advertise into Area 0.
Routes from Area 2 advertise into Area 0.
Routes from Area 0 advertise into Areas 1 and 2. This includes the local Area 0 routes, in
addition to the routes that were advertised into Area 0 from Area 1 and Area 2.
Inter-Router Communication
OSPF runs directly over IPv4, using its own protocol 89.
OSPF uses multicast where possible to reduce unnecessary traffic.
There are two OSPF multicast addresses:
- AllSPFRouters: IPv4 address 224.0.0.5 or MAC address 01:00:5E:00:00:05. All routers running OSPF should be able to receive these packets.
- AllDRouters: IPv4 address 224.0.0.6 or MAC address 01:00:5E:00:00:06. Communication with designated routers (DRs) uses this address.
Packet Types
- Hello: Packets are sent out periodically on all OSPF interfaces to discover new neighbors while ensuring that other neighbors are still online.
- DBD or DDP: Packets are exchanged when an OSPF adjacency is first being formed. These packets are used to describe the contents of the LSDB.
- LSR (Link State Request): When a router thinks that part of its LSDB is stale, it may request a portion of a neighbor’s database using this packet type.
- LSU (Link State Update): This is an explicit LSA for a specific network link, and normally it is sent in direct response to an LSR.
- LSACK: These packets are sent in response to the flooding of LSAs, thus making the flooding a reliable transport feature.
Router ID
In some OSPF output commands, neighbor ID refers to the RID; the terms are synonymous. The RID must be unique for each OSPF process in an OSPF domain and must be unique between OSPF processes on a router.
Neighbors
An OSPF neighbor is a router that shares a common OSPF-enabled network link. OSPF routers discover other neighbors through the OSPF hello packets. An adjacent OSPF neighbor is an OSPF neighbor that shares a synchronized OSPF database between the two neighbors.