Princeton University – Fall 2025
Instructor: Maria Apostolaki
Email: apostolaki@princeton.edu
Office Hours: [TBD]
Lecture Time: T Th,9:00 am – 10:20 am
Location: [TBD]


🧭 Course Description

The Internet is one of the most transformative technologies of our time—powering everything from communication and commerce to entertainment and education. But how does it actually work?

This course offers a comprehensive introduction to the design and implementation of computer networks, with a focus on the Internet. You will learn how data moves across the globe, from your laptop to services like Google and Netflix, and what happens at each step along the way. The course includes hands-on programming assignments and team projects to give you practical experience in network design and operation.

This is an introductory course—no prior networking experience is required.


🎯 Learning Outcomes

By the end of the course, you will be able to:

  • Understand how the Internet works end-to-end.
  • Build and operate a simplified Internet-like network.
  • Evaluate the performance and reliability of a network, using appropriate metrics.
  • Propose improvements or design alternatives for better performance or reliability.

📘 Textbook

  • Computer Networking: A Top-Down Approach, 6th Edition, by Kurose and Ross.
    Older editions are acceptable, but section numbers may differ.
  • Computer Networks: A Systems Approach, Larry Peterson and Bruce Davie

🧪 Course Components

🧵 Lectures

  • Weekly lectures introduce networking concepts and include an interactive part.

 Projects

You will complete two group projects (max 3 students per group):

  1. Internet Routing Project (Mid-Semester)
    Build and operate your own IP network. Then interconnect with peers to form a functioning class-wide Internet. We’ll wrap it up with a live Internet Hackathon.
  2. Reliable Communication Project (End of Semester)
    Implement a simple transport protocol ensuring reliable message delivery.

Projects must be submitted via GitHub by 11:59 PM on the due date. Late submissions follow this penalty schedule:

  • Up to 1 day late: 80%
  • Up to 2 days late: 70%
  • Up to 3 days late: 60%
  • Up to 7 days late: 50%
  • More than 7 days late: 0%

If you do not submit a project, you will receive a 1.0 grade for that component.

If you do not have a laptop, please contact the course staff at the beginning of the semester.


🧮 Grading

  • Final Exam: 40%
  • Project 1 (Routing):35%
  • Project 2 (Transport): 25%

The final exam is written.
Electronic devices are not allowed, except for basic calculators.


📌 Course Policies

  • Academic Integrity: You are encouraged to discuss concepts, but all code and written work must be your own (or your group’s).
  • Use of LLMs (Large Language Models): You may use LLMs (e.g., ChatGPT, GitHub Copilot) as a tool for brainstorming, clarifying concepts, or debugging, provided you:
    • Clearly document any use (exact prompt) in your code or reports (e.g., include a comment: “Used ChatGPT to explain TCP checksum calculation”).
    • Do not copy/paste full solutions to exercises or projects from LLMs.
    • Understand and are able to explain any output you incorporate.
  • Extensions: Available only under documented, exceptional circumstances.

🧠 Accessibility

If you require accommodations, please contact the Office of Disability Services and the course staff as early as possible.


 

Fundamental Network concepts

  • Forwarding vs Routing: Forwarding = local, fast; Routing = global, slower, computes paths.
  • Valid forwarding state: No dead ends, no loops → spanning tree per destination.
  • Computation methods:
    • Spanning-Tree: Simple, loop-free, but wastes links.
    • Link-State: Flood topology, compute shortest paths (Dijkstra).
    • Distance-Vector: Share distances with neighbors, update until convergence.
  • Forwarding logic: Hop-by-hop, based on destination header.
  • Destination-based routing: Paths merge into a spanning tree.

Ethernet & Switching (Link Layer)

  • Role: Provides local best-effort delivery; encapsulates packets into frames; handles framing, error detection, and flow control.
  • MAC Addresses: 48-bit, unique per adapter; used for link-level communication; broadcast address = all 1s; DHCP for IP assignment; ARP for IP-to-MAC mapping.
  • Medium Sharing: Multiple access requires coordination → CSMA/CD in early Ethernet; modern Ethernet is full-duplex (no collisions).
  • Ethernet: Dominant LAN tech, speeds from 10 Mbps to 400 Gbps; connectionless, unreliable; simple frame structure.
  • Switches: Replace hubs; store-and-forward, learn MACs automatically; flood unknown destinations; loops avoided using Spanning Tree Protocol (STP).
  • VLANs: Logical segmentation for performance, security, and flexibility; identified with 802.1Q tags; per-VLAN spanning trees.

