Sub topic 1
Link-State Routing: Every Router Holds the Map
Prerequisites
Assume you understand IPv4 addressing, interface configuration, routing tables, static routes, and Ethernet versus point-to-point links.
Link-State Routing: Every Router Holds the Map
A link-state routing protocol lets each router build a map of the network. A router describes its directly connected links, their states, and their costs. OSPF floods this information throughout an area.
Each router stores the information in a link-state database (LSDB). It then runs the shortest path first (SPF) algorithm independently. This differs from distance-vector routing, where routers learn routes from neighboring routers' route advertisements. Link-state routing uses more memory and processing, but it gives routers a consistent topology view and fast, loop-free calculations.
What OSPF Is and the Five Packet Types
OSPF is an open standard interior gateway protocol for routing within one autonomous system. It uses five packet types:
- Hello discovers neighbors and maintains relationships.
- Database Description (DBD) summarizes an LSDB.
- Link State Request (LSR) asks for specific missing information.
- Link State Update (LSU) carries link-state advertisements (LSAs).
- Link State Acknowledgment (LSAck) confirms received LSAs.
The normal exchange is Hello, DBD, LSR, LSU, and LSAck. Hello packets continue after adjacency formation to detect failures.
The Router ID and How It Is Chosen
The router ID (RID) is a 32-bit value that uniquely identifies an OSPF router. It looks like an IPv4 address, but it does not need to be assigned to an interface.
Common OSPFv2 selection order is:
- Manually configured router ID.
- Highest IP address on a loopback interface.
- Highest IP address on an active interface.
Configure the RID explicitly for stable operation. Changing it usually requires restarting the OSPF process.
Hello Packets and Neighbor Discovery
On a shared Ethernet network, OSPF sends Hellos to multicast address 224.0.0.5. The Hello includes the router ID, area, timers, network mask, authentication settings, and known neighbors. Important values must agree before routers can become neighbors.
Network Types and DR/BDR Election
OSPF network type affects Hello behavior and adjacency formation:
- Broadcast: Ethernet-like multi-access networks. A DR and BDR are elected.
- Point-to-point: A direct link between two routers. No DR or BDR is needed.
- NBMA: A non-broadcast multi-access network. Neighbors may require manual configuration.
- Point-to-multipoint: Treats separate neighbors as point-to-point connections.
On a broadcast segment, the router with the highest OSPF priority becomes the designated router (DR). The next highest becomes the backup designated router (BDR). Router ID breaks ties. Priority 0 prevents election. Elections usually do not preempt an existing DR.
Exercise
Three routers have priorities 1, 100, and 50. Their router IDs are 1.1.1.1, 2.2.2.2, and 3.3.3.3. Which routers become DR and BDR?
Show answer
The priority-100 router becomes DR. The priority-50 router becomes BDR. The priority-1 router is a DROther.