Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu http://www.cs.toronto.edu/~yganjali Announcements Piazza: if you are not registered yet, please register. Check out class web page for slides, and lecture notes. Volunteer for lecture notes? SII 199 - Computer Networks and Society University of Toronto – Fall 2015 2 The Story So Far … • Computer networks and society • Overview, science of networks • Life areas that computer networks have changed • Healthcare, business, entertainment, cloud computing, cyber security, privacy • This Week: Introduction to Computer Networks • Basics concepts and components • An introduction to the mail system • An introduction to the Internet SII 199 - Computer Networks and Society University of Toronto – Fall 2015 3 Connecting to the Network What do we need to connect to the Internet? A computer A link Wired Wireless A device which is connected to the network Router/ Switch Reproduced with permission of Bill Cheswick, Lumeta Inc SII 199 - Computer Networks and Society University of Toronto – Fall 2015 4 What is a Link? Different media (light, electric signal, …) Connects two nodes Normally! Used to transfer a sequence of 0s and 1s Rate: number of bits it can transfer per second Example: 1 mega bit per second = 106 bits every second Delay: time it takes for a bit to traverse the link Example: 1 millisecond = 0.001 second 1 0 Reproduced with permission of Bill Cheswick, Lumeta Inc SII 199 - Computer Networks and Society University of Toronto – Fall 2015 5 Link Delay Total Delay = Propagation Delay + Transmission Delay Propagation Delay: time it takes for bits to traverse the link Transmission Delay: time it takes to inject the bits to the link Example: think of students leaving this room towards Sidney Smith Hall Propagation Delay: time for each student to walk to Sidney Smith Hall – 5min Transmission Delay: 24 students one leaving every 5 seconds – 24x5 sec = 120 sec = 2min Total Delay = 5min + 2min = 7min SII 199 - Computer Networks and Society University of Toronto – Fall 2015 6 Packets Data is encapsulated in “packets”. Why? Think of envelopes in mail Each packet has Payload: the actual data Header: destination address, … 001001101001….01010111 Header Reproduced with permission of Bill Cheswick, Lumeta Inc SII 199 - Computer Networks and Society University of Toronto – Fall 2015 7 Connecting to the Internet Links to other routers Internet routers ??? SII 199 - Computer Networks and Society University of Toronto – Fall 2015 8 What Does a Router Do? Each router receives packets on input lines Looks up the destination ? ? Address in header Sends it out on the appropriate line Question. How does the router know which output to send the packet to? Question. What if there is a loop? ? Time-To-Live or TTL SII 199 - Computer Networks and Society University of Toronto – Fall 2015 9 The Internet – Collection of Nodes SII 199 - Computer Networks and Society University of Toronto – Fall 2015 10 The Internet – Collection of Nodes Reproduced with permission of Bill Cheswick, Lumeta Inc SII 199 - Computer Networks and Society University of Toronto – Fall 2015 11 The Internet Cloud Reproduced with permission of Bill Cheswick, Lumeta Inc SII 199 - Computer Networks and Society University of Toronto – Fall 2015 12 History of the Internet 1966: First two machines connect 1968: ARPAnet created by DARPA (Defense Advanced Research Projects Agency) 1970: First five nodes: UCLA Stanford UC Santa Barbara U of Utah, and BBN SII 199 - Computer Networks and Society University of Toronto – Fall 2015 13 History of the Internet – Cont’d 1972: First e-mail program, first FTP (?!) ARPAnet has 15 nodes 1974: Architecture for interconnecting networks 1979: ARPAnet has 200 nodes 1984: 1000 hosts, called “Internet” Early 1990’s: ARPAnet decommissioned Early 1990s: Web 1990’s: commercialization of the Web SII 199 - Computer Networks and Society University of Toronto – Fall 2015 14 Number of Internet Hosts SII 199 - Computer Networks and Society University of Toronto – Fall 2015 15 Brief Introduction to Computer Networks We’ll go through two examples Mail system File transfer in the Internet Consider similarities And differences SII 199 - Computer Networks and Society University of Toronto – Fall 2015 16 An Introduction to the Mail System U of T Stanford Yashar Nick Admin Admin SII 199 - Computer Networks and Society University of Toronto – Fall 2015 17 Characteristics of the Mail System Each envelope is individually routed. No time guarantee for delivery. No guarantee of delivery in sequence. No guarantee of delivery at all! Things get lost How can we acknowledge delivery? Retransmission How to determine when to retransmit? Timeout? Need local copies of contents of each envelope. How long to keep each copy. What if an acknowledgement is lost? SII 199 - Computer Networks and Society University of Toronto – Fall 2015 18 An Introduction to the Mail System U of T Stanford Application Layer Yashar Nick Transport Layer Admin Admin Network Layer Link Layer SII 199 - Computer Networks and Society University of Toronto – Fall 2015 19 An Introduction to the Internet leland.stanford.edu cs.toronto.edu Application Layer Nick Yashar Transport Layer O.S. Datagram Data Header Data Header O.S. Network Layer Link Layer SII 199 - Computer Networks and Society University of Toronto – Fall 2015 20 Characteristics of the Internet Each packet is individually routed. No time guarantee for delivery. No guarantee of delivery in sequence. No guarantee of delivery at all! Things get lost Acknowledgements Retransmission How to determine when to retransmit? Timeout? Need local copies of contents of each packet. How long to keep each copy? What if an acknowledgement is lost? SII 199 - Computer Networks and Society University of Toronto – Fall 2015 21 Characteristics of the Internet – Cont’d No guarantee of integrity of data Content of a packet can change Why? Packets can be fragmented (split) into pieces Why? Packets may be duplicated How? SII 199 - Computer Networks and Society University of Toronto – Fall 2015 22 An Introduction to the Mail System U of T Stanford Application Layer Nick Yashar Transport Layer Admin Admin Network Layer Link Layer SII 199 - Computer Networks and Society University of Toronto – Fall 2015 23 Some Questions About the Mail System How many sorting offices are needed and where should they be located? How much sorting capacity is needed? Should we allocate for Mother’s Day? How can we guarantee timely delivery? What prevents delay guarantees? Or delay variation guarantees? How do we protect against fraudulent mail deliverers, or fraudulent senders? SII 199 - Computer Networks and Society University of Toronto – Fall 2015 24 Internet Principles Original principles designing the Internet Autonomy No internal changes required to interconnect networks Best effort service model No guarantees Stateless routers Routers don’t remember which packets have been sent before Unlike phone network No centralized control All have major impact on Internet’s fast growth. SII 199 - Computer Networks and Society University of Toronto – Fall 2015 25 Final Comments, Discussion Computer networks have and continue to change our lives For better? Internet’s original design principles have had a major impact on its growth. Will it continue to grow at the same rate? Some revolutionary applications expedite this impact What else can we expect? SII 199 - Computer Networks and Society University of Toronto – Fall 2015 26