• ↑↓ pour naviguer
  • pour ouvrir
  • pour sélectionner
  • ⌘ ⌥ ↵ pour ouvrir dans un panneau
  • ←→ pour naviguer
  • esc pour rejeter
⌘ '
raccourcis clavier

The Problem

Devices on different networks need to address and route packets across multiple hops. Link-layer protocols only work within a single network, so a network-layer protocol is needed for internetwork communication.

Core Idea

The fundamental network-layer protocol that provides logical addressing (IP addresses) and routing packets across networks from source to destination.

How It Works

  1. Assigns logical IP addresses to devices (IPv4: 32-bit, IPv6: 128-bit)
  2. Each packet contains source and destination IP addresses
  3. Routers examine destination IP and forward packets toward destination
  4. Connectionless and unreliable: best-effort delivery without guarantees
  5. TTL (Time To Live) field prevents packets from looping forever

Visual Explanation

G Sender Sender (192.168.1.1) R1 Router 1 Sender->R1 IP Packet Dst: 10.0.0.1 R2 Router 2 R1->R2 Forward Dst: 10.0.0.1 Dest Destination (10.0.0.1) R2->Dest Deliver Dst: 10.0.0.1 note Best effort No guarantees

Key Properties

  • Connectionless: each packet routed independently
  • Unreliable: no delivery guarantees, no error recovery
  • Provides logical addressing and routing
  • Foundation of the internet protocol suite

Connections

  • Built from: Connectionless Service — IP is connectionless
  • Builds into: TCP — runs on top of IP
  • Builds into: UDP — runs on top of IP
  • Related: Routing — how routers forward IP packets
  • Related: IPv4 and IPv6 — protocol versions

Edge Cases & Gotchas

  • Fragmentation can occur when packet exceeds MTU (Maximum Transmission Unit)
  • NAT (Network Address Translation) complicates end-to-end addressing
  • IPv4 address exhaustion led to IPv6 development