Network Layer (Routing and Routing Tables)

Context: FIT1047_MOC · how packets cross the network-of-networks — table lookups hop by hop · subnet membership decided in Network Addresses (URL, Port, IP, MAC)

Quick Revision

  • 🎯 Objective: per packet: read destination IP → routing table → next router (or direct delivery) → else default gateway → else unroutable.
  • 📦 Core Components: subnets ➔ routers (layer-3, one IP per interface) ➔ routing tables ➔ static vs dynamic (distance vector vs link state).
  • ⚡ Key Constraint: distance vector (share routing tables, pick fewest hops — RIP) vs link state (share connectivity/link quality, pick fastest path — OSPF).

📝 Core

  • Subnet recap ➔ all devices directly connected, sharing an address prefix ( etc.); in-subnet traffic goes direct, anything else goes to a router.
  • Routers ➔ THE Internet infrastructure: layer-3 devices, one IP address per interface (≈ per connected subnet); forward by destination IP.
  • Table lookup per packet ➔ destination in table? → forward to listed next router or deliver directly · not in table? → default gateway · no gateway? → packet unroutable.
  • Static routing ➔ tables hand-written by the network manager; fine for small, stable networks.
  • Dynamic routing ➔ routers exchange information and converge on tables themselves.
  • Distance vector ➔ exchange distance-to-destination info, choose SHORTEST (hop count): RIP (max 15 hops — loop guard; whole-table updates; slow convergence ⟹ small networks), EIGRP, BGP.
  • Link state ➔ exchange full connectivity + link-quality info, choose FASTEST route by metric (usually link speed): OSPF.

📊 Exam Execution Trace — lecture topology (routers A…K)

A packet for H arriving at router with table {H → G}: forwarded to G; G’s table {H → H}: delivered. A destination absent from the table follows default → C; if C also lacks both entry and gateway, the packet dies. Method: at every router, ONE lookup, ONE hop decision — never a full path plan.

⚖️ Core Decision Matrix

distance vectorlink state
exchangesits routing table (distances)connectivity + link quality of known network
optimisesfewest hopsfastest links
protocolsRIP (≤15 hops), EIGRP, BGPOSPF
scalesmall networks (RIP)larger, faster convergence

⚠️ Common Mistakes

  • 💡 Routers plan one hop, not the path ➔ each router only knows “next router for this destination”; end-to-end routes emerge, they aren’t computed anywhere.
  • 💡 RIP’s 15-hop cap is a feature ➔ it bounds count-to-infinity loops, and simultaneously confines RIP to small networks.
  • 💡 Shortest ≠ fastest ➔ two hops over fibre beat one hop over ADSL; that’s the whole link-state argument.

🧠 Active Recall