<<

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 Mail Extension (MIME) • Simple Mail Transfer Protocol (SMTP) • (POP3)

Œ and Rlogin Œ (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 names to IP address (RFC 1034 and 1035) ΠProgram calls contact DNS serverresolver to lookup the name and return theto 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 4 Computer and Data Networks,7.–a The –v Application surrey.ac.uk Layer and Services ©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 agent allows people to read and send email; and userthe 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 delete message n It is used to fetch email from thelogin remote mailbox and , logout , store it on the user’s local. machine tofetch be read message 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) European Centre for Nuclear Research

ΠBegan in 1989 at CERN - the

Π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 ( Œ The browser asks DNSURL) for the address of the URL Œ DNS reply with the IP address IP Œ The browser makes a TCP connection to port 80 of the IP address Œ The browser sends a pointed by the URL command GET Œ The server sends the page thein a page file Œ The TCP connection is released Œ The browser displays the file all the text The browser fetches and displays Œ in images in the page all 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

ΠIt is a kind of gateway that speaks HTTP to the browser but FTP, , 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 function is an important ΠPut a proxy server inside 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 .

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. The Application Layer and Services 35 ©Dr.Z.Sun Summary

ΠDomain Name Service (DNS) ΠElectronic Mail (Email) ΠTelnet and Rlogin ΠWorld Wide Web (WWW) ΠVoIP

Computer and Data Networks,7. The Application Layer and Services 36 ©Dr.Z.Sun