# Q4(b) · OSPF and link types

Subject: Computer Networks

Exam: TEE

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2025-legacy-reexam/q4b

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-legacy-reexam--q4b/

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q4(b). Explain OSPF protocol and the types of links used in OSPF to establish the communication. [10 marks]

### Answer

**Definition.** Open Shortest Path First (OSPF) is an interior link-state routing protocol that selects routes using shortest-path calculations and additive link costs.

**Simple meaning.** OSPF = link-state map + Dijkstra + summed costs.

## Understand it step by step

1. Routers discover and maintain neighbour relationships using Hello packets and exchange link-state information.
2. Routers calculate shortest paths from their own position in the topology. A path cost is the sum of its outgoing-link costs, not necessarily the fewest hops.
3. The network can be divided into areas. In normal OSPF hierarchy, Area 0 is the backbone used to interconnect other areas via area border routers.
4. OSPFv2 is the IPv4 protocol in the supplied paper; it is carried directly in IP protocol number 89, not TCP/UDP port 89.
5. A common vendor default derives interface cost from reference bandwidth/interface bandwidth, but actual configured costs and reference bandwidth matter. Use the given costs in an exam graph.

#### Practical example

Route A→B→D costs 10+10=20 while A→C→D costs 5+8=13. OSPF’s cost comparison prefers the latter even though both have two links.

OSPF exchanges and maintains link-state information, builds a topology database and runs Dijkstra’s shortest-path computation rooted at the local router. It chooses a path with the lowest sum of link costs and installs the corresponding next hop. Equal-cost paths may be supported.

**Yaad rakho:** OSPF cost add karo; sirf hops nahi.

### Link types represented in an OSPF topology

| Type | Meaning | Diagram |
| --- | --- | --- |
| Point-to-point | Direct connection between two routers | R1 — R2 |
| Transit network | Multiaccess network through which routers communicate; a designated router helps represent it | R1 — LAN — R2 (also R3) |
| Stub network | Network reachable through one router, with no onward transit via another router | R1 — end-host LAN |
| Virtual link | Logical OSPF backbone connection through a transit area | Area 0 — R1 ⋯ transit area ⋯ R2 — Area 0 |

Do not confuse these topology/link descriptions with the five OSPF packet types. Hello discovers/maintains neighbours; database description, link-state request, link-state update and acknowledgement synchronize link-state information.
