CS 164 : Computer Networks My name : Srikanth Krishnamurthy TAs : Jianxia Ning (jning@cs.ucr.edu) Office hrs: W 10-11 a.m. Web Site:TBA Please make sure you subscribe to mailing list of CS 164 1 • Attendance to Labs are Compulsory • Written homework assigned and collected one week later. • If you miss more than 2 homework assignments, then there will be a penalty assessed. • In Lab assignments need to be completed in the lab. • One project -- individual effort. • No cooperation on anything in this course. • Very Important : Please ask questions in class - if you don’t understand something please let me know. • Otherwise I have no way of knowing! 2 • Three quizzes -- approximately 3 weeks apart. • Each Quiz will be for 15 points • We will only take your best two quizzes. • Multiple choice • Final Exam -- about 35 % • Project -- 15 % • Labs -- 10 % • Homeworks 10 % • More specific details will be on website in a day or two. 3 Roadmap for this lecture o Introduction -- Chapter 1. Whatever I don’t cover is for self-study. o The Internet and networks in general o Basic types of connections between computers o How is information sent from one point to the other ? o What are protocols and what role do they play ? 4 Internet and Stuff:The Basics o What is the Internet? o What does it consist of? o Main terminology and lingo o Fundamental Concepts Re-using some slides from Kurose and Ross book -- a reference book that you may want to refer to if you are interested. Contents still reflect Chapter 1 from book. 5 Visualizing the Internet o millions of connected computing devices: hosts, endsystems pc’s workstations, servers PDA’s phones, toasters router server o mobile local ISP running network apps o communication links workstation regional ISP fiber, copper, radio, satellite routers: forward packets (chunks) of data thru network company network 6 “Cool” Internet Appliances IP picture frame http://www.ceiva.com/ World’s smallest web server http://www-ccs.cs.umass.edu/~shri/iPic.html Web-enabled toaster+weather forecaster http://dancing-man.com/robin/toasty/ 7 Internet structure: network of networks roughly hierarchical o national/international backbone providers (NBPs) o o o e.g. BBN/GTE, Sprint, AT&T, IBM, UUNet interconnect (peer) with each other privately, or at public Network Access Point (NAPs) regional ISPs local ISP connect into NBPs regional ISP NBP B NAP NAP NBP A local ISP, company connect into regional ISPs regional ISP local ISP 8 National Backbone Provider e.g. Sprint US backbone network 9 Links between computers o Point to point link -- a direct cable or wire that is dedicated for use between the computers. o Multiple access link -- shared between many nodes -- example a bus, wireless medium etc. 10 Why structure ? o Direct connectivity does not scale -- all computers cannot be directly connected to each other. o Need organization End hosts -- clients and servers -- usually house information Routers and switches -- nodes that are primarily used for relaying information -sending information where it needs to go. 11 Component networks of the Internet o Local Area Network -- LAN -- Extends up to 1 Km or so -- example -- Ethernet, Wireless LAN o Metropolitan Area Network -- larger scale -- tens of km. o Wide Area Networks --- Largest -- could consist of many component networks. o System area networks -- single room. 12 Examples of networks o Ad hoc and sensor networks -- specific applications. o Wireless hotspots Wi-Fi o Of course, satellite networks have existed for some time now. 13 End-hosts and applications o Client -- requests information services. o Server -- provides information services. o Examples of applications -- Web (http), File transfer (FTP), E-mail. o Typically clients and server “processes” run on different computers. 14 The IETF o Internet Engineering Task Force Provides standards/ documents • www.ietf.org o Contains Internet Drafts and what are called RFCs -- Request for Comments. Quite detailed descriptions of what are called protocols. 15 What’s a protocol? The definition of a behavior --set of rules Here: the format of a communication exchange: Sequence of actions, format of information, predefined interpretation Hi connection req. Hi connection reply. Got the time? 2:00 <file> time Get http://gaia.cs.umass.edu/index.htm 16 Centralized versus Distributed Protocols o Centralized: all information is collected in one place and then processed o Distributed: decisions are taken locally with partial or summary of the information Most of the protocols distributed for scalability considerations. 17 Packets o Packets are similar to postal letters -basic units of information From, to, content Postman handles all packets similarly Addressing is hierarchical. o The protocol that defines how packets are to be “routed” is the Internet Protocol or IP. Hierarchical addresses like in the postal world. 18 Types of Communications • Circuit Switching (reserve a slice of resources) • Frequency division multiplexing • Time division multiplexing • Packet switching • Virtual Circuits: routers keep per connection info • Datagrams: no per connection information • Connection oriented (state at end points, handshake TCP) • TCP -- Transmission Control Protocol • Connectionless (no state at end points - UDP) • UDP -- User Datagram protocol. 19 Types of Communications o Advantage of packet switching: Resource sharing No need for reservations Easier to implement in a distributed way. o Advantage of circuit switching: Can guarantee performance (Quality of Service) -- reserved resource. 20 The Principles of the Internet o Goal: Interconnect existing net technologies ARPA packet radio, and ARPANET Packet switching? Flexibility Trade-off: poorer non-guaranteed performance Higher layer protocols try to provide reliability. o “The Design Philosophy of The DARPA Internet Protocols”, David Clark, MIT. 21 Secondary Internet Principles 1. 2. 3. 4. 5. 6. 7. Fault-tolerance to component failures Support multiple types of services Interoperate with different technologies Allow distributed management Be cost effective (i.e. sharing) Be easily extendible Resources and entities must be accountable (for security purpose) 22 Internet Architecture Characteristics o Scalability to millions of users Stateless routing: Routers cannot keep detailed info per connection o Best-effort service: no guarantees o Decentralized control o Self-configuration 23 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 o a series of steps 24 Organization of air travel: a different view ticket (purchase) ticket (complain) baggage (check) baggage (claim) gates (load) gates (unload) runway takeoff runway landing airplane routing airplane routing airplane routing Layers: each layer implements a service via its own internal-layer actions relying on services provided by layer below 25 Internet protocol stack o application: supporting network applications o transport: host-host data transfer o ip, routing protocols link: data transfer between neighboring network elements o tcp, udp network: routing of datagrams from source to destination o ftp, smtp, http ppp, ethernet physical: bits “on the wire” -representation, signal modulation. application transport network link physical 26 Other OSI layers o OSI -- open systems interconnection had two other layers. Session layer -- bundles multiple transport layer streams into a single session -- audio and video. Presentation layer -- representation of data to the application o Not much used. 27 Why layering? Dealing with complex systems: o modularization eases 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 o Isolating “functions” and interactions components layered reference model for discussion o layering considered harmful? 28 Layering: logical communication Each layer: o distributed o “entities” implement layer functions at each node o entities perform actions, exchange messages with peers application transport network link physical application transport network link physical network link physical application transport network link physical application transport network link physical 29 Layering: logical communication E.g.: transport o o o o o take data from app add addressing, reliability check info to form “datagram” send datagram to peer wait for peer to ack receipt analogy: post office data application transport transport network link physical application transport network link physical ack data network link physical application transport network link physical data application transport transport network link physical 30 Layering: physical communication data application transport network link physical application transport network link physical network link physical application transport network link physical data application transport network link physical 31 Message flow through stack • At each layer, headers added. M H HH M1 M1 H M2 HH M2 • A protocol defines maximum packet size - might require higher layer packet to be fragmented. 32 Protocol layering and data Each layer takes data from above o adds header information to create new data unit o passes new data unit to layer below M Ht M Hn Ht M Hl Hn Ht M source destination application transport network link physical application transport Network link physical M message Ht M Hn Ht M Hl Hn Ht M segment datagram frame 33 Basic Routing Concepts o Packet = postal letter o Router receives packet o Needs to decide which link to send it to o Scalability: decide on local information o Routers keep “summary” of information o Exploit the hierarchy in the IP address 34 The network edge: o end systems (hosts): run application programs e.g., WWW, email at “edge of network” o client/server model client host requests, receives service from server e.g., WWW client (browser)/ server; email client/server o peer-peer model: host interaction symmetric e.g.: Gnutella, KaZaA 35 Network edge: connection-oriented service Goal: data transfer between end sys. o handshaking: setup (prepare for) data transfer ahead of time o Hello, hello back human protocol set up “state” in two communicating hosts TCP - Transmission Control Protocol Internet’s connectionoriented service TCP service [RFC 793] o reliable, in-order byte-stream data transfer o flow control: o loss: acknowledgements and retransmissions sender won’t overwhelm receiver congestion control: senders “slow down sending rate” when network congested 36 Network edge: connectionless service Goal: data transfer between end systems same as before! o UDP - User Datagram Protocol [RFC 768]: Internet’s connectionless service unreliable data transfer no flow control no congestion control 37 The Network Core o mesh of interconnected routers o the fundamental question: how is data transferred through net? circuit switching: dedicated circuit per call: telephone net packet-switching: data sent thru net in discrete “chunks” 38 Network Core: Circuit Switching End-end resources reserved for “call” link bandwidth, switch capacity o dedicated resources: no sharing o circuit-like (guaranteed) performance o call setup required o 39 Network Core: Circuit Switching network resources (e.g., bandwidth) divided into “pieces” o pieces allocated to calls o resource piece idle if not used by owning call (no sharing) o dividing link bandwidth into “pieces” frequency division time division 40 Circuit Switching: TDMA and TDMA Example: FDMA 4 users frequency time TDMA frequency time 41 Network Core: Packet Switching each end-end data stream divided into packets o user A, B packets share network resources o each packet uses full link bandwidth o resources used as needed, Bandwidth division into “pieces” Dedicated allocation Resource reservation resource contention: o aggregate resource demand can exceed amount available o congestion: packets queue, wait for link use o store and forward: packets move one hop at a time transmit over link wait turn at next link 42 Network Core: Packet Switching 10 Mbs Ethernet A B statistical multiplexing C 1.5 Mbs queue of packets waiting for output link D 45 Mbs E 43 Packet switching versus circuit switching -- An example Packet switching allows more users to use network! 1 Mbps link o each user: o o circuit-switching: o 100 Kbps when “active” active 10% of time N users 10 users packet switching: 1 Mbps link with 35 users, probability > 10 active less than .0004 44 Packet switching versus circuit switching Is packet switching a “slam dunk winner?” o Great for bursty data resource sharing no call setup o Excessive congestion: packet delay and loss protocols needed for reliable data transfer, congestion control o Q: How to provide circuit-like behavior? bandwidth guarantees needed for audio/video apps still an unsolved problem (see QoS, multimedia) 45 Classification of the Types of Communication Circuit Switching Dedicated Shared hardware (no per flow Packet State in routers) Dedicated hardware Time Frequency Division Division Multiplexing Multiplexing Datagrams (IP) ConnectionOriented (TCP, end points Keep state) Switching Virtual Circuits (ATM) Connectionless (per flow state in routers resource reservation) (UDP, endpoints don’t -much- keep state) 46 Packet-switched networks: routing o Goal: move packets among routers from source to destination o datagram network: o we’ll study several path selection algorithms (chapter 4) destination address determines next hop routes may change during session analogy: driving, asking directions virtual circuit network: each packet carries tag (virtual circuit ID), tag determines next hop fixed path determined at call setup time, remains fixed thru call routers maintain per-call state 47 Access networks and physical media Q: How to connect end systems to edge router? o residential access nets o institutional access networks (school, company) o mobile access networks Keep in mind: o bandwidth (bits per second) of access network? o shared or dedicated? 48 Residential access: point to point access o Dialup via modem up to 56Kbps direct access to router (conceptually) o ISDN: integrated services digital network: 128Kbps alldigital connect to router o ADSL: asymmetric digital subscriber line up to 1 Mbps home-to-router up to 8 Mbps router-to-home ADSL deployment: happening 49 Residential access: cable modems o HFC: hybrid fiber coax asymmetric: up to 10Mbps upstream, 1 Mbps downstream o network of cable and fiber attaches homes to ISP router shared access to router among home issues: congestion, dimensioning o deployment: available via cable companies, e.g., MediaOne 50 Residential access: cable modems Diagram: http://www.cabledatacomnews.com/cmic/diagram.html 51 Physical Media o physical link: transmitted data bit propagates across link o guided media: signals propagate in solid media: copper, fiber o unguided media: signals propagate freely, e.g., radio Twisted Pair (TP) o two insulated copper wires Category 3: traditional phone wires, 10 Mbps Ethernet Category 5: 100Mbps Ethernet 52 Physical Media: coax, fiber Coaxial cable: o wire (signal carrier) within a wire (shield) o bidirectional o common use in 10Mbs Ethernet Fiber optic cable: o glass fiber carrying light pulses o high-speed operation: 100Mbps Ethernet high-speed point-to-point transmission (e.g., 5 Gps) o low error rate 53 Physical media: radio o signal carried in electromagnetic spectrum o no physical “wire” o bidirectional o propagation environment effects: reflection obstruction by objects interference Radio link types: o microwave e.g. up to 45 Mbps channels o LAN (e.g., WaveLAN) 2Mbps, 11Mbps o wide-area (e.g., cellular) e.g. CDPD, 10’s Kbps o satellite up to 50Mbps channel (or multiple smaller channels) 270 Msec end-end delay geosynchronous versus LEOS 54 Delay in packet-switched networks packets experience delay on end-to-end path o four sources of delay at each hop o nodal processing: o check bit errors determine output link queueing time waiting at output link for transmission depends on congestion level of router transmission A propagation B nodal processing queueing 55 Delay in packet-switched networks Transmission delay: o R=link bandwidth (bps) o L=packet length (bits) o time to send bits into link = L/R transmission A Propagation delay: o d = length of physical link o s = propagation speed in medium (~3x108 m/sec) o propagation delay = d/s Note: s and R are very different quantities! propagation B nodal processing queueing 56 Queueing delay R=link bandwidth (bps) o L=packet length (bits) o a=average packet arrival rate o traffic intensity = La/R o La/R ~ 0: average queueing delay small o La/R -> 1: delays become large o La/R > 1: more “work” arriving than can be serviced, average delay infinite! 57 Summary Covered a “ton” of material! o Internet introduction o what’s a protocol? o network edge, core, access network packet-switching versus circuit-switching o performance: loss, delay o layering and service models You now have: o context, overview, “feel” of networking o more depth, detail later in course 58 What is to follow ? o Complete Chapter 1: Concepts of throughput and end to end latency Bandwidth delay product -- network capacity Brief intro to sockets o Chapter 2: PHY Layer and Link Layer 59