How Computers Communicate Across the World
Introduction
Chapter 1: The Problem of Communication
- Why Computers Need to Talk
- From Electricity to Information
- Signals, Noise and Reliability
- Digital Representation: Bits and Bytes
- Synchronization and Clocks
- The First Networks
Chapter 2: Encoding Data for Transmission
- Line Coding: Voltage Levels and Bit Patterns
- Serial vs Parallel Transmission
- Start Bits, Stop Bits and Framing Signals
- Clock Recovery and Timing
- Error Detection with Parity and CRC
- Modulation for Wireless Media
Chapter 3: Links, Frames and the First Layer
- What Is a Link
- The Frame Structure
- Physical Addresses (MAC)
- Collision Detection and Avoidance
- Switching vs Broadcasting
- Why We Need Layers
Chapter 4: Ethernet in Detail
- Ethernet History and Design Philosophy
- Frame Format Field by Field
- MAC Address Structure and Assignment
- CSMA/CD: How Classic Ethernet Worked
- Switched Ethernet and Learning Bridges
- VLANs and Tagged Frames
- Gigabit Ethernet and Beyond
Chapter 5: Layered Architectures
- The Abstraction Problem in Large Systems
- Encapsulation: Wrapping Data in Headers
- The OSI Model: Seven Layers Explained
- The Internet Protocol Stack: Four Layers That Work
- Interface Contracts Between Layers
- Why Layering Matters for the Internet
Chapter 6: IPv4, Design and Structure
- From Local Networks to a Network of Networks
- The End-to-End Design Philosophy
- IPv4 Address Format and Classes (Historical)
- Packet Header Field by Field
- Time to Live and Loop Prevention
- Fragmentation and Reassembly
- IP as an Unreliable Best-Effort Protocol
Chapter 7: Subnetting, CIDR and Address Allocation
- The Classful System and Its Failure
- Subnet Masks and Network Prefixes
- CIDR Notation and Aggregation
- Variable-Length Subnet Masking (VLSM)
- Worked Subnetting Examples
- Global Address Allocation Hierarchy
Chapter 8: IPv6, Modern Internet Protocol
- Running Out of Addresses
- IPv6 Design Goals
- The Simplified Header Format
- Address Types and Formats
- Stateless Address Autoconfiguration (SLAAC)
- Neighbor Discovery Protocol
- Transition Mechanisms: Dual Stack and Tunneling
Chapter 9: ARP and Link-Layer Address Resolution
- The Address Mapping Problem
- ARP Request and Reply Format
- ARP Cache Management
- Gratuitous ARP
- ARP Spoofing Attacks
- IPv6 Neighbor Discovery
Chapter 10: Routing Fundamentals
- What a Router Does
- Forwarding Tables and Longest Prefix Match
- Default Routes
- Routing vs Forwarding: Control Plane and Data Plane
- Static Routing
- Dynamic Routing Motivation
Chapter 11: Interior Gateway Protocols, RIP, OSPF, IS-IS
- Autonomous Systems Explained
- Distance-Vector Routing: RIP
- The Count-to-Infinity Problem
- Link-State Routing: OSPF
- Dijkstra’s Algorithm in Practice
- IS-IS: The Telecom Alternative
- Route Summarization and Hierarchy
Chapter 12: Border Gateway Protocol (BGP)
- Why We Need an Exterior Gateway Protocol
- Path-Vector Routing Concept
- BGP Peering and Sessions
- BGP Attributes: AS_PATH, NEXT_HOP, LOCAL_PREF
- The Route Selection Algorithm
- Route Hijacking and Security
- BGP at Internet Scale
Chapter 13: ICMP, Diagnostics and Error Reporting
- Why IP Needs a Signaling Protocol
- ICMP Message Types and Codes
- Echo Request and Reply: How Ping Works
- Time Exceeded: How Traceroute Works
- Destination Unreachable Messages
- ICMP Rate Limiting and Security
Chapter 14: DHCP, Dynamic Address Assignment
- The Configuration Problem
- The DORA Process: Discover, Offer, Request, Acknowledge
- DHCP Message Format and Options
- Lease Renewal and Release
- DHCP Relay Agents
- DHCPv6 and SLAAC Interaction
Chapter 15: DNS, The Internet’s Naming System
- Why We Need Names Instead of Numbers
- The Hierarchical Namespace
- Domain Name Structure and Labels
- Record Types: A, AAAA, CNAME, MX, TXT, SRV
- The Resolution Process Step by Step
- Recursive Resolvers and Root Servers
- DNS Caching and TTL
- DNSSEC: Authenticating Responses
Chapter 16: UDP, Simple Transport
- Why We Need a Transport Layer
- Ports as Process Identifiers
- The UDP Header Format
- Checksums in UDP
- When to Use UDP
- DNS over UDP Walkthrough
Chapter 17: TCP, Reliable Stream Transport (Part 1)
- The Reliability Problem
- Byte Streams vs Datagrams
- Sequence Numbers and Acknowledgments
- The Three-Way Handshake
- Connection Teardown: Four-Way Wave
- The TCP State Machine
- Retransmission Timeouts
Chapter 18: TCP, Reliable Stream Transport (Part 2)
- Flow Control with Sliding Windows
- Advertised Window and Zero Window
- Congestion: Why Networks Slow Down
- Congestion Avoidance Algorithms
- TCP Reno and AIMD
- Modern Algorithms: CUBIC and BBR
- Nagle’s Algorithm and Delayed ACKs
Chapter 19: QUIC, Transport for the Modern Web
- Problems with TCP + TLS + HTTP/2
- QUIC Design Goals
- Running on UDP: Why It Works
- The QUIC Connection Establishment
- Multiplexed Streams Without Blocking
- Connection Migration and Resumption
- Security Properties of QUIC
Chapter 20: TLS, Encrypted Communication
- The Eavesdropping and Spoofing Problem
- Symmetric vs Asymmetric Cryptography (Briefly)
- The TLS Handshake Protocol
- Certificate Chains and Trust Anchors
- Perfect Forward Secrecy
- TLS 1.3: Faster and Safer
- Common TLS Attacks and Mitigations
Chapter 21: HTTP Family, From 1.1 to HTTP/3
- The Request-Response Model
- HTTP Methods and Status Codes
- Headers, Bodies and Content Negotiation
- HTTP/1.1: Persistent Connections and Limitations
- HTTP/2: Binary Framing and Multiplexing
- HTTP/3: HTTP over QUIC
- End-to-End HTTP Transaction Walkthrough
Chapter 22: WebSockets and Persistent Connections
- The Limitation of Request-Response
- WebSocket Handshake Protocol
- Frame Format and Control Frames
- When to Use WebSockets
- Server-Sent Events as an Alternative
- Brief Look at WebRTC Signaling
Chapter 23: NAT, Network Address Translation
- The Address Exhaustion Crisis
- Private Address Spaces (RFC 1918)
- How NAT Works: Translation Tables
- Types of NAT: Full Cone, Restricted, Symmetric
- Port Forwarding and DMZ
- Why NAT Breaks End-to-End
- NAT Traversal Techniques
Chapter 24: Firewalls, Middleboxes and Traffic Control
- What Is a Firewall
- Packet Filtering Rules
- Stateful Inspection
- Deep Packet Inspection (DPI)
- Quality of Service Marking
- Rate Limiting and Traffic Shaping
- The Middlebox Problem
Chapter 25: Content Delivery Networks and Load Balancers
- The Problem of Scale
- Load Balancing Fundamentals
- Layer 4 Load Balancing with NAT
- Layer 7 Load Balancing and HTTP
- Content Delivery Networks (CDNs)
- Anycast Routing for CDNs
- Reverse Proxies
- Edge Computing and Serverless at the CDN
Chapter 26: Multicast and Anycast Delivery Models
- Unicast, Broadcast, Multicast, Anycast
- IP Multicast Fundamentals
- Multicast Routing Protocols
- Multicast in Practice
- Anycast in Depth
- Comparing Delivery Models
Chapter 27: VPNs, Tunneling and Overlay Networks
- The Need for Private Networks Over Public Infrastructure
- Tunneling Fundamentals
- IPsec, The Internet Protocol Security Suite
- WireGuard, A Modern VPN Protocol
- Site-to-Site VPNs
- Overlay Networks in Data Centers
- Comparing VPN Technologies
Chapter 28: Operating System Networking Internals
- The Kernel as Network Participant
- Socket API: The User-Kernel Interface
- The Linux Networking Stack: sk_buff and Netfilter
- Interrupts, DMA and NIC Processing
- Connection Tracking and State Management
- Routing Tables and Policy Routing
- Memory Pressure and Packet Drops
Chapter 29: Practical Network Investigation Tools
- The Philosophy of Network Debugging
- ping, ICMP Echo and Reachability Testing
- traceroute, Path Discovery
- ip and ss, Interface and Socket Inspection
- dig, DNS Investigation
- curl, HTTP Client and Protocol Testing
- tcpdump and Wireshark, Packet Capture and Analysis
- Systematic Debugging Workflow
Chapter 30: Building a User-Space Networking Stack (Educational Implementation)
- Why Implement Protocols from Scratch
- Packet Parsing and Serialization
- Implementing ARP
- A Minimal UDP Implementation
- Simplified TCP State Machine
- Putting It Together: A Minimal Stack Architecture
Chapter 31: Data Center and Cloud Networking
- Scale Challenges in Modern Data Centers
- Spine-Leaf Architecture
- Overlay Networking in Data Centers
- Kubernetes Networking Model
- Cloud Provider Networking
- High-Performance Networking in Data Centers
Chapter 32: Advanced Topics, SDN, P4, eBPF and Modern Architecture
- Software-Defined Networking (SDN)
- P4, Programming Protocol-Independent Packet Processors
- eBPF, Programmable Kernel Networking
- MPLS, Multi-Protocol Label Switching
- Zero Trust Networking
- Observability in Modern Networks
- The Evolving Internet Architecture
Chapter 33: End-to-End Case Studies
- Case Study 1: Opening a Website from a Fresh Machine
- Case Study 2: Traversing Autonomous Systems via BGP
- Case Study 3: Reaching Cloud Infrastructure Through Load Balancers
- Case Study 4: Failure Modes and Recovery
Chapter 34: Protocol Design Principles and a Unified Mental Model
- What Makes a Good Protocol
- Trade-offs Everywhere
- A Unified Mental Model
- Engineering at Internet Scale
- Continuing Evolution
Conclusion
References
- Core IP and Routing RFCs
- Link Layer and Local Network RFCs
- Transport and Security RFCs
- Application Layer RFCs
- IPsec, VPNs and Tunneling RFCs
- Multicast and Anycast RFCs
- ICMP and Diagnostics RFCs
- Additional Authoritative Sources