Chapter 2 James F.Kurose Keith W.Ross Application Layer A note on the use of these PowerPoint slides: We're making these slides freely available to all(faculty,students, readers).They're in PowerPoint form so you see the animations;and can add,modify,and delete slides (including this one)and slide content to suit your needs.They obviously represent a lot of work on our part. COMPUTER In return for use,we only ask the following: NETWORKING If you use these slides(e.g.,in a class)that you mention their A TOP-DOWN APPROACH source(after all,we'd like people to use our book!) If you post any slides on a www site,that you note that they are adapted from(or perhaps identical to)our slides,and note our copyright of this material. Computer Networking:A For a revision history,see the slide note for this page. Top-Down Approach Thanks and enjoy!JFK/KWR 8th edition n All material copyright 1996-2020 Jim Kurose,Keith Ross J.F Kurose and K.W.Ross,All Rights Reserved Pearson,2020 Application Layer:2-1
Chapter 2 Application Layer A note on the use of these PowerPoint slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint form so you see the animations; and can add, modify, and delete slides (including this one) and slide content to suit your needs. They obviously represent a lot of work on our part. In return for use, we only ask the following: ▪ If you use these slides (e.g., in a class) that you mention their source (after all, we’d like people to use our book!) ▪ If you post any slides on a www site, that you note that they are adapted from (or perhaps identical to) our slides, and note our copyright of this material. For a revision history, see the slide note for this page. Thanks and enjoy! JFK/KWR All material copyright 1996-2020 J.F Kurose and K.W. Ross, All Rights Reserved Application Layer: 2-1 Computer Networking: A Top-Down Approach 8 th edition n Jim Kurose, Keith Ross Pearson, 2020
Application layer:overview P2P applications Principles of network video streaming and content applications distribution networks ■Veb and HTTP socket programming with ■E-mail,SMTP,lMAP UDP and TCP The Domain Name System DNS Application Layer:2-2
Application layer: overview ▪ Principles of network applications ▪ Web and HTTP ▪ E-mail, SMTP, IMAP ▪ The Domain Name System DNS ▪ P2P applications ▪ video streaming and content distribution networks ▪ socket programming with UDP and TCP Application Layer: 2-2
Application layer:overview Our goals: learn about protocols by conceptual and examining popular implementation aspects of application-layer protocols application-layer protocols ·HTTP transport-layer service ·SMTP,IMAP models ·DNS client-server paradigm programming network peer-to-peer paradigm applications ·socket API Application Layer:2-3
Application layer: overview Our goals: ▪ conceptual and implementation aspects of application-layer protocols • transport-layer service models • client-server paradigm • peer-to-peer paradigm ▪ learn about protocols by examining popular application-layer protocols • HTTP • SMTP, IMAP • DNS ▪ programming network applications • socket API Application Layer: 2-3
Some network apps ■social networking voice over IP (e.g.,Skype) Web real-time video conferencing ■text messaging ■Internet search ■e-mail remote login multi-user network games streaming stored video (YouTube,Hulu,Netflix) ■P2 P file sharing Q:your favorites? Application Layer:2-4
Some network apps ▪ social networking ▪ Web ▪ text messaging ▪ e-mail ▪ multi-user network games ▪ streaming stored video (YouTube, Hulu, Netflix) ▪ P2P file sharing Application Layer: 2-4 ▪ voice over IP (e.g., Skype) ▪ real-time video conferencing ▪ Internet search ▪ remote login ▪ … Q: your favorites?
Creating a network app application write programs that: transport mob network data link run on(different)end systems physical national or global ISP communicate over network e.g.,web server software communicates with browser software local or no need to write software for regionalSp network-core devices home networ application network-core devices do not run user provi transport network application applications data link transport physical network applications on end systems allows data link physical for rapid app development, enterprise propagation network Application Layer:2-5
mobile network home network enterprise network national or global ISP local or regional ISP datacenter network content provider network application transport network data link physical application transport network data link physical application transport network data link physical Creating a network app write programs that: ▪ run on (different) end systems ▪ communicate over network ▪ e.g., web server software communicates with browser software no need to write software for network-core devices ▪ network-core devices do not run user applications ▪ applications on end systems allows for rapid app development, propagation Application Layer: 2-5
Client-server paradigm server: mobile network always-on host national or global ISP ■permanent IP address often in data centers,for scaling clients: contact,communicate with server may be intermittently connected home twork content provider may have dynamic IP addresses network datacenter network do not communicate directly with each other enterprise examples:HTTP,IMAP,FTP network Application Layer:2-6
mobile network home network enterprise network national or global ISP local or regional ISP datacenter network content provider network Client-server paradigm server: ▪ always-on host ▪ permanent IP address ▪ often in data centers, for scaling clients: ▪ contact, communicate with server ▪ may be intermittently connected ▪ may have dynamic IP addresses ▪ do not communicate directly with each other ▪ examples: HTTP, IMAP, FTP Application Layer: 2-6
Peer-peer architecture ■no always-on server mobile network arbitrary end systems directly national or global ISP communicate peers request service from other peers,provide service in return to other peers loca regi self scalability -new peers bring new service capacity,as well as new service home twork content demands provider network datacente peers are intermittently connected network and change IP addresses ·complex management enterprise example:P2P file sharing network Application Layer:2-7
mobile network home network enterprise network national or global ISP local or regional ISP datacenter network content provider network Peer-peer architecture ▪ no always-on server ▪ arbitrary end systems directly communicate ▪ peers request service from other peers, provide service in return to other peers • self scalability – new peers bring new service capacity, as well as new service demands ▪ peers are intermittently connected and change IP addresses • complex management ▪ example: P2P file sharing Application Layer: 2-7
Processes communicating process:program running clients,servers within a host client process:process that initiates communication -within same host,two server process:process processes communicate that waits to be contacted using inter-process communication(defined by 0S) note:applications with P2P architectures have processes in different hosts client processes communicate by exchanging server processes messages Application Layer:2-8
Processes communicating process: program running within a host ▪within same host, two processes communicate using inter-process communication (defined by OS) ▪processes in different hosts communicate by exchanging messages Application Layer: 2-8 client process: process that initiates communication server process: process that waits to be contacted ▪ note: applications with P2P architectures have client processes & server processes clients, servers
Sockets process sends/receives messages to/from its socket socket analogous to door sending process shoves message out door sending process relies on transport infrastructure on other side of door to deliver message to socket at receiving process two sockets involved:one on each side application socket application controlled by process process app developer transpor transport network network controlled by OS link Internet link physical physical Application Layer:2-9
Sockets Application Layer: 2-9 ▪ process sends/receives messages to/from its socket ▪ socket analogous to door • sending process shoves message out door • sending process relies on transport infrastructure on other side of door to deliver message to socket at receiving process • two sockets involved: one on each side Internet controlled by OS controlled by app developer transport application physical link network process transport application physical link network process socket
Addressing processes to receive messages,process identifier includes both IP address must have identifier and port numbers associated with host device has unique 32-bit process on host. IP address example port numbers: Q:does IP address of host on ·HTTP server::80 which process runs suffice for ·mail server:25 identifying the process? -to send HTTP message to A:no,many processes gaia.cs.umass.edu web server: can be running on ·1 address:128.119.245.12 same host 。port number:&0 more shortly... Application Layer:2-10
Addressing processes Application Layer: 2-10 ▪ to receive messages, process must have identifier ▪ host device has unique 32-bit IP address ▪Q: does IP address of host on which process runs suffice for identifying the process? ▪ identifier includes both IP address and port numbers associated with process on host. ▪ example port numbers: • HTTP server: 80 • mail server: 25 ▪ to send HTTP message to gaia.cs.umass.edu web server: • IP address: 128.119.245.12 • port number: 80 ▪ more shortly… ▪ A: no, many processes can be running on same host