CSE 3214: Computer Network Protocols and Applications Suprakash Datta datta@cse.yorku.ca Office: LAS 3043 Phone: 416-736-2100 ext 77875 Course page: http://www.cse.yorku.ca/course/3214 These slides are adapted from Jim Kurose s slides. CSE3214 - S.Datta 1
Administrivia Course webpage: http://www.cse.yorku.ca/course/ 3214 Textbook: Lectures: Tue-Thu 10:00-11:30 pm (PSE 321) Exams: midterm (30%), final (40%) omework (30%): Assignments. Slides: should be available the morning of the class Office hours: Tuesday, Thu: 12:30-2:30 pm or by appointment at LAS 3043 Computer Networking: A Top Down Approach Featuring the Inter, 6th edition. Jim Kurose, Keith Ross; Pearson. CSE3214 - S.Datta 2
Administrivia contd. Cheating will not be tolerated. Visit the webpage for more details on policies etc. Be careful not to misuse packet sniffing software. I would like to have a 2-hour midterm. Your cooperation is greatly appreciated. TA: F. Yasmeen CSE3214 - S.Datta 3
Course objectives Understand the full TCP/IP architecture. Become familiar with advanced topics - P2P systems, multimedia communication (including VoIP), work security, wireless sensor works. Learn about active research areas. CSE3214 - S.Datta 4
Major differences with 3213 Top-down approach. More algorithmic (less math!) More hands-on TCP/IP programming. CSE3214 - S.Datta 5
What is the Inter? Chapter 1: Introduction Network of works eterogeneous Distributed Owned by many different entities Allows easy additions and removal from the work CSE3214 - S.Datta 6
The Inter: nuts and bolts view millions of connected computing devices: hosts = end systems running work apps communication links fiber, copper, radio, satellite transmission rate = bandwidth routers: forward packets (chunks of data) router server local ISP workstation mobile regional ISP company work CSE3214 - S.Datta 7
The Inter: nuts and bolts view PC server wireless laptop smartphone v millions of connected computing devices: hosts = end systems running work apps mobile work global ISP wireless links wired links v communication links fiber, copper, radio, satellite transmission rate: bandwidth home work regional ISP router v Packet switches: forward packets (chunks of data) routers and switches institutional work Introduction 1-8
The Inter: nuts and bolts view protocols control sending, receiving of msgs e.g., TCP, IP, TTP, FTP, PPP Inter: work of works loosely hierarchical public Inter versus private intra Inter standards RFC: Request for comments IETF: Inter Engineering Task Force mobile work home work global ISP regional ISP protocols define format, order of msgs sent and received among work entities, and actions taken on msg transmission, receipt institutional work CSE3214 - S.Datta 9
The Inter: a service view communication infrastructure enables distributed applications: Web, email, games, e- commerce, file sharing communication services provided to apps: Connectionless unreliable Connection-oriented reliable CSE3214 - S.Datta 10
What s a protocol? human protocols: v what s the time? v I have a question v introductions specific msgs sent specific actions taken when msgs received, or other events work protocols: v machines rather than humans v all communication activity in Inter governed by protocols protocols define format, order of msgs sent and received among work entities, and actions taken on msg transmission, receipt Introduction 1-11
What s a protocol? a human protocol and a computer work protocol: i i Got the time? 2:00 time TCP connection request TCP connection response Get http://www.awl.com/kurose-ross <file> Introduction 1-12
Access works and physical media Q: ow to connect end systems to edge router? v v v residential s institutional works (school, company) mobile works keep in mind: v bandwidth (bits per second) of work? shared or dedicated? v Introduction 1-13
Access : digital subscriber line (DSL) central office telephone work DSL modem splitter DSLAM voice, data transmitted at different frequencies over dedicated line to central office use existing telephone line to central office DSLAM over DSL phone line goes to Inter voice over DSL phone line goes to telephone v < 2.5 Mbps upstream transmission rate (typically < 1 Mbps) v < 24 Mbps downstream transmission rate (typically < 10 Mbps) DSL multiplexer ISP Introduction 1-14
Access : cable work cable headend cable modem splitter 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 frequency division multiplexing: different channels transmitted in different frequency bands Introduction 1-15
Access : cable work cable headend cable modem splitter data, TV transmitted at different frequencies over shared cable distribution work CMTS ISP cable modem termination system v FC: hybrid fiber coax asymmetric: up to 30Mbps downstream transmission rate, 2 Mbps upstream transmission rate v work of cable, fiber attaches homes to ISP router homes share work to cable headend unlike DSL: DSL has dedicated to central office Introduction 1-16
Access : home work wireless devices often combined in single box to/from headend or central office cable or DSL modem wireless point (54 Mbps) router, firewall, NAT wired Ether (100 Mbps) Introduction 1-17
Enterprise works (Ether) institutional link to ISP (Inter) institutional router Ether switch institutional mail, web servers v v v typically used in companies, universities, etc 10 Mbps, 100Mbps, 1Gbps, 10Gbps transmission rates today, end systems typically connect into Ether switch Introduction 1-18
A closer look at work structure work edge: applications and hosts work core: interconnected routers work of works works, physical media: wired, wireless communication links CSE3214 - S.Datta 19
Wireless works v shared wireless work connects end system to router via base station aka point wireless LANs: within building (100 ft) 802.11b/g (WiFi): 11, 54 Mbps transmission rate wide-area wireless provided by telco (cellular) operator, 10 s km between 1 and 10 Mbps 3G, 4G: LTE to Inter to Inter Introduction 1-20
ost: sends packets of data host sending function: vtakes application message vbreaks into smaller chunks, known as packets, of length L bits vtransmits packet into work at transmission rate R link transmission rate, aka link capacity, aka link bandwidth host 2 1 two packets, L bits each R: link transmission rate packet transmission delay time needed to transmit L-bit packet into link = = L (bits) R (bits/sec) Introduction 1-21
Physical media v bit: propagates between transmitter/receiver pairs v physical link: what lies between transmitter & receiver v guided media: signals propagate in solid media: copper, fiber, coax v unguided media: signals propagate freely, e.g., radio twisted pair (TP) v two insulated copper wires Category 5: 100 Mbps, 1 Gpbs Ether Category 6: 10Gbps Introduction 1-22
Physical media: coax, fiber coaxial cable: v two concentric copper conductors v bidirectional v broadband: multiple channels on cable FC fiber optic cable: v glass fiber carrying light pulses, each pulse a bit v high-speed operation: high-speed point-to-point transmission (e.g., 10 s-100 s Gpbs transmission rate) v low error rate: repeaters spaced far apart immune to electromagic noise Introduction 1-23
Physical media: radio v signal carried in electromagic spectrum v no physical wire v bidirectional v propagation environment effects: reflection obstruction by objects interference radio link types: v terrestrial microwave e.g. up to 45 Mbps channels v LAN (e.g., WiFi) 11Mbps, 54 Mbps v wide-area (e.g., cellular) 3G cellular: ~ few Mbps v satellite Kbps to 45Mbps channel (or multiple smaller channels) 270 msec end-end delay geosynchronous versus low altitude Introduction 1-24
The work edge end systems (hosts): run application programs e.g. Web, email at edge of work client/server model client host requests, receives service from always-on server e.g. Web browser/server; email client/server peer-peer model: minimal (or no) use of dedicated servers e.g. Gnutella, KaZaA CSE3214 - S.Datta 25
Network edge: connection-oriented service Goal: data transfer between end systems handshaking: setup (prepare for) data transfer ahead of time ello, hello back human protocol set up state in two communicating hosts TCP - Transmission Control Protocol Inter s connectionoriented service TCP service [RFC 793] reliable, in-order bytestream data transfer loss: acknowledgements and retransmissions flow control: sender won t overwhelm receiver congestion control: Connection-oriented service not the same as that in traditional telephony. senders slow down sending rate when work congested CSE3214 - S.Datta 26
Network edge: connectionless service Goal: data transfer between end systems same as before! UDP - User Datagram Protocol [RFC 768]: connectionless unreliable data transfer no flow control no congestion control App s using TCP: TTP (Web), FTP (file transfer), Tel (remote login), SMTP (email) App s using UDP: streaming media, teleconferencing, DNS, Inter telephony CSE3214 - S.Datta 27
The work core v mesh of interconnected routers v packet-switching: hosts break application-layer messages into packets forward packets from one router to the next, across links on path from source to destination each packet transmitted at full link capacity Introduction 1-28
Packet-switching: store-and-forward L bits per packet source 3 2 1 R bps R bps destination v takes L/R seconds to transmit (push out) L-bit packet into link at R bps v store and forward: entire packet must arrive at router before it can be transmitted on next link v end-end delay = 2L/R (assuming zero propagation delay) one-hop numerical example: L = 7.5 Mbits R = 1.5 Mbps one-hop transmission delay = 5 sec more on delay shortly Introduction 1-29
Packet Switching: queueing delay, loss A R = 100 Mb/s C B queue of packets waiting for output link R = 1.5 Mb/s D E queuing and loss: v If arrival rate (in bits) to link exceeds transmission rate of link for a period of time: packets will queue, wait to be transmitted on link packets can be dropped (lost) if memory (buffer) fills up Introduction 1-30
Two key work-core functions routing: determines sourcedestination route taken by packets routing algorithms forwarding: move packets from router s input to appropriate router output routing algorithm local forwarding table header value output link 0100 0101 0111 1001 3 2 2 1 0111 3 2 1 dest address in arriving packet s header Network Layer 4-31
Alternative core: circuit switching end-end resources allocated to, reserved for call between source & dest: v v v v In diagram, each link has four circuits. call gets 2 nd circuit in top link and 1 st circuit in right link. dedicated resources: no sharing circuit-like (guaranteed) performance circuit segment idle if not used by call (no sharing) Commonly used in traditional telephone works Introduction 1-32
Circuit switching: FDM versus TDM FDM Example: 4 users frequency TD M time frequency time Introduction 1-33
Packet switching versus circuit switching packet switching allows more users to use work! example: 1 Mb/s link each user: 100 kb/s when active active 10% of time.. N users 1 Mbps link v circuit-switching: 10 users v packet switching: with 35 users, probability > 10 active at same time is less than.0004 * Q: how did we get value 0.0004? Q: what happens if > 35 users? * Check out the online interactive exercises for more examples Introduction 1-34
Packet switching vs circuit switching is packet switching a slam dunk winner? v great for bursty data resource sharing simpler, no call setup v excessive congestion possible: packet delay and loss protocols needed for reliable data transfer, congestion control v Q: ow to provide circuit-like behavior? bandwidth guarantees needed for audio/video apps still an unsolved problem (chapter 7) Q: human analogies of reserved resources (circuit switching) versus on-demand allocation (packet-switching)? Introduction 1-35
Inter structure: work of works v End systems connect to Inter via ISPs (Inter Service Providers) Residential, company and university ISPs v Access ISPs in turn must be interconnected. v So that any two hosts can send packets to each other v Resulting work of works is very complex v Evolution was driven by economics and national policies v Let s take a stepwise approach to describe current Inter structure Introduction 1-36
Inter structure: work of works Question: given millions of ISPs, how to connect them together? Introduction 1-37
Inter structure: work of works Option: connect each ISP to every other ISP? connecting each ISP to each other directly doesn t scale: O(N 2 ) connections. Introduction 1-38
Inter structure: work of works Option: connect each ISP to a global transit ISP? Customer and provider ISPs have economic agreement. global ISP Introduction 1-39
Inter structure: work of works But if one global ISP is viable business, there will be competitors. ISP A ISP B ISP C Introduction 1-40
Inter structure: work of works But if one global ISP is viable business, there will be competitors. which must be interconnected Inter exchange point ISP A IXP IXP ISP B ISP C peering link Introduction 1-41
Inter structure: work of works and regional works may arise to connect s to ISPS ISP A IXP IXP ISP B ISP C regional Introduction 1-42
Inter structure: work of works and content provider works (e.g., Google, Microsoft, Akamai ) may run their own work, to bring services, content close to end users ISP B ISP A ISP B IXP Content provider work IXP regional Introduction 1-43
Inter structure: work of works Tier 1 ISP Tier 1 ISP Google IX P Regional ISP IX P Regional ISP IX P v at center: small # of well-connected large works tier-1 commercial ISPs (e.g., Level 3, Sprint, AT&T, NTT), national & international coverage content provider work (e.g, Google): private work that connects it data centers to Inter, often bypassing tier-1, regional ISPs ISP ISP ISP ISP ISP ISP ISP ISP Introduction 1-44
Tier-1 ISP: e.g., Sprint POP: point-of-presence to/from backbone peering to/from customers Introduction 1-45
Inter Design Philosophy Simple core, complex edge Best effort service Great support for heterogeneity Dynamic by design One work for many, many purposes Designed primarily for non-real-time text traffic with no QoS requirements other than reliable delivery. Q: Does this explain why the inter does not work well for many applications? CSE3214 - S.Datta 46
Protocol Layers Networks are complex! many pieces : hosts routers links of various media applications protocols hardware, software Pros and cons of layering: explicit structure allows identification, relationship of complex system s pieces modularization eases maintenance, updating of system change of implementation of layer s service transparent to rest of system CSE3214 - S.Datta 47
Inter protocol stack application: supporting work applications FTP, SMTP, STTP transport: host-host data transfer TCP, UDP work: routing of datagrams from source to destination IP, routing protocols link: data transfer between neighboring work elements PPP, Ether physical: bits on the wire application transport work link physical CSE3214 - S.Datta 48
CSE3214 - S.Datta 49 message segment datagram frame source application transport work link physical t n l M t n M t M M destination application transport work link physical t n l M t n M t M M work link physical link physical t n l M t n M t n l M t n M t n l M t n l M router switch Encapsulation
Inter istory 1961-1972: Early packet-switching principles 1961: Kleinrock - queueing theory shows effectiveness of packetswitching 1964: Baran - packetswitching in military s 1967: ARPA conceived by Advanced Research Projects Agency 1969: first ARPA node operational 1972: ARPA demonstrated publicly NCP (Network Control Protocol) first host-host protocol first e-mail program ARPA has 15 nodes CSE3214 - S.Datta 50
Inter istory 1972-1980: Interworking, new and proprietary s 1970: ALOA satellite work in awaii 1973: Metcalfe s PhD thesis proposes Ether 1974: Cerf and Kahn - architecture for interconnecting works late70 s: proprietary architectures: DEC, SNA, XNA late 70 s: switching fixed length packets (ATM precursor) 1979: ARPA has 200 nodes Cerf and Kahn s interworking principles: minimalism, autonomy - no internal changes required to interconnect works best effort service model stateless routers decentralized control define today s Inter architecture CSE3214 - S.Datta 51
Inter istory 1990, 2000 s: commercialization, the Web, new apps Early 1990 s: ARPA decommissioned 1991: NSF lifts restrictions on commercial use of NSF (decommissioned, 1995) early 1990s: Web hypertext [Bush 1945, Nelson 1960 s] TML, TTP: Berners-Lee 1994: Mosaic, later Netscape late 1990 s: commercialization of the Web Late 1990 s 2000 s: more killer apps: instant messaging, P2P file sharing work security to forefront est. 50 million host, 100 million+ users backbone links running at Gbps CSE3214 - S.Datta 52
Reading: Ch 1, 2. Next: Delay and loss in works CSE3214 - S.Datta 53