Chapter 1: top-down approach to Computer Networking
Fundamentals and Architecture of the Internet
Nuts-and-Bolts View of the Internet
Billions of connected computing devices are called hosts or end systems.
End systems run network applications at the Internet's edge.
Packet switches forward chunks of data called packets through the network. Key examples of packet switches include routers and link-layer switches.
Communication links connect hosts and switches. Media types include fiber optic cable, copper wire, radio spectrum, and satellite links. Transmission capacity is measured by bandwidth or transmission rate (in bits per second, bps).
A network is a collection of devices, routers, and links managed and operated by a specific organization.
Interconnected Internet Service Providers (ISPs) form a complex global "network of networks".

Pervasive Internet Protocols and Standards
Protocols govern all communication activity across the Internet, controlling the sending and receiving of messages.
Core network protocols include TCP (Transmission Control Protocol), IP (Internet Protocol), HTTP (HyperText Transfer Protocol), Ethernet, WiFi (), and cellular standards (4G/5G).
Internet Standards guarantee interoperability between protocols:
IETF (Internet Engineering Task Force): The primary standard-setting body.
RFC (Request for Comments): Official technical documentations defining Internet protocols and architectures.
Services View of the Internet
The Internet serves as an infrastructure providing services to distributed applications, including Web browsing, streaming video, multimedia teleconferencing, email, gaming, e-commerce, social media, and connected Internet of Things (IoT) appliances.
It provides a programming interface—known as a socket API—to distributed applications:
Acts as a set of "hooks" allowing software applications running on different end systems to connect to and use the Internet transport service.
Provides distinct service options for data delivery (analogous to choosing between standard and express postal delivery).
Internet of Things (IoT) Examples
Web-enabled toasters with weather forecasters, IP picture frames, smart pacemakers and monitors, augmented reality (AR) glasses, fitness trackers (Fitbit), smart diapers (Lumi by Pampers), sensorized mattresses (Eight Sleep), smart speakers (Amazon Echo), gaming consoles (Xbox), connected vehicles (Tesla dashboards), micro-mobility devices (scooters, bikes), security cameras (Swann), IP phones, and energy monitors (Kill A Watt).
Network Protocols
Definition of a Protocol
A network protocol defines the format, order, and structure of messages sent and received among network entities, as well as the specific actions taken upon message transmission, message receipt, or the occurrence of external events.
Human vs. Computer Network Protocols
Human Protocol Analogy:
Person A initiates conversation: "Hi".
Person B responds: "Hi".
Person A asks: "Got the time?".
Person B responds: "2:00".
Rules require waiting for a specific response before asking a specific question.
Computer Network Protocol:
Host sends a
TCP connection requestpacket to a server.Server returns a
TCP connection responsepacket.Host sends a
GET http://gaia.cs.umass.edu/kurose_rossrequest packet.Server sends back the requested file data in a packet.

Network Edge, Access Networks, and Physical Media
Network Edge Infrastructure
Hosts / End Systems: Devices connected to the network, classified as clients (desktop PCs, smartphones, laptops) and servers (machines hosting web pages, video streams, or databases, typically located in data centers).
Access Networks
Access networks physically connect end systems to the first router (the edge router) on a path to any other host.
Cable-Based Access Networks:
Utilizes Frequency Division Multiplexing (FDM): Different communication channels are transmitted concurrently in distinct frequency bands over a shared cable.
Channels are allocated for analog/digital video, data, and control signals.
Architecture uses Hybrid Fiber-Coax (HFC): Fiber connects the cable headend to regional nodes, and coaxial cables connect individual homes to those nodes.
Asymmetric transmission capabilities: Downstream transmission rates range from up to ; upstream transmission rates range from to .
Shared access infrastructure: Multiple homes share the cable distribution network reaching the Cable Modem Termination System (CMTS) at the cable headend.