Internet Protocol (IP) & Forwarding (Network layer)

  • IP addressing: IPv4 = 32-bit, IPv6 = 128-bit, hierarchical (prefix + host), CIDR for flexible subnetting.
  • Forwarding: Routers use longest prefix match; hierarchical allocation reduces table size.
  • IPv4 header: version, TTL, protocol, src/dst; supports fragmentation (ID, flags, offset).
  • IPv6: simpler header, no fragmentation, large address space.
  • NAT: shares one public IP with ports; breaks end-to-end.
  • Deployment: IPv4 still dominant; IPv6 adoption slow; dual-stack common.

Internet Routing

  • Routing types: Intra-domain (OSPF/IS-IS = Link-State, DV = Bellman-Ford); Inter-domain (BGP = Path-Vector).
  • Intra-domain: Link-State floods topology + Dijkstra; DV shares distances, slow, count-to-infinity.
  • Inter-domain (BGP): Exchanges prefixes + AS path, avoids loops, enforces policies, scales globally.

BGP Policies

  • BGP uses eBGP (between ASes) and iBGP (inside AS).
  • Four message types: OPEN, UPDATE, KEEPALIVE, NOTIFICATION.
  • Key attributes: NEXT-HOP, AS-PATH, LOCAL-PREF, MED.
  • Route selection: LOCAL-PREF > AS-PATH length > MED > eBGP > closest NEXT-HOP.
  • Policy: prefer customer > peer > provider; export all to customers, peers/providers only to customers.
  • Business model: customers pay providers; peers exchange for free; routing follows money.

BGP Challenges

  • Problems: Reachability, Security, Convergence, Performance, Anomalies.
  • Reachability: Policies can prevent connected networks from communicating.
  • Security: No origin/auth checks → prefix hijacks, bogus AS paths; hard to detect/debug.
  • Hijacks: Blackhole, snooping, impersonation; subprefix attacks are powerful.
  • Defense: RPKI (authenticates prefix origin) but limited; 1-hop hijacks still possible.
  • Convergence: Multiple stable states, possible oscillations; convergence check is PSPACE-hard.
  • Performance: Path selection ignores latency; follows business logic.
  • Complexity: Config is manual, error-prone, underspecified.

UDP – TCP

  • Goals: Correct app delivery (ports), reliability, flow & congestion control.
  • UDP: Unreliable, no control, 8-byte header, low delay; used in streaming, DNS, QUIC.
  • TCP: Reliable bytestream, connection setup (3-way), teardown (FIN/RST).
  • Reliability: ACKs, checksums, retransmit (timeout, fast retransmit after 3 dup ACKs).
  • Flow control: Sliding window; rate ≈ W/RTT.
    Loss recovery: RTT estimation, Karn’s algorithm, exponential backoff.

Reliable Transport

  • Reliability at L4 over best-effort IP.
  • Problems: loss, corruption, reorder, delay, duplication.
  • Solution: ACK + retransmit; tradeoff = timeout size.
  • Pipelining + sliding window for speed & flow control.
  • Window ≥ bandwidth-delay product.
  • ACK types: individual (detailed), cumulative (simple), full info (heavy).
  • Loss detection: timers, duplicate ACKs.
  • Fairness: max-min, use AIMD.
  • Corruption → checksum; reordering/duplicates handled via ACK logic.

Internet Congestion Control

  • Goal: Avoid overload, ensure fairness & efficiency.
  • TCP uses cwnd + rwnd; send rate = min(cwnd, rwnd).
  • Detect congestion: loss → timeout (severe), dup ACKs (mild).
  • Slow start: cwnd doubles each RTT until ssthresh.
  • AIMD: +1/cwnd per ACK, halve on loss.
  • Fast retransmit (3 dup ACKs), fast recovery (avoid reset to 1).
  • TCP shows “sawtooth” pattern for throughput.

DNS

  • DNS maps names → IPs using a hierarchical system (root → TLD → domain).
  • Three hierarchies: names, authority, servers.
  • Records: A/AAAA (IP), MX (mail), NS (nameserver), CNAME (alias), PTR (reverse).
  • Queries: Recursive (full resolution), Iterative (referrals).
  • Transport: UDP port 53; caching (TTL) for speed.
  • Root servers use anycast, multiple replicas for availability.

Video Delivery+HTTC

  • Goal: High quality, no rebuffering.
  • Method: Multi-bitrate encoding, CDN replication, adaptive bitrate (ABR).
  • ABR: Player picks chunk rate based on bandwidth or buffer; high buffer → higher rate, low buffer → lower rate.