==================== 0. LOGISTICS, REVIEW, OUTLINE ==================== * Logistics: Lecture 2 notes and outline are on the web site * Logistics: Chapters from K&R (6th and 7th eds) are on the web site * Last class: 5 layers * This class: 1. The Internet’s original goals 2. Packet vs. circuit switching 3. Where the 5 layers are in today's Internet? 4. Measuring the Internet's performance ==================== 1. THE INTERNET'S GOALS ==================== 1.1 Why care about it? ---------------------- * First, what is the Internet formally? * What networks does it interconnect? * Useful to understand original requirements for the rest of the course. * Ponder two questions: are these requirements still important, are there new ones? 1.2 The goal of low-effort interconnection ---------------------- * Connect together existing networks. Earlier: the ARPANET, the ARPA packet radio network. Today: cellular, WiFi, satellitle, etc. * Impose minimal requirements on gateways between networks * Minimal gateway requirement: unreliable best-effort packet forwarding * Later formulated as the e2e principle: do things on end hosts unless absolutely required * Example of implementing reliability ** Can do this on end hosts alone ** Can't do this on routers alone ** Hence, don't bother about doing it on routers 1.3 The goal of generality and the idea of layering ----------------------- * Didn't know what would run on the Internet * Didn't know what the Internet would run on * Try to make it general in every way. * Led to the 5-layer architecture * Each layer does one thing well. * Clean interface to the next layer. * Examples: ** Application layer: support many different apps ** Transport: Reliable and unreliable e2e delivery ** Routing: Getting data from California to NY ** Link layer: Getting data locally ** Physical: The electrical details * Layering allows different people to work independently on each layer. ** Rails developer does not need to know routing ** AT&T network operator does not need to know WiFi. ** Linksys engineer does not need to know antenna design. ** In other words, lets you do something productively without knowing everything. 1.4 Non-goals for the Internet ------------------------ * Security (no one thought there would be bad guys on it in 1974 :) * Performance * Design may have been different if the goals were different. ===================== 2. PACKET VS. CIRCUIT SWITCHING ===================== 2.1 Circuit switching ------------------------ * The way telephone networks worked * Set up an electrical connection from sender to receiver * Great fit for telephony that had fixed bandwidth requirements * Provided performance guarantees and isolation between conversations * But, ** Inefficient for the Internet's applications that don't constantly send data. ** Requires links to be highly reliable ** Initial delay in call setup 2.2 Packet switching -------------------------- * Divide data into smaller chunks called packets. * Route packets independently using packet header. * Sounds obvious now, but wasn't in the 1960s. * Benefits: ** Exploits the common case: two applications don't usually transmit at the exact same time. So you can time-share the link across packets from both apps. ** Fault-tolerant: Detour packets if link is down. ** No setup caust: Send packets right away. * But, ** Two applications may send at the same time. ** Leads to queueing delays. ** Performance variable depending on who else is on the network 2.3 Why the Internet used packet switching ---------------------------- * Circuit switching needs links to be very reliable. * Would have posed high barrier to entry: Telcos spent an enormous amount on this. * Internet was designed for low-effort attachment * The Internet didn't need guaranteed performance anyway. * Besides, packet switching provided better network utilization anyway (by time multiplexing) * Another reason: circuit switching needed a whole lot of state to be maintained on the router for each connection in the network. This state was required to know which outgoing link to send the packet on for each connection. Example of state: configuration of cables and sockets in the telephone exchange. ========================= 3. WHERE ARE THE LAYERS? ========================= 3.1 The application layer ---------------------------- * Implemented in application: browser, Skype, Facebook, etc. 3.2 Transport layer ---------------------------- * Reliable, in-order transport (TCP) * Unreliable, datagram-based transport (UDP) * Different services for different applications ** TCP: file transfer ** UDP: Video conferencing, live streaming * Implemented in the end-host kernel to serve many different applications 3.3 Routing layer ---------------------------- * Global delivery of data from one point to another * IP protocol that carries the packet's destination as a header * Implemented in end hosts: to set destination * Implemented in routers: to forward based on destination 3.4 Link and physical layers ---------------------------- * Local part of the Internet: from laptop to AP, desktop to switch * Implemented in your WiFi/Ethernet card * Implemented in your switch/AP * Combination of hardware and software. * Typically, innovation is easier at the higher layers because they require you to get less close to the underlying hardware. >>>>>>>> Could do a tcpdmp/wireshark demo here if time permits. ============================ 4. INTERNET PERFORMANCE =========================== 4.1 Throughput ---------------------------- * Aggregate metric: data per second * Different at each layer because of protocol overheads * In-order delivery reduces throughput further if bytes are lost 4.2 Latency --------------------------- * Per-packet metric: how long does it take for packets to get from one end to another? >>>>>>>>>>>DEMO: Could do a ping demo here if time permits. 4.3 What do applications care about? --------------------------- * File transfer: throughput * Audio calls: latency * Video conferencing: both * Will later see more precise ways of capturing application preferences 4.4 Performance differences between packet, circuit switching -------------------------- * Everything is guaranteed in circuit switching. * But, a call might be rejected if there isn't enough network capacity. * In packet switching, performance is variable. * But, you are never prevented from getting on to the network.