版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、2: Application Layer,1,Chapter 2: Application layer,2.1 Principles of network applications 2.2 Web and HTTP 2.3 FTP 2.4 Electronic Mail SMTP, POP3, IMAP 2.5 DNS,2: Application Layer,2,Chapter 2: Application Layer,Our goals: conceptual, implementation aspects of network application protocols transpor
2、t-layer service models client-server paradigm peer-to-peer paradigm,learn about protocols by examining popular application-level protocols HTTP FTP SMTP / POP3 / IMAP DNS programming network applications socket API,2: Application Layer,3,Some network apps,E-mail Web Instant messaging Remote login P2
3、P file sharing Multi-user network games Streaming stored video clips,Internet telephone Real-time video conference Massive parallel computing,2: Application Layer,4,Client-server architecture,server: always-on host permanent IP address server farms for scaling clients: communicate with server may be
4、 intermittently connected may have dynamic IP addresses do not communicate directly with each other,2: Application Layer,5,Processes communicating,Process: program running within a host. within same host, two processes communicate using inter-process communication (defined by OS). processes in diffe
5、rent 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 (2) ability to fix a few parameters (lots more on this later),2: Application Layer,7,A
6、ddressing processes,to receive messages, process must have identifier host device has unique32-bit IP address Q: does IP address of host on which process runs suffice for identifying the process? Answer: NO, many processes can be running on same host,identifier includes both IP address and port numb
7、ers associated with process on host. Example port numbers: HTTP server: 80 Mail server: 25 to send HTTP message to web server: IP address: 2 Port number: 80 more shortly,2: Application Layer,8,What transport service does an app need?,Data loss some apps (e.g., audio) c
8、an 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”,Bandwidth some apps (e.g., multimedia) require minimum amount of bandwidth to be “effective” other app
9、s (“elastic apps”) make use of whatever bandwidth they get,2: Application Layer,9,Internet transport protocols services,TCP service: connection-oriented: setup required between client and server processes reliable transport between sending and receiving process flow control: sender wont overwhelm re
10、ceiver congestion control: throttle sender when network overloaded does not provide: timing, minimum bandwidth guarantees,UDP service: unreliable data transfer between sending and receiving process does not provide: connection setup, reliability, flow control, congestion control, timing, or bandwidt
11、h guarantee Q: why bother? Why is there a UDP?,2: Application Layer,10,Internet apps: application, transport protocols,Application e-mail remote terminal access Web file transfer streaming multimedia Internet telephony,Application layer protocol SMTP RFC 2821 Telnet RFC 854 HTTP RFC 2616 FTP RFC 959
12、 proprietary (e.g. RealNetworks) proprietary (e.g., Vonage,Dialpad),Underlying transport protocol TCP TCP TCP TCP TCP or UDP typically UDP,2: Application Layer,11,Web and HTTP,First some jargon Web page consists of objects Object can be HTML file, JPEG image, Java applet, audio file, Web page consis
13、ts of base HTML-file which includes several referenced objects Each object is addressable by a URL Example URL:,2: Application Layer,12,HTTP overview,HTTP: hypertext transfer protocol Webs application layer protocol client/server model client: browser that requests, receives, “displays” Web objects
14、server: Web server sends objects in response to requests HTTP 1.0: RFC 1945 HTTP 1.1: RFC 2068,PC running Explorer,Server running Apache Web server,Mac running Navigator,HTTP request,HTTP request,HTTP response,HTTP response,2: Application Layer,13,HTTP overview (continued),Uses TCP: client initiates
15、 TCP connection (creates socket) to server, port 80 server accepts TCP connection from client HTTP messages (application-layer protocol messages) exchanged between browser (HTTP client) and Web server (HTTP server) TCP connection closed,HTTP is “stateless” server maintains no information about past
16、client requests,Protocols that maintain “state” are complex! past history (state) must be maintained if server/client crashes, their views of “state” may be inconsistent, must be reconciled,aside,2: Application Layer,14,HTTP connections,Nonpersistent HTTP At most one object is sent over a TCP connec
17、tion. HTTP/1.0 uses nonpersistent HTTP,Persistent HTTP Multiple objects can be sent over single TCP connection between client and server. HTTP/1.1 uses persistent connections in default mode,2: Application Layer,15,Nonpersistent HTTP,Suppose user enters URL www.someS/someDepartment/home.ind
18、ex,1a. HTTP client initiates TCP connection to HTTP server (process) at www.someS on port 80,2. HTTP client sends HTTP request message (containing URL) into TCP connection socket. Message indicates that client wants object someDepartment/home.index,1b. HTTP server at host www.someS
19、 waiting for TCP connection at port 80. “accepts” connection, notifying client,3. HTTP server receives request message, forms response message containing requested object, and sends message into its socket,time,(contains text, references to 10 jpeg images),2: Application Layer,16,Nonpersistent HTTP
20、(cont.),5. HTTP client receives response message containing html file, displays html. Parsing html file, finds 10 referenced jpeg objects,6. Steps 1-5 repeated for each of 10 jpeg objects,4. HTTP server closes TCP connection.,time,2: Application Layer,17,Non-Persistent HTTP: Response time,Definition
21、 of RTT: time to send a small packet to travel from client to server and back. Response time: one RTT to initiate TCP connection one RTT for HTTP request and first few bytes of HTTP response to return file transmission time total = 2RTT+transmit time,2: Application Layer,18,Cookies (continued),What
22、cookies can bring: authorization shopping carts recommendations user session state (Web e-mail),Cookies and privacy: cookies permit sites to learn a lot about you you may supply name and e-mail to sites,aside,How to keep “state”: Protocol endpoints: maintain state at sender/receiver over multiple tr
23、ansactions cookies: http messages carry state,2: Application Layer,19,Web caches (proxy server),user sets browser: Web accesses via cache browser sends all HTTP requests to cache object in cache: cache returns object else cache requests object from origin server, then returns object to client,Goal:
24、satisfy client request without involving origin server,client,Proxy server,client,HTTP request,HTTP request,HTTP response,HTTP response,HTTP request,HTTP response,origin server,origin server,2: Application Layer,20,FTP: the file transfer protocol,transfer file to/from remote host client/server model
25、 client: side that initiates transfer (either to/from remote) server: remote host ftp: RFC 959 ftp server: port 21,file transfer,remote file system,user at host,2: Application Layer,21,FTP: separate control, data connections,FTP client contacts FTP server at port 21, specifying TCP as transport prot
26、ocol Client obtains authorization over control connection Client browses remote directory by sending commands over control connection. When server receives file transfer command, server opens 2nd TCP connection (for file) to client After transferring one file, server closes data connection.,Server o
27、pens another TCP data connection to transfer another file. Control connection: “out of band” FTP server maintains “state”: current directory, earlier authentication,2: Application Layer,22,E_mail Scenario: Alice sends message to Bob,1) Alice uses UA to compose message and “to” 2) A
28、lices UA sends message to her mail server; message placed in message queue 3) Client side of SMTP opens TCP connection with Bobs mail server,4) SMTP client sends Alices message over the TCP connection 5) Bobs mail server places the message in Bobs mailbox 6) Bob invokes his user agent to read messag
29、e,1,2,3,4,5,6,2: Application Layer,23,DNS: Domain Name System,People: many identifiers: SSN, name, passport # Internet hosts, routers: IP address (32 bit) - used for addressing datagrams “name”, e.g., - used by humans Q: map between IP addresses and name ?,Domain Name System: distributed database implemented in hierarchy of many name servers application-layer protocol host, routers, name serv
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 病案借阅专项检查方案
- 2026年广东省巡察工作业务知识专题培训测试题(附答案)
- 工矿商贸安全监管科2026年安全生产工作总结与2027年工作思路
- 日间手术病案操作流程
- 《老年活动策划与设计》课件-项目3各类老年活动的策划与组织实务(上)
- 电子制造固定资产管理制度
- 双减政策下义务教育质量提升路径研究论文
- 2026年SpeakerSurroundPlayer设计(媒体播放技巧)试题及答案
- 2027年软件接口协议(数据传输安全保障条款)
- 2027年游戏开发协议(版本更新计划)
- 颅内动脉瘤诊疗专家共识(2025版)
- 江苏省自考04751计算机网络安全高频考点重点
- 2026年卫生副高级职称面审答辩(全科医学)经典试题及答案
- 瀚高等保测评作业指导书
- 2025版建筑工程建筑面积计算规范
- 票据法律培训课件
- 撰稿服务合同范本模板
- DB15∕T 3120-2023 专业技术人员职业资格考试管理规范
- 中医针灸跟师医案记录
- 2025年泰安银行笔试题型及答案
- 2025至2030中国柚子皮行业发展趋势分析与未来投资战略咨询研究报告
评论
0/150
提交评论