7. the application layer and services - university of...
TRANSCRIPT
![Page 1: 7. The Application Layer and Services - University of Surreyinfo.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_7.pdf · Computer and Data Networks,7. The Application Layer](https://reader034.vdocuments.mx/reader034/viewer/2022042105/5e83f512e93d20751941059f/html5/thumbnails/1.jpg)
Computer and Data Networks,7. The Application Layer and Services ©Dr.Z.Sun 1
7. The Application Layer and Services
![Page 2: 7. The Application Layer and Services - University of Surreyinfo.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_7.pdf · Computer and Data Networks,7. The Application Layer](https://reader034.vdocuments.mx/reader034/viewer/2022042105/5e83f512e93d20751941059f/html5/thumbnails/2.jpg)
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
![Page 3: 7. The Application Layer and Services - University of Surreyinfo.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_7.pdf · Computer and Data Networks,7. The Application Layer](https://reader034.vdocuments.mx/reader034/viewer/2022042105/5e83f512e93d20751941059f/html5/thumbnails/3.jpg)
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
![Page 4: 7. The Application Layer and Services - University of Surreyinfo.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_7.pdf · Computer and Data Networks,7. The Application Layer](https://reader034.vdocuments.mx/reader034/viewer/2022042105/5e83f512e93d20751941059f/html5/thumbnails/4.jpg)
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
![Page 5: 7. The Application Layer and Services - University of Surreyinfo.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_7.pdf · Computer and Data Networks,7. The Application Layer](https://reader034.vdocuments.mx/reader034/viewer/2022042105/5e83f512e93d20751941059f/html5/thumbnails/5.jpg)
Computer and Data Networks,7. The Application Layer and Services ©Dr.Z.Sun 5
Name Servers and Resolver looks up
![Page 6: 7. The Application Layer and Services - University of Surreyinfo.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_7.pdf · Computer and Data Networks,7. The Application Layer](https://reader034.vdocuments.mx/reader034/viewer/2022042105/5e83f512e93d20751941059f/html5/thumbnails/6.jpg)
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
![Page 7: 7. The Application Layer and Services - University of Surreyinfo.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_7.pdf · Computer and Data Networks,7. The Application Layer](https://reader034.vdocuments.mx/reader034/viewer/2022042105/5e83f512e93d20751941059f/html5/thumbnails/7.jpg)
Computer and Data Networks,7. The Application Layer and Services ©Dr.Z.Sun 7
Reading Email
K: Keep, A: Answer, F: Forwarded
![Page 8: 7. The Application Layer and Services - University of Surreyinfo.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_7.pdf · Computer and Data Networks,7. The Application Layer](https://reader034.vdocuments.mx/reader034/viewer/2022042105/5e83f512e93d20751941059f/html5/thumbnails/8.jpg)
Computer and Data Networks,7. The Application Layer and Services ©Dr.Z.Sun 8
Message header format (RFC822)
![Page 9: 7. The Application Layer and Services - University of Surreyinfo.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_7.pdf · Computer and Data Networks,7. The Application Layer](https://reader034.vdocuments.mx/reader034/viewer/2022042105/5e83f512e93d20751941059f/html5/thumbnails/9.jpg)
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
![Page 10: 7. The Application Layer and Services - University of Surreyinfo.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_7.pdf · Computer and Data Networks,7. The Application Layer](https://reader034.vdocuments.mx/reader034/viewer/2022042105/5e83f512e93d20751941059f/html5/thumbnails/10.jpg)
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.
![Page 11: 7. The Application Layer and Services - University of Surreyinfo.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_7.pdf · Computer and Data Networks,7. The Application Layer](https://reader034.vdocuments.mx/reader034/viewer/2022042105/5e83f512e93d20751941059f/html5/thumbnails/11.jpg)
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
![Page 12: 7. The Application Layer and Services - University of Surreyinfo.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_7.pdf · Computer and Data Networks,7. The Application Layer](https://reader034.vdocuments.mx/reader034/viewer/2022042105/5e83f512e93d20751941059f/html5/thumbnails/12.jpg)
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.
![Page 13: 7. The Application Layer and Services - University of Surreyinfo.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_7.pdf · Computer and Data Networks,7. The Application Layer](https://reader034.vdocuments.mx/reader034/viewer/2022042105/5e83f512e93d20751941059f/html5/thumbnails/13.jpg)
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.
![Page 14: 7. The Application Layer and Services - University of Surreyinfo.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_7.pdf · Computer and Data Networks,7. The Application Layer](https://reader034.vdocuments.mx/reader034/viewer/2022042105/5e83f512e93d20751941059f/html5/thumbnails/14.jpg)
Computer and Data Networks,7. The Application Layer and Services ©Dr.Z.Sun 14
POP3
Using POP3 to fetch three messages.
![Page 15: 7. The Application Layer and Services - University of Surreyinfo.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_7.pdf · Computer and Data Networks,7. The Application Layer](https://reader034.vdocuments.mx/reader034/viewer/2022042105/5e83f512e93d20751941059f/html5/thumbnails/15.jpg)
Computer and Data Networks,7. The Application Layer and Services ©Dr.Z.Sun 15
IMAP
A comparison of POP3 and IMAP.
![Page 16: 7. The Application Layer and Services - University of Surreyinfo.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_7.pdf · Computer and Data Networks,7. The Application Layer](https://reader034.vdocuments.mx/reader034/viewer/2022042105/5e83f512e93d20751941059f/html5/thumbnails/16.jpg)
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
![Page 17: 7. The Application Layer and Services - University of Surreyinfo.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_7.pdf · Computer and Data Networks,7. The Application Layer](https://reader034.vdocuments.mx/reader034/viewer/2022042105/5e83f512e93d20751941059f/html5/thumbnails/17.jpg)
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
![Page 18: 7. The Application Layer and Services - University of Surreyinfo.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_7.pdf · Computer and Data Networks,7. The Application Layer](https://reader034.vdocuments.mx/reader034/viewer/2022042105/5e83f512e93d20751941059f/html5/thumbnails/18.jpg)
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
![Page 19: 7. The Application Layer and Services - University of Surreyinfo.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_7.pdf · Computer and Data Networks,7. The Application Layer](https://reader034.vdocuments.mx/reader034/viewer/2022042105/5e83f512e93d20751941059f/html5/thumbnails/19.jpg)
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
![Page 20: 7. The Application Layer and Services - University of Surreyinfo.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_7.pdf · Computer and Data Networks,7. The Application Layer](https://reader034.vdocuments.mx/reader034/viewer/2022042105/5e83f512e93d20751941059f/html5/thumbnails/20.jpg)
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
![Page 21: 7. The Application Layer and Services - University of Surreyinfo.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_7.pdf · Computer and Data Networks,7. The Application Layer](https://reader034.vdocuments.mx/reader034/viewer/2022042105/5e83f512e93d20751941059f/html5/thumbnails/21.jpg)
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, ...
![Page 22: 7. The Application Layer and Services - University of Surreyinfo.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_7.pdf · Computer and Data Networks,7. The Application Layer](https://reader034.vdocuments.mx/reader034/viewer/2022042105/5e83f512e93d20751941059f/html5/thumbnails/22.jpg)
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?
![Page 23: 7. The Application Layer and Services - University of Surreyinfo.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_7.pdf · Computer and Data Networks,7. The Application Layer](https://reader034.vdocuments.mx/reader034/viewer/2022042105/5e83f512e93d20751941059f/html5/thumbnails/23.jpg)
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.
![Page 24: 7. The Application Layer and Services - University of Surreyinfo.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_7.pdf · Computer and Data Networks,7. The Application Layer](https://reader034.vdocuments.mx/reader034/viewer/2022042105/5e83f512e93d20751941059f/html5/thumbnails/24.jpg)
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
![Page 25: 7. The Application Layer and Services - University of Surreyinfo.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_7.pdf · Computer and Data Networks,7. The Application Layer](https://reader034.vdocuments.mx/reader034/viewer/2022042105/5e83f512e93d20751941059f/html5/thumbnails/25.jpg)
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)
![Page 26: 7. The Application Layer and Services - University of Surreyinfo.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_7.pdf · Computer and Data Networks,7. The Application Layer](https://reader034.vdocuments.mx/reader034/viewer/2022042105/5e83f512e93d20751941059f/html5/thumbnails/26.jpg)
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.
![Page 27: 7. The Application Layer and Services - University of Surreyinfo.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_7.pdf · Computer and Data Networks,7. The Application Layer](https://reader034.vdocuments.mx/reader034/viewer/2022042105/5e83f512e93d20751941059f/html5/thumbnails/27.jpg)
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
![Page 28: 7. The Application Layer and Services - University of Surreyinfo.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_7.pdf · Computer and Data Networks,7. The Application Layer](https://reader034.vdocuments.mx/reader034/viewer/2022042105/5e83f512e93d20751941059f/html5/thumbnails/28.jpg)
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.
![Page 29: 7. The Application Layer and Services - University of Surreyinfo.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_7.pdf · Computer and Data Networks,7. The Application Layer](https://reader034.vdocuments.mx/reader034/viewer/2022042105/5e83f512e93d20751941059f/html5/thumbnails/29.jpg)
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
![Page 30: 7. The Application Layer and Services - University of Surreyinfo.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_7.pdf · Computer and Data Networks,7. The Application Layer](https://reader034.vdocuments.mx/reader034/viewer/2022042105/5e83f512e93d20751941059f/html5/thumbnails/30.jpg)
Computer and Data Networks,7. The Application Layer and Services ©Dr.Z.Sun 30
Voice over IP
The H323 architectural model for Internet telephony.
![Page 31: 7. The Application Layer and Services - University of Surreyinfo.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_7.pdf · Computer and Data Networks,7. The Application Layer](https://reader034.vdocuments.mx/reader034/viewer/2022042105/5e83f512e93d20751941059f/html5/thumbnails/31.jpg)
Computer and Data Networks,7. The Application Layer and Services ©Dr.Z.Sun 31
Voice over IP (2)
The H323 protocol stack.
![Page 32: 7. The Application Layer and Services - University of Surreyinfo.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_7.pdf · Computer and Data Networks,7. The Application Layer](https://reader034.vdocuments.mx/reader034/viewer/2022042105/5e83f512e93d20751941059f/html5/thumbnails/32.jpg)
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.
![Page 33: 7. The Application Layer and Services - University of Surreyinfo.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_7.pdf · Computer and Data Networks,7. The Application Layer](https://reader034.vdocuments.mx/reader034/viewer/2022042105/5e83f512e93d20751941059f/html5/thumbnails/33.jpg)
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.
![Page 34: 7. The Application Layer and Services - University of Surreyinfo.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_7.pdf · Computer and Data Networks,7. The Application Layer](https://reader034.vdocuments.mx/reader034/viewer/2022042105/5e83f512e93d20751941059f/html5/thumbnails/34.jpg)
Computer and Data Networks,7. The Application Layer and Services ©Dr.Z.Sun 34
SIP (2)
Use a proxy and redirection servers with SIP.
![Page 35: 7. The Application Layer and Services - University of Surreyinfo.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_7.pdf · Computer and Data Networks,7. The Application Layer](https://reader034.vdocuments.mx/reader034/viewer/2022042105/5e83f512e93d20751941059f/html5/thumbnails/35.jpg)
Computer and Data Networks,7. The Application Layer and Services ©Dr.Z.Sun 35
Comparison of H.323 and SIP
![Page 36: 7. The Application Layer and Services - University of Surreyinfo.ee.surrey.ac.uk/Teaching/Courses/ee2.cdn/sun/cdn_slides_7.pdf · Computer and Data Networks,7. The Application Layer](https://reader034.vdocuments.mx/reader034/viewer/2022042105/5e83f512e93d20751941059f/html5/thumbnails/36.jpg)
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