4.3.14 · HinglishComputer Networks

Static routing vs dynamic routing

1,814 words8 min readRead in English

4.3.14 · Coding › Computer Networks


WHAT — yeh har ek kya hai


WHY — dono kyun exist karte hain (trade-off)

Aspect Static Dynamic
Table built by human admin routing protocol
Adapts to failures ❌ nahi ✅ haan
Bandwidth/CPU overhead koi nahi haan (updates + computation)
Scalability poor (manual per route) good
Security high (koi injected routes nahi) lower (neighbours pe trust)
Best for small/stub networks large/changing networks
Convergence instant (pehle se set hai) convergence time lagta hai
Figure — Static routing vs dynamic routing

HOW — static routing kaise kaam karta hai (step by step)

Configuration (Cisco-style syntax) destination network ke liye ek line set karta hai:

ip route 192.168.2.0 255.255.255.0 10.0.0.2
        └ dest network ┘ └ mask ┘     └ next hop ┘

HOW — dynamic routing kaise kaam karta hai (conceptually)


Common mistakes (steel-manned)


Recall 12 saal ke bachche ko samjhao (Feynman)

Ek shahar ke post offices socho. Har office ko wall pe ek chart chahiye jo kahe "is mohalle ko khat bhejna hai toh us next office ko de do." Static = boss haath se marker se chart likhta hai. Simple hai aur koi usse mess nahi kar sakta — lekin agar koi raasta band ho jaaye, chart ab galat hai aur khat kho jaate hain jab tak boss wapas aakar dubara na likhe. Dynamic = offices har kuch minute mein ek doosre ko phone karti hain ki "yeh raasta khula hai, woh kitna door hai." Woh chart khud update karte rehte hain, toh raasta band ho jaaye toh automatically reroute ho jaata hai — lekin itna saara phoning time aur effort leta hai, aur ek prankster fake directions phone kar sakta hai.


Flashcards

Static routing mein routing table kaun banata hai?
Network administrator, manually.
Dynamic routing mein routing table kaun banata hai?
Routing protocols (RIP/OSPF/BGP), automatically information exchange karke.
Kya static routing link failure pe adapt karti hai?
Nahi — manually change hone tak fixed rehti hai.
Dynamic routing protocols ki do main families?
Distance-vector (jaise RIP) aur Link-state (jaise OSPF).
Bellman–Ford distance-vector equation batao.
.
Ek chhota network static routing kyun prefer kar sakta hai?
Koi protocol overhead nahi, zyaada secure, simpler, predictable.
Default route kya hai aur uska prefix kya hai?
Ek catch-all route 0.0.0.0/0 jo tab use hoti hai jab koi aur specific route match na kare.
Routing-table entry select karne ka rule kya hai?
Longest-prefix match.
OSPF (link-state) topology graph pe kaunsa algorithm chalaata hai?
Dijkstra's shortest-path.
Static routes dono routers pe kyun set karni padti hain?
Reply packets ko return route chahiye; routing per-direction hoti hai.
Dynamic routing ka static se compared main downside kya hai?
Bandwidth/CPU consume karta hai, convergence delay hoti hai, bada attack surface hota hai.
Convergence time kya hai?
Jab topology change hone ke baad sabhi routers consistent routes pe agree kar lein, usmein laga time.

Connections

  • Routing table — dono methods ka shared output
  • Bellman-Ford algorithm — distance-vector ke peeche ka math
  • Dijkstra's algorithm — link-state/OSPF ke peeche ka math
  • RIP protocol / OSPF protocol / BGP — concrete dynamic protocols
  • Longest prefix match — chosen table ko forward karne ke liye kaise use karte hain
  • Default gateway — sabse common static route
  • Network convergence — dynamic routing ki cost

Concept Map

filled by

manually

automatically

configured by

uses

exchange

consume

gives

lacks

adapts to

needs

packet matched by

Routing Table

Who fills it?

Static Routing

Dynamic Routing

Human Admin

Routing Protocol RIP OSPF BGP

Update Messages

Bandwidth CPU Attack Surface

Simplicity Security Zero Overhead

No Fault Tolerance

Topology Changes

Convergence Time

Longest-Prefix Match