Digital Subscriber Line (DSL):
Employs pre-existing copper telephone landlines running to a local telephone central office (CO).
FDM splits the telephone wire into distinct frequency ranges: high-speed data going to the Internet, traditional analog voice signals going to the public telephone network.
Dedicated line per customer (unlike shared HFC cable).
Asymmetric transmission capabilities: Dedicated downstream rates range from to ; dedicated upstream rates range from to .
Home DSL modems connect to a Digital Subscriber Line Access Multiplexer (DSLAM) located at the central office.
Home Networks:
A typical residential setup combines multiple components into a single hardware device:
Cable or DSL modem.
Router, stateful firewall, and Network Address Translation (NAT) engine.
Wired Ethernet switch running at rates up to .
WiFi wireless access point running standards (, , or ).
Enterprise Access Networks:
Used in companies, universities, and institutions.
Combines wired Ethernet switches (, , ) and WiFi access points (, , ) connected to institutional routers and local servers.
Data Center Networks:
High-bandwidth links running at to of interconnect thousands of servers in racks and link the data center directly to the network core.
Wireless Access Networks:
Connects end systems to a router via a shared base station or access point.
Wireless Local Area Networks (WLANs / WiFi): Operates within a building or localized area ( / ) with transmission rates up to .
Wide-Area Cellular Networks: Provided by mobile network operators over distances of several kilometers; networks achieve speeds of to of .
Bluetooth: Short-range, low-rate cable replacement.
Terrestrial Microwave: Point-to-point links with channels operating around .
Satellite Networks: Downlink rates up to (e.g., Starlink); geostationary satellites introduce an end-to-end propagation delay of approximately .
Host Transmission Delay Mechanics
An application message of size is broken into packets.
A packet is transmitted across a link with transmission rate (bandwidth/capacity) .
Packet Transmission Delay Formula:
Numerical Example: If a packet length () and link transmission rate ():
Physical Transmission Media
Bits propagate as electromagnetic or optical signals across physical links between transmitter-receiver pairs.
Guided Media: Signals propagate along solid, physical conduits.
Twisted Pair (TP): Two insulated copper wires twisted together.
Category 5: Supports and Ethernet.
Category 6: Supports Ethernet.
Coaxial Cable: Two concentric copper conductors separated by insulation; bidirectional, supporting broadband multi-channel transmission at speeds of of per channel.
Fiber Optic Cable: Glass fibers carrying pulses of light, where each pulse represents a single bit.
Ultra-high-speed point-to-point operation ( to of ).
Low bit error rate: Signal repeaters can be spaced far apart due to immunity to electromagnetic interference.
Unguided Media: Signals propagate freely through air or space (radio channels).
Unidirectional or omnidirectional broadcast (half-duplex mode: sender to receiver).
Subject to environmental impairments: signal reflection off objects, physical path obstruction, and radio frequency interference/noise.
Network Core and Internet Hierarchy
Structure of the Network Core
The network core consists of a mesh of interconnected packet switches (routers) responsible for forwarding data packets across intermediate links from source to destination.
Key Functions of the Network Core
Forwarding (Switching): A localized action in which a router moves an arriving packet from its input link to the appropriate output link based on values in the packet header and entries in the local forwarding table.
Routing: A global network action in which routing algorithms determine the end-to-end paths packets take from source hosts to destination hosts.
Highway Analogy: Routing is analogous to planning an entire driving route across multiple state highways; forwarding is analogous to taking a specific exit ramp at an interchange.

