Course overviewTopic 14 / 31
Computer Networks • Deep Lesson 14 min Network Layer: IP & Routing

How Routers Learn: Static, RIP, OSPF & BGP

A routing table can be populated manually or learned dynamically. Static routes are explicit configuration. RIP is a distance-vector protocol with simple hop-count reasoning. OSPF is a link-state interior gateway protocol that builds a topology database and computes shortest paths. BGP is the inter-domain routing protocol that exchanges reachability information between autonomous systems using policy-rich path attributes.

LEARNING LOOPWatch→Read→Inspect→Retrieve→Teach back
How Routers Learn: Static, RIP, OSPF & BGP
Week 2–3 · Topic 14 / 31
Visual model

Watch the structure first. Then read the technical details.

0.0.0.0/0 → ISP
10.0.0.0/8 → R1
10.20.0.0/16 → R2
10.20.30.0/24 → R3 ✓
Article companion· Week 2–3

A routing table can be populated manually or learned dynamically. Static routes are explicit configuration. RIP is a distance-vector protocol with simple hop-count reasoning. OSPF is a link-state interior gateway protocol that builds a topology database and computes shortest paths. BGP is the inter-domain routing protocol that exchanges reachability information between autonomous systems using policy-rich path attributes.

01

Static routing

Simple and deterministic, but every topology change requires configuration unless another mechanism handles it. It remains useful for small or special-purpose paths.

02

RIP

RIP uses hop count as a metric and has a maximum usable path length of 15 hops, making it unsuitable for large modern networks but useful for learning distance-vector concepts.

03

OSPF vs BGP

OSPF is commonly used within an autonomous system and distributes link-state information. BGP is used between autonomous systems and is strongly policy-driven; path attributes such as AS_PATH matter more than a simple shortest-distance metric.

DUAL CODING

See the mechanism before you memorize it

One diagram, one causal story, one reconstruction task.

VISUAL RECONSTRUCTION

How routers learn: static, RIP, OSPF, BGP (bird's-eye) — causal map

4 stages
01

Static

Human defines a destination and next hop.

02

Distance vector

Routers learn reachability through neighbor-to-neighbor path information.

03

Link state

Routers build a shared topology view and compute paths.

04

Inter-domain

BGP exchanges reachable prefixes plus policy-relevant path attributes.

Trace the mechanism from left to right. On smaller screens, follow the numbered sequence. Then redraw the same flow without looking.
ACTIVE RECONSTRUCTION

Draw the idea yourself

Rebuild the core flow on a real canvas before moving to the worked walkthrough.

SKETCHFLOW

How routers learn: static, RIP, OSPF, BGP (bird's-eye) — practice canvas

Sketch the How routers learn: static, RIP, OSPF, BGP (bird's-eye) mechanism from memory. Label the input, transformation, observation, and transfer.

Practice canvas ready

The canvas loads when you reach this section.

Draw first. Compare second.Touch + mouse friendly
STEP BY STEP

Walk the system

01

Static

Human defines a destination and next hop.

02

Distance vector

Routers learn reachability through neighbor-to-neighbor path information.

03

Link state

Routers build a shared topology view and compute paths.

04

Inter-domain

BGP exchanges reachable prefixes plus policy-relevant path attributes.

05

Forwarding

The best route is installed into forwarding structures used for packets.

CONCRETE ARTIFACT

Protocol comparison

Do not reduce protocols to slogans. The real distinction is the information they exchange, the scope where they operate, and the way they select paths.

textcopy → rebuild → modify
Static → explicit control
RIP    → distance vector, hop count
OSPF   → link state, topology database
BGP    → inter-domain, policy + AS paths
MISCONCEPTIONS

What usually goes wrong

Call BGP an interior gateway protocol.

Explain OSPF as simply 'hop count'.

Assume the mathematically shortest path is always the operationally selected path.

RETRIEVAL PRACTICE

Close the tab. Rebuild it from memory.

Read the question, answer aloud, then reveal.

Why can BGP choose a longer path?Reveal answer

BGP is policy-driven. Operators can prefer or reject paths based on business, security and topology policy rather than only physical hop count.

What is the core idea of link-state routing?Reveal answer

Routers distribute enough topology information to build a common view and independently compute paths.

When is static routing useful?Reveal answer

Small stable networks, default/special routes, lab environments, controlled paths and cases where an administrator deliberately wants deterministic behavior.

FEYNMAN

Teach it back in plain English

Teach the protocols as four kinds of map-making: a handwritten route, neighbor gossip, a shared topology map, and an inter-company policy map.

EXAM / INTERVIEW

What a strong answer sounds like

Know protocol type, metric philosophy, scope and basic operational use. Detailed packet formats are usually secondary to the mental model.

NEXT CONNECTION

Make this idea travel.

Connect it next to: routing • subnet-design-lab • tcp-packet-analysis.

COURSE CONTENTS

How routers learn: static, RIP, OSPF, BGP (bird's-eye)

01How the Internet Works + OSI ModelWeek 1 · 4 topics0/4
02Physical & Data Link LayersWeek 1–2 · 5 topics0/5
03Network Layer: IP & RoutingWeek 2–3 · 6 topics0/6
04Transport Layer: TCP & UDPWeek 3–4 · 5 topics0/5
05Application Layer: HTTP, DNS & FriendsWeek 4–5 · 6 topics0/6
06Security & Troubleshooting ToolkitWeek 5 · 5 topics0/5