← 🧭 Routing & Congestion Control
Subtopic 3 of 4

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

  1. RIP: distance vector, hop count, 15 maximum, UDP 520.
  2. OSPF: link state, Dijkstra, hierarchical (areas), runs directly over IP (protocol 89), not inter-domain.
  3. BGP: path vector, policy based, runs over TCP 179, between ASes.
  4. 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 vectorLink state
Information sharedmy whole table, with neighbours onlymy links, flooded to everyone
AlgorithmBellman-FordDijkstra
Knowledgedistance and next hop onlyfull topology map
Convergenceslow, count to infinityfast
Overheadsmall CPUmore CPU and memory, flooding
ProtocolRIPOSPF, IS-IS
ProtocolTypeAlgorithmRuns overScope
RIPdistance vectorBellman-Ford, hop count, max 15UDP 520inside an AS
OSPFlink stateDijkstra, hierarchical areasIP, protocol 89inside an AS
BGPpath vectorpolicy basedTCP 179between ASes

Check yourself

BGP runs over

Remember: RIP: DV, UDP. OSPF: link state, IP, Dijkstra, areas. BGP: path vector, TCP, between ASes.
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.