applications
play

Applications Lecture goal: Overview: conceptual + implementation - PDF document

Applications Lecture goal: Overview: conceptual + implementation specific protocols: aspects of network o http --- Web application protocols o ftp --- File transfer learn about protocols by examining popular o smtp --- Mail


  1. Applications Lecture goal: Overview: conceptual + implementation ¸ specific protocols: ¸ aspects of network o http --- Web application protocols o ftp --- File transfer learn about protocols by ¸ examining popular o smtp --- Mail transfer application-level protocols o pop3/IMAP 4 --- o dns -- Name service 16/9-02 Datorkommunikation & Internet, Anders Broberg, Umu - Applikationslagret 1 Applications and application-layer protocols Application: communicating, application transport distributed processes network data link running in network hosts in o physical “user space” exchange messages to o implement app e.g., email, file transfer, the o Web Application-layer protocols application application transport one “piece” of an app o transport network network data link define messages exchanged o data link physical physical by apps and actions taken user services provided by o lower layer protocols 16/9-02 Datorkommunikation & Internet, Anders Broberg, Umu - Applikationslagret 2 Application-layer protocols (cont). API: application programming interface Process ¸ defines interface Process between application Socket Socket and transport layer TCP with ¸ socket: Internet API TCP with bufferts, bufferts, o two processes variables variables communicate by sending Internet data into socket, reading data out of socket … lots more on this later. 16/9-02 Datorkommunikation & Internet, Anders Broberg, Umu - Applikationslagret 3 1

  2. 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 Timing data transfer some apps (e.g., Internet ¸ telephony, interactive games) Bandwidth require low delay to be “effective” ¸ some apps (e.g., multimedia) require minimum amount of bandwidth to be “effective” ¸ other apps (“elastic apps”) make use of whatever bandwidth they get 16/9-02 Datorkommunikation & Internet, Anders Broberg, Umu - Applikationslagret 4 Transport service requirements of common apps Application Data loss Bandwidth Time Sensitive file transfer no loss elastic no no e-mail no loss elastic no Web documents loss-tolerant elastic real-time audio/video loss-tolerant audio: 5Kb-1Mb yes, 100’s msec video:10Kb-5Mb stored audio/video loss-tolerant same as above yes, few secs interactive games loss-tolerant few Kbps up yes, 100’s msec yes and no financial apps no loss elastic 16/9-02 Datorkommunikation & Internet, Anders Broberg, Umu - Applikationslagret 5 Services provided by Internet transport protocols UDP service: TCP service: unreliable data transfer connection-oriented: setup ¸ ¸ between sending and required between client, server receiving process reliable transport between ¸ does not provide: connection sending and receiving process ¸ setup, reliability, flow flow control: sender won’t ¸ control, congestion control, overwhelm receiver timing, or bandwidth congestion control: throttle ¸ guarantee sender when network overloaded does not providing: timing, ¸ Q: why bother? Why is there a minimum bandwidth guarantees UDP? 16/9-02 Datorkommunikation & Internet, Anders Broberg, Umu - Applikationslagret 6 2

  3. Internet apps: their protocols and transport protocols Application Underlying Application layer protocol transport protocol e-mail smtp [RFC 821] TCP remote terminal access telnet [RFC 854] TCP Web http [RFC 2068] TCP ftp [RFC 959] file transfer TCP streaming multimedia proprietary TCP or UDP (e.g. RealNetworks) remote file server NSF TCP or UDP Internet telephony proprietary typically UDP (e.g., Vocaltec) 16/9-02 Datorkommunikation & Internet, Anders Broberg, Umu - Applikationslagret 7 The Web: some jargon ¸ User agent for Web is ¸ Web page: called a browser: consists of “objects” o addressed by a URL o MS Internet Explorer o ¸ Most Web pages consist o Netscape Communicator of: ¸ Server for Web is base HTML page, and o called Web server: several referenced o objects. o Apache (public domain) ¸ URL has two components: o MS Internet host name and path name: Information Server www.someSchool.edu/someDept/pic.gif 16/9-02 Datorkommunikation & Internet, Anders Broberg, Umu - Applikationslagret 8 The Web: the http protocol http: hypertext transfer protocol http request Web’s application layer ¸ PC running h protocol t t p r Explorer e s p o n client/server model s e ¸ client: browser that o http request requests, receives, “displays” Web objects e Server s n o p s e running r server: Web server sends o p t t h NCSA Web objects in response to server requests http1.0: RFC 1945 ¸ Mac running http1.1: RFC 2068 Navigator ¸ 16/9-02 Datorkommunikation & Internet, Anders Broberg, Umu - Applikationslagret 9 3

  4. The http protocol: more http is “stateless” http: TCP transport service: client initiates TCP connection server maintains no ¸ ¸ (creates socket) to server, port information about past 80 client requests server accepts TCP connection ¸ from client aside Protocols that maintain http messages (application- ¸ “state” are complex! layer protocol messages) exchanged between browser ¸ past history (state) must (http client) and Web server be maintained (http server) ¸ if server/client crashes, TCP connection closed ¸ their views of “state” may Has nothing to do with the ¸ outlook or presentation be inconsistent, must be reconciled 16/9-02 Datorkommunikation & Internet, Anders Broberg, Umu - Applikationslagret 10 http example Suppose user enters URL www.someSchool.edu/someDepartment/home.index (contains text, references to 10 jpeg images) 1a . http client initiates TCP connection to http server 1b. http server at host (process) at www.someSchool.edu. www.someSchool.edu waiting Port 80 is default for http server. for TCP connection at port 80. “accepts” connection, notifying 2. http client sends http request client message (containing URL) into 3. http server receives request TCP connection socket message, forms response message containing requested object ( someDepartment/home.index ), time sends message into socket 16/9-02 Datorkommunikation & Internet, Anders Broberg, Umu - Applikationslagret 11 http example (cont.) 4. http server closes TCP connection. 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 time of 10 jpeg objects 16/9-02 Datorkommunikation & Internet, Anders Broberg, Umu - Applikationslagret 12 4

  5. Non-persistent and persistent connections Non-persistent Persistent ¸ default for HTTP/1.1 ¸ HTTP/1.0 ¸ on same TCP ¸ server parses request, connection: server, responds, and closes parses request, TCP connection responds, parses new request,.. ¸ 2 RTTs to fetch each object ¸ Client sends requests for all referenced ¸ Each object transfer objects as soon as it suffers from slow receives base HTML. start ¸ Fewer RTTs and less slow start. But most 1.0 browsers use parallel TCP connections. 16/9-02 Datorkommunikation & Internet, Anders Broberg, Umu - Applikationslagret 13 http message format: request ¸ two types of http messages: request , response ¸ http request message: o ASCII (human-readable format) request line (GET, POST, GET /somedir/page.html HTTP/1.0 User-agent: Mozilla/4.0 HEAD commands) Accept: text/html, image/gif,image/jpeg header Accept-language:fr lines (extra carriage return, line feed) Carriage return, line feed indicates end of message 16/9-02 Datorkommunikation & Internet, Anders Broberg, Umu - Applikationslagret 14 http request message: general format 16/9-02 Datorkommunikation & Internet, Anders Broberg, Umu - Applikationslagret 15 5

  6. http message format: respone status line (protocol HTTP/1.0 200 OK status code Date: Thu, 06 Aug 1998 12:00:15 GMT status phrase) Server: Apache/1.3.0 (Unix) Last-Modified: Mon, 22 Jun 1998 …... header Content-Length: 6821 lines Content-Type: text/html data data data data data ... data, e.g., requested html file 16/9-02 Datorkommunikation & Internet, Anders Broberg, Umu - Applikationslagret 16 http response status codes In first line in server->client response message. A few sample codes: 200 OK o request succeeded, requested object later in this message 301 Moved Permanently o requested object moved, new location specified later in this message (Location:) 400 Bad Request o request message not understood by server 404 Not Found o requested document not found on this server 505 HTTP Version Not Supported 16/9-02 Datorkommunikation & Internet, Anders Broberg, Umu - Applikationslagret 17 Trying out http (client side) for yourself 1. Telnet to your favorite Web server: Opens TCP connection to port 80 telnet www.eurecom.fr 80 (default http server port) at www.eurecom.fr. Anything typed in sent to port 80 at www.eurecom.fr 2. Type in a GET http request: By typing this in (hit carriage GET /~ross/index.html HTTP/1.0 return twice), you send this minimal (but complete) GET request to http server 3. Look at response message sent by http server! 16/9-02 Datorkommunikation & Internet, Anders Broberg, Umu - Applikationslagret 18 6

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend