CS 372 – introduction to computer networks* Lecture 3: Wednesday June 23 Announcements: Assignment 1 is posted online and is due next Tuesday Quiz on next Tuesday Lab 1 is posted and is due next Monday No late lab and assignment will be accepted! * Based in part on slides by Bechir Hamdaoui, Paul D. Paulson, and Dina Katabi. Acknowledgement: slides drawn heavily from Kurose & Ross Chapter 1, slide: 1 The network core: Packet switching Data transmitted in small, independent pieces Source divides outgoing messages into packets Destination recovers original data Each packet travels independently Includes enough information for delivery May follow different paths Can be retransmitted if lost Chapter 1, slide: 2 The network core: Functions of packet-switching networks Packet construction encode/package data at source Packet transmission send packet from source to destination Packet interpretation unpack/decode data from packet at destination acknowledge receipt Chapter 1, slide: 3 The network core: other functions Route discovery Traffic/congestion control Retransmitting lost packets Determining type of data messages service requests/responses files audio/video etc. etc. Chapter 1, slide: 4 Packet switching: Reordering and different path Host C Host D Host A Node 1 Node 2 Node 3 Node 5 Host B Node 6 Node 7 Host E Node 4 Chapter 1, slide: 5 Chapter 1: roadmap 1 What is the Internet? 2 Network edge 3 Network core 4 Network access and physical media 5 Internet structure and ISPs 6 Protocol layers, service models 7 Delay & loss in packet-switched networks Chapter 1, slide: 6 Access networks and physical media Q: How to connect end systems to edge router? residential access nets institutional access networks (school, company) mobile/wireless access networks Chapter 1, slide: 7 Physical Media why is it needed? to propagate bits between sender/receiver pairs what is it? a physical link that lies between sender & receiver two types of media: guided media: signals propagate in solid media unguided media: signals propagate freely, e.g., wireless radio Chapter 1, slide: 8 Residential access: point to point access Dialup via modem regular twisted-pair copper phone lines up to 56Kbps direct access to router (often less) rate depends on thickness and distance may pick up interference (“noise”) can’t surf and phone at same time: can’t be “always on” Chapter 1, slide: 9 Residential access: point to point access ADSL: asymmetric digital subscriber line regular phone lines transmission rates depend on length point-to-point medium (dedicated) up to 1 Mbps upstream (today typically < 256 kbps) up to 8 Mbps downstream (today typically < 1 Mbps) FDM: 50 kHz - 1 MHz for downstream 4 kHz - 50 kHz for upstream 0 kHz - 4 kHz for ordinary telephone Chapter 1, slide: 10 Guided Media: coaxial cable two concentric copper conductors baseband: single channel on cable legacy Ethernet broadband: multiple channels on cable hybrid fiber-coax cable (HFC) Cable TV rate depends on thickness and distance less interference than twisted pair Chapter 1, slide: 11 Residential access: cable modems HFC: hybrid fiber coax asymmetric up to 30Mbps downstream up to 2 Mbps upstream network of cable and fiber attaches homes to ISP router Shared medium deployment: available via cable TV companies Chapter 1, slide: 12 Cable Network Architecture: Overview Typically 500 to 5,000 homes cable headend cable distribution network (simplified) home Chapter 1, slide: 13 Cable Network Architecture: Overview server(s) cable headend cable distribution network home Chapter 1, slide: 14 Cable Network Architecture: Overview cable headend cable distribution network (simplified) home Chapter 1, slide: 15 Cable Network Architecture: Overview FDM: V I D E O V I D E O V I D E O V I D E O V I D E O V I D E O D A T A D A T A C O N T R O L 1 2 3 4 5 6 7 8 9 Channels cable headend cable distribution network home Chapter 1, slide: 16 Company access: local area networks local area networks (LAN), more in chapter 5 connect end system to edge router E.g., universities, companies Example: Ethernet: shared or dedicated link connects end system to router 10 Mbs, 100Mbps, Gigabit Ethernet Chapter 1, slide: 17 Wireless access networks wireless access network connects end system to router via base station or “access point” Examples: wireless LANs: router base station 802.11b/g (WiFi): 11 or 54 Mbps wider-area wireless access provided by telcomm operator 3G ~ 384 kbps GPRS in Europe/US mobile hosts Chapter 1, slide: 18 Chapter 1: roadmap 1 What is the Internet? 2 Network edge 3 Network core 4 Network access and physical media 5 Internet structure and ISPs 6 Protocol layers, service models 7 Delay & loss in packet-switched networks Chapter 1, slide: 19 Internet structure: network of networks roughly hierarchical: tier 1, tier 2, and tier 3 at center: “tier-1” ISPs e.g., MCI, Sprint, AT&T, Cable and Wireless, national/international coverage Tier-1 providers interconnect (peer) privately Tier 1 ISP Tier 1 ISP NAP Tier-1 providers also interconnect at public network access points (NAPs) Tier 1 ISP Chapter 1, slide: 20 Tier-1 ISP: e.g., Sprint Sprint US backbone network DS3 (45 Mbps) OC3 (155 Mbps) OC12 (622 Mbps) OC48 (2.4 Gbps) Seattle Tacoma Stockton San Jose Cheyenne Kansas City New York Pennsauken Relay Wash. DC Chicago Roachdale Anaheim Atlanta Fort Worth Orlando Chapter 1, slide: 21 Internet structure: network of networks “Tier-2” ISPs: smaller (often regional) ISPs Connect to one or more tier-1 ISPs, possibly other tier-2 ISPs Tier-2 ISP Tier-2 ISP Tier 1 ISP Tier-2 ISP is customer of tier-1 provider Tier 1 ISP Tier-2 ISP NAP Tier 1 ISP Tier-2 ISPs also peer privately with each other, interconnect at NAP Tier-2 ISP Tier-2 ISP Chapter 1, slide: 22 Internet structure: network of networks “Tier-3” ISPs and local ISPs last hop (“access”) network (closest to end systems) local ISP Local and tier3 ISPs are customers of higher tier ISPs connecting them to rest of Internet Tier 3 ISP Tier-2 ISP local ISP local ISP local ISP Tier-2 ISP Tier 1 ISP Tier 1 ISP Tier-2 ISP local local ISP ISP NAP Tier 1 ISP Tier-2 ISP local ISP Tier-2 ISP local ISP Chapter 1, slide: 23 Internet structure: network of networks a packet passes through many networks! local ISP Tier 3 ISP Tier-2 ISP local ISP local ISP local ISP Tier-2 ISP Tier 1 ISP Tier 1 ISP Tier-2 ISP local local ISP ISP NAP Tier 1 ISP Tier-2 ISP local ISP Tier-2 ISP local ISP Chapter 1, slide: 24 Chapter 1: roadmap 1 What is the Internet? 2 Network edge 3 Network core 4 Network access and physical media 5 Internet structure and ISPs 6 Protocol layers, service models 7 Delay & loss in packet-switched networks Chapter 1, slide: 25 Protocol “Layers” Networks are complex! many “pieces”: hosts routers links of various media applications protocols hardware, software Question: Is there any hope of organizing structure of network? Or at least our discussion of networks? Chapter 1, slide: 26 Organization of air travel ticket (purchase) ticket (complain) baggage (check) baggage (claim) gates (load) gates (unload) runway takeoff runway landing airplane routing airplane routing airplane routing a series of steps Chapter 1, slide: 27 Layering of airline functionality ticket (purchase) ticket (complain) ticket baggage (check) baggage (claim baggage gates (load) gates (unload) gate runway (takeoff) runway (land) takeoff/landing airplane routing airplane routing airplane routing departure airport airplane routing airplane routing intermediate air-traffic control centers arrival airport Layers: each layer implements a service via its own internal-layer actions relying on services provided by layer below Chapter 1, slide: 28 Why layering? Dealing with complex systems: Easing assignment of tasks identify relationship among pieces of complex systems Easing maintenance, updating of system change of implementation of layer’s service transparent to rest of system e.g., change in gate procedure doesn’t affect rest of system Chapter 1, slide: 29 Internet protocol stack application: supporting network applications FTP, SMTP, HTTP transport: process-process data transfer TCP, UDP network: routing of datagrams from source to destination IP, routing protocols link: data transfer between application transport network link physical neighboring network elements PPP, Ethernet physical: bits “on the wire” Chapter 1, slide: 30 Encapsulation source message segment M Ht M datagram Hn Ht M frame Hl Hn Ht M application transport network link physical link physical switch destination M Ht M Hn Ht Hl Hn Ht M M application transport network link physical Hn Ht Hl Hn Ht M M network link physical Hn Ht M router Chapter 1, slide: 31 ISO/OSI Model: late 70’s application presentation session transport application transport network network link data link physical physical 7-layer ISO/OSI model (OSI: open system interconnections) 5-layer Internet Protocol Stack Chapter 1, slide: 32 Chapter 1: roadmap 1 What is the Internet? 2 Network edge 3 Network core 4 Network access and physical media 5 Internet structure and ISPs 6 Protocol layers, service models 7 Delay & loss in packet-switched networks Chapter 1, slide: 33 Network performance metrics End-to-end delay (nodal delay) : Total time from initiating “send” (from source) to completed “receive” (at destination) Throughput : Rate (bits/sec) at which bits are actually being transferred between sender/receiver instantaneous: rate at given point in time average: rate over longer period of time Chapter 1, slide: 34 Sources of packet delay 1. nodal processing: check bit errors determine output link 2. queueing time waiting at output link for transmission depends on congestion level of router A B nodal processing queueing Chapter 1, slide: 35 Sources of packet delay 4. Propagation delay: 3. Transmission delay: R=link bandwidth (bps) d = length of physical link L=packet length (bits) s = propagation speed in medium (~2x108 m/sec) propagation delay = d/s trans. delay = L/R Note: s and R are very different quantities! transmission A propagation B nodal processing queueing Chapter 1, slide: 36 How do loss and delay occur? packet being transmitted (delay) A B packets queueing (delay) packets get dropped (loss) if no free buffers Chapter 1, slide: 37 Packet loss queue (buffer) preceding link in buffer has finite capacity packet arriving at a full queue is dropped (lost) lost packet may be retransmitted by previous node, by source, or not at all buffer packet being transmitted (waiting area) A B packet arriving to full buffer is lost Chapter 1, slide: 38 Caravan analogy 100 km ten-car caravan toll booth Cars run at 100 km/hr (speed of propagation) Booth takes 12 sec to service a car (transmission time) car~bit; caravan ~ packet Q: How long until caravan is lined up before 2nd toll booth? 100 km toll booth Time to “push” entire caravan through toll booth = 12*10 = 120 sec = 2 mns Time for last car to propagate from 1st to 2nd toll both: =100km/(100km/hr)= 1 hr A: 1 hr 2 minutes Chapter 1, slide: 39 Caravan analogy (more) 100 km ten-car caravan toll booth Cars now “propagate” at 1000 km/hr Toll booth now takes 1 min to service a car Q: Will cars arrive to 2nd booth before all cars serviced at 1st booth? 100 km toll booth Yes! After 7 min, 1st car at 2nd booth and 3 cars still at 1st booth. 1st bit of packet can arrive at 2nd router before packet is fully transmitted at 1st router! Chapter 1, slide: 40 Example Packet length = L bits Host A trans. rate R = 1 Mbps Host B distance = 1 km, speed = 2x108m/s Question: Which bit is being transmitted at the time the first bit arrives at Host B for Answer: First bit arrives after 1/R + d/s = 1/106 + 103/(2x108) = 10-6 + 5x10-6 = 6x10-6 = 6 µsec After 6 µsec 6 bits are already transmitted; so 7th bit is being transmitted Chapter 1, slide: 41 Nodal delay d nodal d proc d queue d trans d prop dproc = processing delay typically a few microsecs or less dqueue = queuing delay depends on congestion dtrans = transmission delay = L/R, significant for low-speed links dprop = propagation delay a few microsecs to hundreds of msecs Chapter 1, slide: 42 Queueing delay (revisited) Packet arrival rate = a packets/sec Packet length = L bits queue Link bandwidth = R bits/sec Every second: aL bits arrive to queue Every second: R bits leave the router Question: what happens if aL > R ? Answer: queue will fill up, and packets will get dropped!! aL/R is called traffic intensity Chapter 1, slide: 43 Queueing delay (revisited) Packet arrival rate = a packets/sec queue Packet length = L bits Link bandwidth = R bits/sec La/R ~ 0: avg. queueing delay small La/R -> 1: delays become large La/R > 1: more “work” than can be serviced, average delay infinite! Chapter 1, slide: 44 Exercise 1 Transmission vs. propagation L=100Bytes Host A Question: trans. rate R = ? Host B distance = 2 km, speed = 2x108m/s At what rate (bandwidth) R would the propagation delay equal the transmission delay? Answer: Propagation delay = 2x103 (m)/2x108 (m/s) = 10-5 sec Transmission delay = 100x8 (bits)/R Prop. Delay = trans. Delay => R=105x100x8 = 80 Mbps Chapter 1, slide: 45 Exercise 2 Voice over IP L=48 Bytes a=64Kbps Host A trans. rate R = 1Mbps Host B delay_prop = 2msec Host A converts analog to digital at a=64Kbps groups bits into L=48Byte packets sends packet to Host B as soon it gathers a packet As soon as it receives the whole pckt, it converts it to analog Host B Question: How much time elapses from the 1st bit is created until the last bit arrives at Host B? Chapter 1, slide: 46 Exercise 2 Voice over IP L=48 Bytes a=64Kbps Host A trans. rate R = 1Mbps delay_prop = 2msec Host B Answer: Time to gather 1st pkt: 48x8 (bits)/64x1000 (b/s) = 6 msec Time to push 1st pkt to link: 48x8 (bits)/1x106 (b/s) = 0.384 msec Time to propagate: 2 msec Total delay = 6 + 0.384 + 2 = 8.384 msec Chapter 1, slide: 47 Introduction: Summary Covered a “ton” of material! Internet overview what’s a protocol? network edge, core, access network packet-switching versus circuit-switching Internet/ISP structure performance: loss, delay layering and service models You now have: context, overview, “feel” of networking more depth, detail to follow! Chapter 1, slide: 48