II B.
Sc Honor CSC (Semester IV) Data Communication and Computer Network
UNIT – V
THE APPLICATION LAYER:
1. Domain Name System
2. Electronic Mail
3. World Wide Web: architectural overview, dynamic web document and http.
APPLICATION LAYER PROTOCOLS:
Simple Network Management Protocol
File Transfer Protocol
Simple Mail Transfer Protocol
Telnet
Department of Computer Science, TJPS College, Guntur. 1
Prepared by KADIRI NAGESWARA RAO. MCA
II [Link] Honor CSC (Semester IV) Data Communication and Computer Network
1. Explain the Domain Name System.
1. The DNS Name Space: The Internet is divided into over 200 top-level domains, where each
domain covers many hosts. Each domain is partitioned into sub domains. All these domains can
be represented by a tree.
The top-level domains come in two flavors: generic and countries. The original generic
domains were com (commercial), edu (educational institutions), gov (the U.S. Federal
Government), int (certain international organizations), mil (the U.S. armed forces), net
(network providers), and org (nonprofit organizations).
2. Resource Records: Every domain, whether it is a single host or a top-level domain, can have
a set of resource records associated with it. A resource record is a five-tuple.
Domain_name Time_to_live Class Type Value
The Domain_name tells the domain to which this record applies.
The Time_to_live field gives an indication of how stable the record is.
The third field of every resource record is the Class.
The Type field tells what kind of record this is.
3. Name Servers: The DNS name space is divided into non overlapping zones. Each zone
contains some part of the tree and also contains name servers holding the information about that
zone. To improve reliability, some servers for a zone can be located outside the zone. DNS is
extremely important to the correct functioning of the Internet.
-------------------------------XXXXXXXXXXXXXXXXXXX------------------------------
2. Explain the Electronic Mail.
1. Architecture and Services: They normally consist of two subsystems: the user agents, which
allow people to read and send e-mail, and the message transfer agents, which move the
messages from the source to the destination.
Department of Computer Science, TJPS College, Guntur. 2
Prepared by KADIRI NAGESWARA RAO. MCA
II [Link] Honor CSC (Semester IV) Data Communication and Computer Network
Typically, e-mail systems support five basic functions.
Composition refers to the process of creating messages and answers.
Transfer refers to moving messages from the originator to the recipient.
Reporting has to do with telling the originator what happened to the message.
Displaying incoming messages is needed so people can read their e-mail.
Disposition is the final step and concerns what the recipient does with the message after
receiving it.
2. The User Agent:
Sending E-mail: To send an e-mail message, a user must provide the message, the destination
address, and possibly some other parameters. The message can be produced with a free-standing
text editor, a word processing program, or possibly with a specialized text editor built into the
user agent. The destination address must be in a format that the user agent can deal with. Many
user agents expect addresses of the form
user@dns-address.
Reading E-mail: Typically, when a user agent is started up, it looks at the user's mailbox for
incoming e-mail before displaying anything on the screen. Then it may announce the number of
messages in the mailbox or display a one-line summary of each one and wait for a command.
3. Message Formats:
RFC 822:
RFC 822 header fields related to message transport.
MIME—The Multipurpose Internet Mail Extensions: The problems include sending and
receiving
1. Messages in languages with accents (e.g., French and German).
2. Messages in non-Latin alphabets (e.g., Hebrew and Russian).
3. Messages in languages without alphabets (e.g., Chinese and Japanese).
4. Messages not containing text at all (e.g., audio or images).
A solution was proposed in RFC 1341 and updated in RFCs 2045–2049. This solution, called
MIME (Multipurpose Internet Mail Extensions) is now widely used.
Department of Computer Science, TJPS College, Guntur. 3
Prepared by KADIRI NAGESWARA RAO. MCA
II [Link] Honor CSC (Semester IV) Data Communication and Computer Network
RFC 822 headers added by MIME.
4. Message Transfer:
SMTP—The Simple Mail Transfer Protocol: E-mail is delivered by having the source
machine establish a TCP connection to port 25 of the destination machine. Listening to this port
is an e-mail daemon that speaks SMTP (Simple Mail Transfer Protocol).
5. Final Delivery:
POP3: User transfer agents to contact the message transfer agent and allow e-mail to be copied
from the ISP to the user. One such protocol is POP3 (Post Office Protocol Version 3), which is
described in RFC 1939. The POP3 protocol goes through three states in sequence:
1. Authorization.
2. Transactions.
3. Update.
The authorization state deals with having the user log in. The transaction state deals with the user
collecting the e-mails and marking them for deletion from the mailbox. The update state actually
causes the e-mails to be deleted.
IMAP:
Department of Computer Science, TJPS College, Guntur. 4
Prepared by KADIRI NAGESWARA RAO. MCA
II [Link] Honor CSC (Semester IV) Data Communication and Computer Network
Delivery Features: Delivery feature often provided is the ability to forward incoming e-mail to a
different address.
--------------------------XXXXXXXXXXXXXXXXXXXXXXXXXXXX------------------------
3. Explain the World Wide Web.
1. Architectural Overview: The Web consists of a vast, worldwide collection of documents or
Web pages. Users can follow a link by clicking on it, which then takes them to the page pointed
to. This process can be repeated indefinitely. The idea of having one page point to another, now
called hypertext. Pages are viewed with a program called a browser.
The Client Side: A browser is a program that can display a Web page and catch mouse clicks to
items on the displayed page. Pages are named using URLs (Uniform Resource Locators). A
typical URL is
[Link]
Let us trace the steps that occur when this link is selected.
1. The browser determines the URL (by seeing what was selected).
2. The browser asks DNS for the IP address of [Link].
3. DNS replies with [Link].
4. The browser makes a TCP connection to port 80 on [Link].
5. It then sends over a request asking for file /home/[Link].
6. The [Link] server sends the file /home/[Link].
7. The TCP connection is released.
8. The browser displays all the text in /home/[Link].
9. The browser fetches and displays all images in this file.
The Server Side: The steps that the server performs in its main loop are:
1. Accept a TCP connection from a client (a browser).
2. Get the name of the file requested.
3. Get the file (from disk).
4. Return the file to the client.
5. Release the TCP connection.
The following steps, depending on which ones are needed for that particular request.
1. Resolve the name of the Web page requested.
2. Authenticate the client.
3. Perform access control on the client.
4. Perform access control on the Web page.
5. Check the cache.
Department of Computer Science, TJPS College, Guntur. 5
Prepared by KADIRI NAGESWARA RAO. MCA
II [Link] Honor CSC (Semester IV) Data Communication and Computer Network
6. Fetch the requested page from disk.
7. Determine the MIME type to include in the response.
8. Take care of miscellaneous odds and ends.
9. Return the reply to the client.
10. Make an entry in the server log.
URLs—Uniform Resource Locators: URLs have three parts: the protocol (also known as the
scheme), the DNS name of the machine on which the page is located, and a local name uniquely
indicating the specific page (usually just a file name on the machine where it resides).
Statelessness and Cookies: The Web is basically stateless. Netscape devised a much-criticized
technique called cookies. A controversial use of cookies is to secretly collect information about
users' Web browsing habits. To maintain some semblance of privacy, some users configure their
browsers to reject all cookies.
2. Dynamic Web Documents:
Server-Side Dynamic Web Page Generation: When a user fills in a form and clicks on the
submit button, a message is sent to the server indicating that it contains the contents of a form,
along with the fields the user filled in. The traditional way to handle forms and other interactive
Web pages is a system called the CGI (Common Gateway Interface). It is a standardized
interface to allow Web servers to talk to back-end programs and scripts that can accept input
(e.g., from forms) and generate HTML pages in response.
A popular language for writing these scripts is PHP (PHP: Hypertext Preprocessor).
There are two different ways to generate dynamic HTML pages: CGI scripts and embedded
PHP. There is also a third technique, called JSP (JavaServer Pages). A fourth technique, ASP
(Active Server Pages), is Microsoft's version of PHP and JavaServer Pages. The collection of
technologies for generating content on the fly is sometimes called dynamic HTML.
Client-Side Dynamic Web Page Generation: CGI, PHP, JSP, and ASP scripts solve the
problem of handling forms and interactions with databases on the server. They can all accept
incoming information from forms, look up information in one or more databases, and generate
HTML pages with the results. The most popular scripting language for the client side is
JavaScript. Another popular method is through the use of applets.
3. HTTP—The HyperText Transfer Protocol:
Connections: In HTTP 1.0, after the connection was established, a single request was sent over
and a single response was sent back. Then the TCP connection was released.
Department of Computer Science, TJPS College, Guntur. 6
Prepared by KADIRI NAGESWARA RAO. MCA
II [Link] Honor CSC (Semester IV) Data Communication and Computer Network
Methods:
The built-in HTTP request methods
Message Headers: The request line may be followed by additional lines with more information.
They are called request headers. This information can be compared to the parameters of a
procedure call. Responses may also have response headers.
Some HTTP message headers.
---------------------------------XXXXXXXXXXXXXXXXXXXXXXXXX---------------------------
4. Explain the Application Layer Protocols.
Simple Network Management Protocol (SNMP): It is a way that servers can share
information about their current state, and also a channel through which an administrate can
modify pre-defined values. The Port number of SNMP is 161(TCP) and 162(UDP).
Department of Computer Science, TJPS College, Guntur. 7
Prepared by KADIRI NAGESWARA RAO. MCA
II [Link] Honor CSC (Semester IV) Data Communication and Computer Network
File Transfer Protocol: FTP is not just a protocol but it is also a [Link] promotes
sharing of files via remote computers with reliable and efficient data transfer. The Port number
for FTP is 20 for data and 21 for control.
Command: ftp machinename
Simple Mail Transfer Protocol: It is a part of the TCP/IP protocol. Using a process called
“store and forward,” SMTP moves your email on and across networks. It works closely with
something called the Mail Transfer Agent (MTA) to send your communication to the right
computer and email inbox. The Port number for SMTP is 25.
Command: MAIL FROM:<mail@[Link]?
Telnet: Telnet stands for the TELetype NETwork. It is used for the initial setup of devices like
switches. Telnet protocol to communicate with a remote device or system. The port number of
the telnet is 23.
Command: telnet [\\RemoteServer]
------------------------------XXXXXXXXXXXXXXXXXXXXX----------------------------------------
Department of Computer Science, TJPS College, Guntur. 8
Prepared by KADIRI NAGESWARA RAO. MCA