- 快召唤伙伴们来围观吧
- 微博 QQ QQ空间 贴吧
- 文档嵌入链接
- <iframe src="https://www.slidestalk.com/u27/application_layer_cse_labs_user_home_pages_5e0cf7?embed" frame border="0" width="640" height="360" scrolling="no" allowfullscreen="true">复制
- 微信扫一扫分享
Application Layer - CSE Labs User Home Pages
展开查看详情
1 .CSci4211: Application Layer 1 Application Layer World Wide Web Electronic Mail Domain Name System P2P File Sharing Readings: Chapter 2: section 2.1-2.6
2 .CSci4211: Application Layer 2 Objectives Understand Service requirements applications placed on network infrastructure Protocols distributed applications use to implement applications Conceptual + implementation aspects of network application protocols client server paradigm peer-to-peer paradigm Learn about protocols by examining popular application-level protocols World Wide Web Electronic Mail P2P File Sharing Application Infrastructure Services: DNS
3 .3 Some network apps e-mail web instant messaging remote login P2P file sharing multi-user network games streaming stored video clips social networks voice over IP real-time video conferencing cloud computing Internet of Things ( IoT ) services ?? CSci4211: Application Layer
4 .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 transport network data link physical application transport network data link physical application transport network data link physical 4 CSci4211: Application Layer
5 .CSci4211: Application Layer 5 Applications and Application-Layer Protocols Application: communicating, distributed processes running in network hosts in “user space” exchange messages to implement app e.g., email, file transfer, the Web Application-layer protocols one “piece” of an app define messages exchanged by apps and actions taken user services provided by lower layer protocols application transport network data link physical application transport network data link physical application transport network data link physical
6 .6 How two applications on two different computers communicate? CSci4211: Application Layer
7 .7 Analogy: Postal Service CSci4211: Application Layer
8 .Step 1: Find out the machine Internet Protocol (IP) 200 Union Street SE Minneapolis, MN CSci4211: Application Layer 8
9 .Addressing Machines (Hosts) To receive messages, each machine (e.g., a web or a desktop/laptop) must an “address” host device has unique 32-bit IP(v4) address Exercise: On Windows, use ipconfig from command prompt to get your IP address On Mac, use ifconfig from command prompt to get your IP address 9 Remembering IP addresses is a pain in the neck (for humans) Host (or domain) names e .g., mail.cs.umn.edu , or www.google.com DNS translates domain names to IP addresses Given the IP address, Network performs routing & forwarding to deliver msgs between (end) hosts CSci4211: Application Layer
10 .10 IP Addresses Used to identify machines (network interfaces) Each IP address is 32-bit IPv6 addresses are 128-bit Represented as x1.x2.x3.x4 Each xi corresponds to a byte E.g.: 192.168.200.10 Each IP packet contains a destination IP address CSci4211: Application Layer
11 .11 Hostnames 206.207.85.33 67.99.176.30 www.home.com www.funnymovies.com Machines are good at remembering numbers, while human beings are good at remember names. The name (e.g., www.cs.umn.edu ) consists of multiple parts: First part is a machine name (or special identifier like www) Each successive part is a domain name which contains the previous domain CSci4211: Application Layer
12 .12 Domain Name Service (DNS) IP routing uses IP addresses Need a way to convert hostnames to IP addresses DNS is a distributed mapping service Maintains “ table ” of name-to-address mapping Used by most applications. E.g.: Web, email, etc. Advantages Easier for programmers and users Can change mapping if needed more next week ….. CSci4211: Application Layer
13 .13 Internet Routing The Internet consists of a number of routers Each router forwards packets onto the next hop Goal is to move the packet closer to its destination Each router has a table Matches packet address to determine next hop CSci4211: Application Layer
14 .Step 2: Find out the process Transport layer Protocol CSci4211: Application Layer 14
15 .Addressing Processes to receive messages, process must have identifier host device has unique 32-bit IPv4 address Exercise: On Windows, use ipconfig from command prompt to get your IP address On Mac, use ifconfig from command prompt to get your IP address Q: does IP address of host on which process runs suffice for identifying the process? A: No, many processes can be running on same Identifier includes both IP address and port numbers associated with process on host. Example port numbers: HTTP server: 80 Mail server: 25 15 CSci4211: Application Layer
16 .16 Identifying Remote Processes IP addresses and hostnames allow you to identify machines But what about processes on these machines? Can we use PIDs? CSci4211: Application Layer
17 .17 Ports Identifiers for remote processes Each application communicates using a port Communication is addressed to a port on a machine Delivers the packets to the process using the port Both TCP and UDP have their own port numbers Many applications use well-known port numbers HTTP: 80, FTP: 21
18 .18 Analogy Bob 200 Union Street SE Minneapolis, MN House address: name Vs. IP address: Port number CSci4211: Application Layer
19 .19 Summary: to communicate Sender shall include both IP address and port numbers associated with process on host. Example port numbers: HTTP server: 80 Mail server: 25 For example, to send HTTP message to gaia.cs.umass.edu web server: IP address: 128.119.245.12 Port number: 80 more shortly… CSci4211: Application Layer
20 .Step 3: What kind of service you need Transport layer Protocol CSci4211: Application Layer 20
21 .CSci4211: Application Layer 21 Network Transport Services Connection-Oriented, Reliable Service Mimic “dedicated link” Messages delivered in correct order, without errors Transport service aware of connection in progress Stateful , some “state” information must be maintained Require explicit connection setup and teardown Connectionless, Unreliable Service Messages treated as independent Messages may be lost, or delivered out of order No connection setup or teardown, “stateless” end host to end host communication services
22 .CSci4211: Application Layer 22 Internet Transport Protocols TCP service: connection-oriented: setup required between client, server reliable transport between sender and receiver flow control: sender won’t overwhelm receiver congestion control: throttle sender when network overloaded UDP service: unreliable data transfer between sender and receiver does not provide: connection setup, reliability, flow control, congestion control Q:Why UDP?
23 .What transport service does an app need? Data loss some apps (e.g., audio) can tolerate some loss other apps (e.g., file transfer, telnet) require 100% reliable data transfer Timing some apps (e.g., Internet telephony, interactive games) require low delay to be “effective” Throughput some apps (e.g., multimedia) require minimum amount of throughput to be “effective” other apps (“elastic apps”) make use of whatever throughput they get Security Encryption, data integrity, … 23 CSci4211: Application Layer
24 .CSci4211: Application Layer 24 Transport service requirements of common apps Application file transfer e-mail Web documents real-time audio/video stored audio/video interactive games Instant messaging Data loss no loss no loss loss-tolerant loss-tolerant loss-tolerant loss-tolerant no loss Bandwidth elastic elastic elastic audio: 5Kb-1Mb video:10Kb-5Mb same as above few Kbps up elastic Time Sensitive no no no yes, 100’s msec yes, few secs yes, 100’s msec yes and no
25 .CSci4211: Application Layer 25 Internet apps: their protocols and transport protocols Application e-mail remote terminal access Web file transfer streaming multimedia remote file server Internet telephony Application layer protocol smtp [RFC 821] telnet [RFC 854] http [RFC 2068] ftp [RFC 959] proprietary (e.g. RealNetworks) NSF proprietary (e.g., Vocaltec) Underlying transport protocol TCP TCP TCP TCP TCP or UDP TCP or UDP typically UDP
26 .Application Layer 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 Client process: process that initiates communication Server process: process that waits to be contacted Note: applications with P2P architectures have client processes & server processes 26
27 .CSci4211: Application Layer 27 Network Applications: some jargon A process is a program that is running within a host. Within the same host, two processes communicate with interprocess communication defined by the OS. Processes running in different hosts communicate with an application-layer protocol A user agent is an interface between the user and the network application. Web : browser E-mail: mail reader streaming audio/video: media player
28 .2: Application Layer App-layer protocol defines Types of messages exchanged, e.g., request, response Message syntax: what fields in messages & how fields are delineated Message semantics meaning of information in fields Rules for when and how processes send & respond to messages Public-domain protocols: defined in RFCs allows for interoperability e.g., HTTP, SMTP, BitTorrent Proprietary protocols: e.g., Skype, ppstream 28 CSci4211: Application Layer
29 .CSci4211: Application Layer 29 Application Programming Interface API: application programming interface defines interface between application and transport layer socket: Internet API two processes communicate by sending data into socket, reading data out of socket Q: how does a process “identify” the other process with which it wants to communicate? IP address of host running other process “ port number ” - allows receiving host to determine to which local process the message should be delivered API: (1) choice of transport protocol; (2) ability to fix a few parameters (lots more on this later)