6.3RIP, OSPF, BGP and the Internet hierarchy
The idea
The Internet is a set of autonomous systems. RIP and OSPF route inside one AS. BGP routes between them.
Think of it like this: Inside a company you use the office map (OSPF); between companies you follow agreements about whose roads you may use (BGP).
Why it exists
GATE tests which protocol is intra- or inter-domain, which algorithm each uses and what it runs over.
How it works
- RIP: distance vector, hop count, 15 maximum, UDP 520.
- OSPF: link state, Dijkstra, hierarchical (areas), runs directly over IP (protocol 89), not inter-domain.
- BGP: path vector, policy based, runs over TCP 179, between ASes.
- OSPF does not use Bellman-Ford.
Worked example: Which statements about OSPF are incorrect?
"OSPF implements Bellman-Ford" and "OSPF is used as an inter-domain protocol" are incorrect. It uses Dijkstra and is hierarchical (GATE 2023).
Now play with it
- →Read the two tables, then say which protocol you would pick between two ISPs.
- →Notice the transport used by each protocol.
| Distance vector | Link state | |
|---|---|---|
| Information shared | my whole table, with neighbours only | my links, flooded to everyone |
| Algorithm | Bellman-Ford | Dijkstra |
| Knowledge | distance and next hop only | full topology map |
| Convergence | slow, count to infinity | fast |
| Overhead | small CPU | more CPU and memory, flooding |
| Protocol | RIP | OSPF, IS-IS |
| Protocol | Type | Algorithm | Runs over | Scope |
|---|---|---|---|---|
| RIP | distance vector | Bellman-Ford, hop count, max 15 | UDP 520 | inside an AS |
| OSPF | link state | Dijkstra, hierarchical areas | IP, protocol 89 | inside an AS |
| BGP | path vector | policy based | TCP 179 | between ASes |
Check yourself
BGP runs over
Exam notes (the dense version)
An autonomous system (AS) is a network under one administration. Intra-domain (interior) protocols: RIP (distance vector, hop count, max 15, runs over UDP) and OSPF (link state, Dijkstra, areas for hierarchy, runs directly over IP with protocol number 89). Inter-domain: BGP (path vector, over TCP port 179) exchanges reachability and policy between ASes, not shortest paths. OSPF is not an inter-domain protocol and does not use Bellman-Ford.
Previous year questions: Routing & Congestion Control (3)
PYQs are grouped by topic, so this is the full set for Routing & Congestion Control; try the ones that match this subtopic. Open all 3 on the topic page.