Packet-Switching Principles
Store-and-Forward Transmission: A packet switch must receive the entire packet () before it can begin transmitting the first bit of that packet onto the outgoing link.
Queueing Delays and Packet Loss:
If the arrival rate of packets (in bits per second) to an outgoing link exceeds the transmission capacity of that link for a period of time, packets accumulate in memory buffers (queues).
If the router's memory buffer fills completely, newly arriving packets are dropped (lost).
Alternative Architecture: Circuit Switching
Dedicated end-to-end resources (bandwidth, switch processing) are reserved for the duration of a "call" or session between source and destination (e.g., traditional telephone networks).
Bandwidth is partitioned into distinct channels:
Frequency Division Multiplexing (FDM): Electromagnetic frequency range is divided into separate narrow bands; each call gets its own band.
Time Division Multiplexing (TDM): Time is divided into repeating frames consisting of fixed time slots; each call gets dedicated slots in which it transmits at the full frequency band speed.
Guaranteed performance without queueing delays; however, resources remain idle when not actively used by the call (no resource sharing).
Packet Switching vs. Circuit Switching Quantitative Comparison
Scenario: A () link shared by users who each require when active, but are active only of the time ( active probability).
Circuit Switching Capacity: Exactly users ().
Packet Switching Capacity: Supports concurrent users.
With users, the probability that more than users are active simultaneously at any given instant is less than ().
Packet switching allows for dynamic resource sharing, making it far superior for bursty traffic, while requiring no complex connection setup.
Internet Architecture: A "Network of Networks"
Access ISPs cannot connect directly to every other access ISP, as access ISPs would require direct links.
The hierarchy evolved through economic and technical drivers into structured tiers:
Tier-1 Commercial ISPs: Global and national backbones (e.g., Level 3, Sprint, AT&T, NTT) that interconnect with each other directly.
Internet Exchange Points (IXPs): Third-party meeting points where competitive Tier-1 and regional ISPs connect to exchange traffic directly (peering).
Regional ISPs: Intermediate networks connecting local access ISPs to global Tier-1 providers.
Content Provider Networks: Private networks operated by massive tech companies (e.g., Google, Facebook, Akamai) that run their own data center interconnections and connect directly to regional ISPs or IXPs, bypassing the public Tier-1 commercial Internet backbone.
Network Performance: Loss, Delay, and Throughput
Four Sources of Nodal Delay
The total nodal delay () experienced by a packet at a router consists of four additive components:
Nodal Processing Delay ():
Time required to examine the packet header, check for bit errors, and determine the output link.
Typically takes less than a microsecond ().
Queueing Delay ():
Time spent waiting in the router buffer for transmission over the output link.
Dependent on the level of link congestion.
Transmission Delay ():
Time needed to push all of the packet into the link with transmission rate .
.
Propagation Delay ():
Time required for a single bit to travel from the beginning of the link to the next router across physical length at propagation speed ( in copper/fiber).
.
Caravan Analogy for Transmission vs. Propagation Delay

Scenario 1: A caravan of cars ( packet) travels down a highway across links between toll booths.
Toll booth service time per car: .
Highway propagation speed: .
Time to push the entire caravan through the 1st toll booth: ().
Travel time for the last car between booths: ().
Total time until entire caravan queues at 2nd toll booth: .
Scenario 2: Cars propagate at , and toll booths take per car.
First car propagates to 2nd booth in ().
Adding the service time at booth 1, the first car arrives at the 2nd booth after , while cars are still queued at booth 1.
Queueing Delay Dynamics and Traffic Intensity
Let be the average packet arrival rate (packets/sec), be the packet length (bits), and be the link transmission rate (bps).
The ratio is defined as the traffic intensity:
: Queueing delay is minimal or near zero.
: Queueing delay increases non-linearly to large values.
: Bit arrival rate exceeds bit service capacity; average queue length and queueing delay approach infinity.
Internet Measuring Tools: Traceroute
The
tracerouteprogram measures delay along end-to-end Internet paths by sending sets of three probe packets with increasing Time-To-Live (TTL) values () to reach successive routers along the path.Routers return expired TTL notification packets, enabling
tracerouteto calculate round-trip times.Asterisks (
*) in traceroute output denote dropped probe packets or non-responsive routers (e.g., firewalls blocking ICMP messages).Throughput
Throughput is the rate (in bits/time unit) at which bits are delivered from a sender to a receiver.
Instantaneous Throughput: Measured rate at a specific point in time.
Average Throughput: Measured rate over an extended time interval.
Bottleneck Link: The specific link on an end-to-end path that limits total end-to-end throughput.
In a path with server rate , client rate , and shared core link rate split among connections, per-connection throughput is:
Network Security
Security Foundations and Challenges
The original Internet architecture was designed around a model of mutually trusting users connected to a transparent network.
Modern security principles focus on threats across all protocol layers and lines of defense:
Packet Sniffing: Promiscuous network interfaces connected to broadcast or shared media (shared Ethernet, open WiFi) read and capture passing packets, exposing unencrypted passwords and payload data (e.g., using packet analyzers like Wireshark).
IP Spoofing: Injecting packets into a network using false or forged source IP addresses.
Denial of Service (DoS) / Distributed Denial of Service (DDoS): Attackers flood target servers or network links with bogus traffic from compromised host botnets to render resources unavailable to legitimate users.
Defense Mechanisms:
Authentication: Verifying user identity (e.g., SIM cards in cellular networks).
Confidentiality: Applying strong end-to-end or link-layer encryption.
Integrity Checks: Digital signatures to detect tampering.
Firewalls and Middleboxes: Specialized devices filtering inbound/outbound network traffic using off-by-default policies.
Protocol Layers and Service Models
Layering System Principles
Complex systems are designed using modular, layered architectures to structure identification and maintenance.
Each layer implements specific services through its internal actions while relying directly on services provided by the layer below it.
Airline Travel Analogy: Ticketing Baggage check Gate loading Runway takeoff Airplane routing. Changes at one layer (e.g., gate boarding updates) do not affect operations at other layers.
The Five-Layer Internet Protocol Stack
Application Layer: Supports network application protocols (e.g., HTTP, IMAP, SMTP, DNS). Data unit: Message ().
Transport Layer: Provides process-to-process data transfer across host systems (e.g., TCP, UDP). Data unit: Segment ().
Network Layer: Routes datagrams from source host to destination host (e.g., IP protocol, routing protocols). Data unit: Datagram ().
Link Layer: Transfers data frames between adjacent network elements/nodes over a physical link (e.g., Ethernet, WiFi , PPP). Data unit: Frame ().
Physical Layer: Transmits raw individual bits across physical transmission wires or unguided media.
Encapsulation and Decapsulation
Encapsulation: As an application message () descends the stack, each lower layer wraps a header (, , ) around the payload received from the layer above.
Matryoshka Doll Analogy: Outer nesting dolls represent lower-layer protocol headers containing smaller inner dolls representing upper-layer payloads.


