Upload
others
View
3
Download
0
Embed Size (px)
Citation preview
Computer and Data Networks,7. The Application Layer and Services ©Dr.Z.Sun 1
7. The Application Layer and Services
Computer and Data Networks,7. The Application Layer and Services ©Dr.Z.Sun 2
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 ©Dr.Z.Sun 3
(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 ©Dr.Z.Sun 4
Resource records and an example
IN: Internet Information
Example: host –a –v surrey.ac.uk
Domain_name, Time-to-Live, Class, Type, Value
Computer and Data Networks,7. The Application Layer and Services ©Dr.Z.Sun 5
Name Servers and Resolver looks up
Computer and Data Networks,7. The Application Layer and Services ©Dr.Z.Sun 6
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 agentmoves 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 ©Dr.Z.Sun 7
Reading Email
K: Keep, A: Answer, F: Forwarded
Computer and Data Networks,7. The Application Layer and Services ©Dr.Z.Sun 8
Message header format (RFC822)
Computer and Data Networks,7. The Application Layer and Services ©Dr.Z.Sun 9
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 ©Dr.Z.Sun 10
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 ©Dr.Z.Sun 11
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 ©Dr.Z.Sun 12
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 ©Dr.Z.Sun 13
Post Office Protocol (POP3) (RFC 1225)
11
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 ©Dr.Z.Sun 14
POP3
Using POP3 to fetch three messages.
Computer and Data Networks,7. The Application Layer and Services ©Dr.Z.Sun 15
IMAP
A comparison of POP3 and IMAP.
Computer and Data Networks,7. The Application Layer and Services ©Dr.Z.Sun 16
Telnet
� telnet:• client-server• network virtual terminal (23/TCP)
� Provides:• session with server• ASCII presentation
� Allows process-to-process communication
12
Computer and Data Networks,7. The Application Layer and Services ©Dr.Z.Sun 17
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 ©Dr.Z.Sun 18
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 ©Dr.Z.Sun 19
An example: telnet the WWW server
� The status information is 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.
Type in command
Terminal response
Server response
Computer and Data Networks,7. The Application Layer and Services ©Dr.Z.Sun 20
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 ©Dr.Z.Sun 21
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 ©Dr.Z.Sun 22
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 HTTP server
� It is also possible to use FTP to access web pages.
n What is the page called?n Where is the page located?n How can the page be accessed?
Computer and Data Networks,7. The Application Layer and Services ©Dr.Z.Sun 23
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 wobbecause their internal markuplanguages (if any) are not standardised across vendors, machines and operating systems.
Computer and Data Networks,7. The Application Layer and Services ©Dr.Z.Sun 24
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 ©Dr.Z.Sun 25
Forms
(a) The HTML for an order form.(b) The formatted page. (b)
Computer and Data Networks,7. The Application Layer and Services ©Dr.Z.Sun 26
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 ©Dr.Z.Sun 27
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
18
Computer and Data Networks,7. The Application Layer and Services ©Dr.Z.Sun 28
Dynamic Web Documents
Steps in processing the information from an HTML form.
Computer and Data Networks,7. The Application Layer and Services ©Dr.Z.Sun 29
Java for Active Web documents
� Active content:• small program - applet• downloads and executes
on client-side• requires virtual machine
in client� Java:
• full programming language/platform
• includes security features
request to server for applet
applet downloads to clientand executes locally
19
Computer and Data Networks,7. The Application Layer and Services ©Dr.Z.Sun 30
Voice over IP
The H323 architectural model for Internet telephony.
Computer and Data Networks,7. The Application Layer and Services ©Dr.Z.Sun 31
Voice over IP (2)
The H323 protocol stack.
Computer and Data Networks,7. The Application Layer and Services ©Dr.Z.Sun 32
Voice over IP (3)
Logical channels between the caller and callee during a call.
Computer and Data Networks,7. The Application Layer and Services ©Dr.Z.Sun 33
SIP – The Session Initiation Protocol
The SIP methods defined in the core specification.
Computer and Data Networks,7. The Application Layer and Services ©Dr.Z.Sun 34
SIP (2)
Use a proxy and redirection servers with SIP.
Computer and Data Networks,7. The Application Layer and Services ©Dr.Z.Sun 35
Comparison of H.323 and SIP
Computer and Data Networks,7. The Application Layer and Services ©Dr.Z.Sun 36
Summary
� Domain Name Service (DNS)� Electronic Mail (Email)� Telnet and Rlogin� World Wide Web (WWW) � VoIP