Purpose

Explain why the network layer exists at all. The link layer with packet forwarding can already build a network, so this note pins down what breaks when you try to build the internet out of it, and what the network layer does about each problem.

  • No global addressing: link layer addresses only mean something on the local network. Reaching hosts on other networks needs an address scheme that spans networks.
  • Doesn’t scale: no host can maintain a routing table with an entry for every other host on the internet.
  • Only one technology: link layer technologies are not interoperable with each other. Ethernet and 802.11 frames don’t mix without something above them.
  • Limited traffic control: the link layer has no mechanism for handling congestion, routing around failures, or controlling the bandwidth different applications use.

Network layer approach

  • Scaling: hierarchical addressing in the form of prefixes, so routers track networks instead of hosts.
  • Heterogeneity: IP as a common protocol that any link layer technology can carry.
  • Bandwidth control: congestion control and lowest-cost routing manage traffic, and the layer leaves room for quality of service (QoS).

Routing vs. forwarding

Routing is the process of deciding which paths traffic should take. It happens on a global scale and involves routers exchanging information.

Forwarding is the process of actually sending a packet from one node to the next, one local table lookup per packet.

Where the details live