Traditional Internet Applications: Asst. Prof. Chaiporn Jaikaeo, PH.D
Traditional Internet Applications: Asst. Prof. Chaiporn Jaikaeo, PH.D
Adapted from the notes by Lami Kaya, [email protected], and notes by J.F Kurose and K.W. Ross
1
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
Application-Layer Protocols
Specs for network applications
The syntax and semantics of messages
Actions to be taken if an error arises
How the two sides know when to terminate
communication
There are two broad types of application-layer
protocols that depend on the intended use:
Private communication—proprietary, limited scope
Standardized service—standard, Internet-wide: Web
server, FTP, etc.
Standards for the Internet are known as Request for Comments
(RFCs)
2
Representation And Transfer
Application-layer protocols specify two
aspects of interaction:
Representation
Transfer
3
World Wide Web
Web Protocols
The World Wide Web (WWW) is one of the
most widely used services in the Internet
5
Document Representation With HTML
6
Document Representation With HTML
<HTML>
<HEAD>
<TITLE>
Document Title
</TITLE>
</HEAD>
<BODY>
Hello
</BODY>
</HTML>
7
Uniform Resource Locators
URLs identify where resources can be found
and how they can be obtained
The general form of a URL is:
Example:
8
Uniform Resource Locators
In a typical URL, a user can omit many of the parts
E.g.,
Which omits
the protocol (http is assumed)
the port (80 is assumed)
the document name (index.html is assumed)
and parameters (none are assumed)
9
Hypertext Transfer Protocol
HyperText Transfer Protocol (HTTP)
Primary transfer protocol between web server
and browser (client)
A browser is a client that extracts a server
name from a URL and contacts the server
Most URLs contain an explicit protocol
reference of http:// or omit the protocol
altogether (HTTP is assumed)
10
HTTP
Once it establishes a connection
a browser sends an HTTP request to the server
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 11
HTTP GET Requests/Responses
The browser (client) sends a GET request to
request a resource (e.g., HTML doc, images)
The server responds by sending a header, a
blank line, and the requested document
Sample GET request Sample response
GET /index.html HTTP/1.1 HTTP/1.0 200 OK
Server: Apache/1.3.37
Content-Length: 221
CRLF Content-Type: text/html
(\r\n)
<HTML>
:
</HTML>
12
Response Details
The first line of a response header contains a status
code
14
Electronic Mail
Electronic Mail
One of the most widely used Internet applications
Because it was conceived before personal computers and
hand-held PDAs were available,
Email software is divided into two parts
Email interface application
A mechanism for a user to compose and edit outgoing messages
as well as read and process incoming email
Email transfer program
acts as a client to send a message to the mail server on the
destination computer; the mail server accepts incoming messages
and deposits each in the appropriate user's mailbox
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 21
Electronic Mail
The specifications used for Internet email
can be divided into three broad categories
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 22
Simple Mail Transfer Protocol (SMTP)
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 24
ISPs, Mail Servers, And Mail Access
25
ISPs, Mail Servers, And Mail Access
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 26
Web Browser as Mail Access
ISP provides a special web page that displays
messages from a user's mailbox
Advantages
ability to read email from any computer
a user does not need to run a special mail
interface application
27
Mail Access Protocols (POP, IMAP)
28
Email Representation Standards
Two important email representation
standards exist:
RFC (Request For Comments) 2822 Internet
Message Format
Multi-purpose Internet Mail Extensions (MIME)
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 29
RFC 2822 Mail Message Format
Takes its name from the IETF standards document
RFC 2822
A mail message is represented as a text file and
consists of
a header section
a blank line
and a body
Header lines each have the form:
Keyword: information
where the set of keywords is defined to include From:,
To:, Subject:, Cc:
Multi-purpose Internet Mail Extensions
(MIME)
The MIME standard extends the functionality
of email to allow the transfer of non-text
data in a message
MIME specifies how a binary file can be
encoded into printable characters, included in
a message, and decoded by the receiver
The Base64 encoding standard is most
popular, but MIME does not restrict encoding
to a specific form
31
Domain Name System
Domain Name System (DNS)
DNS provides a service that maps human-
readable symbolic names to computer
addresses
Just like a phonebook of the Internet
Browsers, mail software, and most other
Internet applications use the DNS
33
Domain Name System (DNS)
Each name consists of a sequence of alpha-numeric
segments separated by periods
For example, a computer in the Computer Engineering
Department at Kasetsart University has the domain
name:
garnet.cpe.ku.ac.th
A computer at Cisco, Incorporated has the domain name:
anakin.cisco.com
Domain names are hierarchical, with the most
significant part of the name on the right
34
Top-Level Domains (TLDs)
The most significant segment of each domain name
is called a top-level domain (TLD)
Controlled by the Internet Corporation for Assigned
Names and Numbers (ICANN)
ICANN designates one or more domain registrars to
administer a given top-level domain and approve specific
names
35
Examples of TLDs
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 36
Examples of Country Code TLDs
ccTLD Country
at Austria
be Belgium
ca Canada
ch Switzerland
cn Mainland China
fm Federated States of Micronesia
jp Japan
th Thailand
to Tonga
tv Tuvalu
DNS Hierarchy And Server Model
Each organization is free to choose the
details of its servers
A small organization that only has a few
computers can contract with an ISP to run a DNS
server.
An organization that runs its own server can
choose to place all names for the organization in
a single physical server, or it can choose to
divide its names among multiple servers
38
Possible Server Setups
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 39
Name Resolution
Software (or library) to perform name-address
translation is known as a name resolver
The resolver becomes a client of a DNS server
DNS server returns an answer to the caller
Each resolver is configured with the address of one
or more local domain name servers
The resolver forms a DNS request message
sends the message to the local server
waits for the server to send a DNS reply message for the
answer
40
Example root DNS server
Host at 2
cis.poly.edu wants 3
.edu DNS server
IP address for 4
gaia.cs.umass.edu 5
some time
TLD servers typically cached in local name
servers
Thus root name servers not often visited
nslookup Command
Tool for querying DNS
Available for many operating systems
Including Windows and Linux
$ nslookup
> www.sanook.com
Server: 158.108.32.3
Address: 158.108.32.3#53
Non-authoritative answer:
Name: www.sanook.com
Address: 203.107.165.221
>
Summary
Common Internet applications and protocols
World Wide Web
Electronic Mail
File Transfer
Domain Name System