1 / 19

Applications

Applications. Xin Liu ECS 152B. Ref: slides by J. Kurose and K. Ross. Outline. Overview FTP SMTP / POP3 / IMAP NFS DNS HTTP Content distribution. Process: program running within a host. within same host, two processes communicate using interprocess communication (defined by OS).

ania
Download Presentation

Applications

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Applications Xin Liu ECS 152B Ref: slides by J. Kurose and K. Ross

  2. Outline • Overview • FTP • SMTP / POP3 / IMAP • NFS • DNS • HTTP • Content distribution

  3. Process: program running within a host. within same host, two processes communicate using interprocess communication (defined by OS). processes running in different hosts communicate with an application-layer protocol user agent: interfaces with user “above” and network “below”. implements user interface & application-level protocol Web: browser E-mail: mail reader streaming audio/video: media player Network applications: some review

  4. Application: communicating, distributed processes e.g., e-mail, Web, P2P file sharing, instant messaging running in end systems (hosts) exchange messages to implement application Application-layer protocols one “piece” of an app define messages exchanged by apps and actions taken use communication services provided by lower layer protocols (TCP, UDP) application transport network data link physical application transport network data link physical application transport network data link physical Applications and application-layer protocols

  5. Types of messages exchanged, eg, request & response messages Syntax of message types: what fields in messages & how fields are delineated Semantics of the fields, ie, meaning of information in fields Rules for when and how processes send & respond to messages Public-domain protocols: defined in RFCs allows for interoperability eg, HTTP, SMTP Proprietary protocols: eg, KaZaA App-layer protocol defines

  6. Typical network app has two pieces: client and server request reply application transport network data link physical application transport network data link physical Client-server paradigm Client: • initiates contact with server (“speaks first”) • typically requests service from server, • Web: client implemented in browser; e-mail: in mail reader Server: • provides requested service to client • e.g., Web server sends requested Web page, mail server delivers e-mail

  7. host or server host or server process process socket socket TCP with buffers, variables TCP with buffers, variables Processes communicating across network • process sends/receives messages to/from its socket • socket analogous to door • sending process shoves message out door • sending process asssumes transport infrastructure on other side of door which brings message to socket at receiving process controlled by app developer Internet controlled by OS

  8. For a process to receive messages, it must have an identifier Every host has a unique 32-bit IP address Example port numbers: HTTP server: 80 Mail server: 25 Addressing processes:

  9. 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” What transport service does an app need? Bandwidth • some apps (e.g., multimedia) require minimum amount of bandwidth to be “effective” • other apps (“elastic apps”) make use of whatever bandwidth they get

  10. Transport service requirements of common apps Time Sensitive no no no yes, 100’s msec yes, few secs yes, 100’s msec yes and no Application file transfer e-mail Web documents real-time audio/video stored audio/video interactive games instant messaging Bandwidth elastic elastic elastic audio: 5kbps-1Mbps video:10kbps-5Mbps same as above few kbps up elastic Data loss no loss no loss no loss loss-tolerant loss-tolerant loss-tolerant no loss

  11. TCP service: connection-oriented: setup required between client and server processes reliable transport between sending and receiving process flow control: sender won’t overwhelm receiver congestion control: throttle sender when network overloaded does not providing: 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 bandwidth guarantee Internet transport protocols services

  12. Internet apps: application, transport protocols Application layer protocol SMTP [RFC 2821] Telnet [RFC 854] HTTP [RFC 2616] FTP [RFC 959] proprietary (e.g. RealNetworks) proprietary (e.g., Dialpad) Underlying transport protocol TCP TCP TCP TCP TCP or UDP typically UDP Application e-mail remote terminal access Web file transfer streaming multimedia Internet telephony

  13. Outline • Overview • FTP • SMTP / POP3 / IMAP • NFS • DNS • HTTP • Content distribution

  14. transfer file to/from remote host client/server model client: side that initiates transfer (either to/from remote) server: remote host ftp: RFC 959 ftp server: port 21 FTP user interface FTP client FTP server local file system FTP: the file transfer protocol file transfer user at host remote file system

  15. FTP client contacts FTP server at port 21, specifying TCP as transport protocol Client obtains authorization over control connection Client browses remote directory by sending commands over control connection. When server receives a command for a file transfer, the server opens a TCP data connection to client After transferring one file, server closes connection. TCP control connection port 21 TCP data connection port 20 FTP client FTP server FTP: separate control, data connections

  16. More • Server opens a second TCP data connection to transfer another file. • Three uses of data connection • Send a file to server • Retrieve a file from server • Listing of files • Control connection: “out of band” • FTP server maintains “state”: current directory, earlier authentication • Anonymous FTP may require a valid domain name. • Control: ASCII mode • Data: ASCII or Binary

  17. Sample commands: sent as ASCII text over control channel USER username PASS password Plain text ! Do NOT use it! LISTreturn list of file in current directory RETR filenameretrieves (gets) file STOR filenamestores (puts) file onto remote host Sample return codes status code and phrase 331 Username OK, password required 125 data connection already open; transfer starting 425 Can’t open data connection 452 Error writing file FTP commands, responses

  18. [liu@shannon ~]$ ftp -v ftp.uu.net Connected to ftp.uu.net. 220 FTP server ready. 530 Please login with USER and PASS. 530 Please login with USER and PASS. KERBEROS_V4 rejected as an authentication type Name (ftp.uu.net:liu): anonymous 331 Guest login ok, send your complete e-mail address as password. Password: 230- 230- Welcome to the UUNET archive. 230- A service of UUNET Technologies Inc, Falls Church, Virginia 230- For information about UUNET, call +1 703 206 5600, or see the files 230- in /uunet-info …. 230 Guest login ok, access restrictions apply. Remote system type is UNIX. Using binary mode to transfer files.

  19. ftp> ls 227 Entering Passive Mode (192,48,96,9,118,43) 150 Opening ASCII mode data connection for /bin/ls. total 20088 drwxr-sr-x 2 1 512 Jun 29 2001 .forward -rw-r--r-- 1 11 0 Jun 29 2001 .hushlogin -rw-r--r-- 1 100 59 Jun 29 2001 .kermrc 226 Transfer complete. ftp> ls 227 Entering Passive Mode (192,48,96,9,125,39) 150 Opening ASCII mode data connection for /bin/ls. total 20088 drwxr-sr-x 2 1 512 Jun 29 2001 .forward -rw-r--r-- 1 11 0 Jun 29 2001 .hushlogin -rw-r--r-- 1 100 59 Jun 29 2001 .kermrc -rw-r--r-- 1 100 0 Jun 29 2001 .notar 226 Transfer complete. ftp> bi 200 Type set to I. ftp> quit 221-You have transferred 0 bytes in 0 files. 221-Total traffic for this session was 7739 bytes in 2 transfers. 221-Thank you for using the FTP service on neo-ftp.uu.net. 221 Goodbye. Note: server does the active open/close of the data connection. Connection close=file complete

More Related