7. the Application Layer and Services
Total Page:16
File Type:pdf, Size:1020Kb
7. The Application Layer and Services Computer and Data Networks,7. The Application Layer and Services 1 ©Dr.Z.Sun Outline Domain Name Service (DNS) Electronic Mail (Email) • Multipurpose Internet Mail Extension (MIME) • Simple Mail Transfer Protocol (SMTP) • Post Office Protocol (POP3) Telnet and Rlogin World Wide Web (WWW) • HyperText Markup Language (HTML) • HyperText Transfer Protocol (HTTP) • Dynamic Web pages (CGI) • Active Web Pages (Java) VoIP Computer and Data Networks,7. The Application Layer and Services 2 ©Dr.Z.Sun (RFC 1034 & 1035) Domain Name Systems (DNS) Binary machine address is not very convenient DNS is a hierarchical domain based naming scheme and a distributed database system for implementing this naming scheme Used for mapping host names to IP address (RFC 1034 and 1035) Program calls resolver to contact DNS server to lookup the name and return the IP address Computer and Data Networks,7. The Application Layer and Services 3 ©Dr.Z.Sun Resource records and an example Domain_name, Time-to-Live, Class, Type, Value IN: Internet Information Example: host –a –v surrey.ac.uk Computer and Data Networks,7. The Application Layer and Services 4 ©Dr.Z.Sun Name Servers and Resolver looks up Computer and Data Networks,7. The Application Layer and Services 5 ©Dr.Z.Sun Electronic mail (E-mail) (RFC 821: transmission, 822: Message format) Two subsystems: the user agent allows people to read and send email; and the message transfer agent moves the message from the source to the destination. Support five basic functions: • Composition • Transfer • Reporting • Display • Disposition Computer and Data Networks,7. The Application Layer and Services 6 ©Dr.Z.Sun Reading Email K: Keep, A: Answer, F: Forwarded Computer and Data Networks,7. The Application Layer and Services 7 ©Dr.Z.Sun Message header format (RFC822) Computer and Data Networks,7. The Application Layer and Services 8 ©Dr.Z.Sun Multipurpose Internet Mail Extension (MIME - RFC 1341, 2045-2049) To add structure to the message body and encoding rules for non- ASCII messages Using the existing mail programs and protocols Five new message header The MIME types and subtypes defined in RFC 2045 Computer and Data Networks,7. The Application Layer and Services 9 ©Dr.Z.Sun An example of multimedia email Same message in different format separated by the boundary The text message The text format of the song. get the sound file named using FTP at the site under the directory The audio format of the song using base64 for transfer encoding. Computer and Data Networks,7. The Application Layer and Services 10 ©Dr.Z.Sun Simple Message Transfer Protocol (SMTP) Messages from the server xyz.com Messages from the client abc.com Computer and Data Networks,7. The Application Layer and Services 11 ©Dr.Z.Sun Email delivery (a) Sending and reading mail when the receiver has a permanent Internet connection and the user agent runs on the same machine as the message transfer agent. (b) Reading e-mail when the receiver has a dial-up connection to an ISP. Computer and Data Networks,7. The Application Layer and Services 12 ©Dr.Z.Sun Post Office Protocol (POP3) (RFC 1225) n It has commands for users to login, fetch message, delete message, logout. n It is used to fetch email from the remote mailbox and store it on the user’s local machine to be read later. Computer and Data Networks,7. The Application Layer and Services 13 ©Dr.Z.Sun 11 POP3 Using POP3 to fetch three messages. Computer and Data Networks,7. The Application Layer and Services 14 ©Dr.Z.Sun IMAP A comparison of POP3 and IMAP. Computer and Data Networks,7. The Application Layer and Services 15 ©Dr.Z.Sun Telnet telnet: • client-server • network virtual terminal (23/TCP) Provides: • session with server • ASCII presentation Allows process-to-process communication Computer and Data Networks,7. The Application Layer and Services 16 ©Dr.Z.Sun 12 The World Wide Web (WWW) Began in 1989 at CERN - the European Centre for Nuclear Research Linked document with first graphical interface in 1993 (Mosaic by Marc Andreessen) In 1994, CERN and MIT set up WWW consortium to develop standard protocols and encourage interoperability Client side: browser, pages, hypertext, hyperlink, hypermedia More info: www.w3.org Computer and Data Networks,7. The Application Layer and Services 17 ©Dr.Z.Sun The client and server side The browser determines the Uniform Resource Locator (URL) The browser asks DNS for the IP address of the URL DNS reply with the IP address The browser makes a TCP connection to port 80 of the IP address The browser sends a GET the page pointed by the URL command The server sends the page in a file The TCP connection is released The browser displays all the text in the file The browser fetches and displays all images in the page Computer and Data Networks,7. The Application Layer and Services 18 ©Dr.Z.Sun An example: telnet the WWW server Type in command Terminal response The status information is Server response displayed in the bottom of the screen If the performance is poor, it may be due to • DNS not responding • server not responding • network congestion during transmission Each in-line image (icon, drawing, photo, etc.) on a page is fetched in a separate new connection. Computer and Data Networks,7. The Application Layer and Services 19 ©Dr.Z.Sun Proxy server It is a kind of gateway that speaks HTTP to the browser but FTP, Gopher, or some other protocols to the server. The translate HTTP request into FTP request, for example. It can be in the same machine as the browser or independent machine Caching is an important function Put a proxy server inside firewall to give users access to web but not full access to Internet Computer and Data Networks,7. The Application Layer and Services 20 ©Dr.Z.Sun HyperText Transfer Protocol (HTTP) It is the standard Web transfer protocol It is constantly evolving. There are two fairly distinct items: • The set of request from browsers to servers • The set of responses going back the other way Simple requests: just GET named page without the version; response is just a raw page Full requests: with version, MIME, encoding, ... Computer and Data Networks,7. The Application Layer and Services 21 ©Dr.Z.Sun Uniform Resource Locators (URL) The URL gives a worldwide name, location and how to access to it The URL has three parts: • The protocol • DNS name of the machine on which the page is located • Local name uniquely indicate the specific page HTTP is the Web’s native language, the one spoken by n What is the page called? HTTP server n Where is the page located? It is also possible to use FTP to How can the page be accessed? n access web pages. Computer and Data Networks,7. The Application Layer and Services 22 ©Dr.Z.Sun HyperText Markup Language (HTML) HTML is an application of ISO standard 8879, SGML (Standard Generalised Mark-up Language), but specialised to hypertext and adapted to the Web It is a mark-up language for describing how documents are to be formatted Proprietary WYSIWYG word processors cannot be used on wob because their internal markup languages (if any) are not standardised across vendors, machines and operating systems. Computer and Data Networks,7. The Application Layer and Services 23 ©Dr.Z.Sun Some common HTML tags The embedding the mark-up commands within each HTML makes it possible for any browser to read and reformat any web page Computer and Data Networks,7. The Application Layer and Services 24 ©Dr.Z.Sun Forms (a) The HTML for an order form. (b) The formatted page. (b) Computer and Data Networks,7. The Application Layer and Services 25 ©Dr.Z.Sun Forms A possible response from the browser to the server with information filled in by the user. Computer and Data Networks,7. The Application Layer and Services 26 ©Dr.Z.Sun Common Gateway Interface (CGI) for Dynamic Web documents Specifies input/output to/from a program that is a hyperlink: • standard input format for arguments to program • output format from program is HTML • allows dynamic WWW pages Server-side processing: • CGI program invoked each time link is used • extra processing overhead on server Computer and Data Networks,7. The Application Layer and Services 27 ©Dr.Z.Sun 18 Dynamic Web Documents Steps in processing the information from an HTML form. Computer and Data Networks,7. The Application Layer and Services 28 ©Dr.Z.Sun Java for Active Web documents Active content: • small program - applet • downloads and executes on client-side request to server for applet • requires virtual machine in client Java: applet downloads to client and executes locally • full programming language/platform • includes security features Computer and Data Networks,7. The Application Layer and Services 29 ©Dr.Z.Sun 19 Voice over IP The H323 architectural model for Internet telephony. Computer and Data Networks,7. The Application Layer and Services 30 ©Dr.Z.Sun Voice over IP (2) The H323 protocol stack. Computer and Data Networks,7. The Application Layer and Services 31 ©Dr.Z.Sun Voice over IP (3) Logical channels between the caller and callee during a call. Computer and Data Networks,7. The Application Layer and Services 32 ©Dr.Z.Sun SIP – The Session Initiation Protocol The SIP methods defined in the core specification. Computer and Data Networks,7. The Application Layer and Services 33 ©Dr.Z.Sun SIP (2) Use a proxy and redirection servers with SIP. Computer and Data Networks,7. The Application Layer and Services 34 ©Dr.Z.Sun Comparison of H.323 and SIP Computer and Data Networks,7.