The Seven-Layer ISO/OSI Reference Model
Defines two additional layers not explicitly present in the 5-layer Internet stack (located between Application and Transport):
Presentation Layer: Handles data interpretation, encryption, compression, and machine-specific data conventions.
Session Layer: Manages data stream synchronization, checkpointing, and recovery.
In the Internet architecture, these functions are built directly into the application layer if needed by the developer.
Extended Model T-Shirt Humor: Highlights Layer 8 (Financial) and Layer 9 (Political) as real-world extensions.

History of the Internet
1961–1972: Early Packet-Switching Development
1961: Leonard Kleinrock publishes queueing theory proving the efficiency of packet-switching for bursty traffic.
1964: Paul Baran investigates packet-switching for survivable military networks.
1967: ARPAnet concept formulated by the Advanced Research Projects Agency (ARPA).
1969: First operational ARPAnet node installed.
1972: First public demonstration of ARPAnet; Network Control Protocol (NCP) deployed as the first host-to-host protocol; initial e-mail programs developed; ARPAnet reaches nodes.

1972–1980: Internetworking and Proprietary Networks
1970: ALOHAnet satellite network established in Hawaii.
1974: Vinton Cerf and Robert Kahn define basic internetworking principles for connecting distinct networks.
1976: Ethernet designed and implemented at Xerox PARC.
Late 1970s: Proprietary network architectures emerge (DECnet, SNA, XNA); ARPAnet grows to nodes.
Cerf and Kahn's Internetworking Principles:
Minimalism and Autonomy: Interconnecting networks requires no internal configuration changes.
Best-Effort Service Model: No state tracking inside core routers.
Stateless Routers and Decentralized Control.
1980–1990: New Protocols and Proliferation
1982: SMTP email protocol defined.
1983: Official deployment of TCP/IP on ARPAnet (replacing NCP); DNS (Domain Name System) introduced for hostname-to-IP address mapping.
1985: FTP file transfer protocol defined.
1988: TCP congestion control algorithms introduced by Van Jacobson.
Deployment of national networks (CSnet, BITnet, NSFnet, Minitel); connected hosts surpass .
1990s–2000s: Commercialization and the World Wide Web
Early 1990s: ARPAnet decommissioned; NSF lifts commercial restrictions on NSFnet (decommissioned in 1995).
Web Architecture: Hypertext roots (Vannevar Bush 1945, Ted Nelson 1960s); HTML and HTTP protocols created by Tim Berners-Lee.
1994: Release of Mosaic browser, followed by Netscape.
Late 1990s–2000s: Rapid commercialization; emergence of killer apps (instant messaging, P2P file sharing); host count reaches with over users; backbone bandwidth reaches speeds.
2005–Present: Scale, SDN, Mobility, and the Cloud
Mass deployment of broadband residential access ( of ).
2008: Introduction of Software-Defined Networking (SDN).
Ubiquitous mobile access via cellular and high-speed WiFi networks.
Massive hyperscale providers (Google, Facebook, Microsoft) deploy private global networks bypassing the commercial Internet.
Cloud computing migration (Amazon Web Services, Microsoft Azure).
Mobile devices surpass fixed hosts on the Internet (starting in 2017); attached Internet devices grow to over by 2023.