SlideShare a Scribd company logo
Application Layer
There are several applications in the application layer of the Internet model that follow the
client/server paradigm. The client/server programs can be divided into two categories: those that
can be directly used by the user, such as e-mail, and those that support other application
programs. The Domain Name System (DNS) is a supporting program that is used by other
programs such as e-mail.
1. Domain Name System
Although IP addresses are convenient and compact way for identifying machines and are
fundamental in TCP/IP, it is unsuitable for human user. Meaningful high-level symbolic names
are more convenient for humans. Application software permits users to use symbolic names, but
the underlying network protocols require addresses. This requires the use of names with proper
syntax with efficient translation mechanism. A concept known as Domain Name System (DNS)
was invented for this purpose. DNS is a naming scheme that uses a hierarchical, domain-based
naming scheme on a distributed database system. The basic approach is to divide the internet into
several hundred top-level domains, which come in two flavors - generic and countries. Nearly all
organizations in USA, are under generic name, where each domain is partitioned into
subdomains, and these are further partitioned, and so on, as represented in the form of a tree as
shown in Fig. 1.1.1. The leaves of the tree represent domains that contain no subdomains,
represent single hosts, or a company or contain a thousand of hosts. Naming follows
organizational boundaries, not physical networks. The hierarchical naming system, which is used
by DNS has many advantages over flat addressing scheme used earlier. Key features of the two
approaches are highlighted below:
Fig. 1.1.1 Partial Domain Name Space
Flat namespace
Each machine is given a unique (by NIC) name
Special file is used to keep name-address mapping
All hosts must know the current mapping for all other hosts with which they want to
communicate
Large mapping file, if communication with a large number of machines is required
Not a good scheme for communicating to arbitrary machines over large networks such as Internet
Hierarchical Namespace
Break complete namespace into domains
Domains broken up recursively into one or more subdomains, each of which is basically a
domain again
Further division to create any level of hierarchy – Namespace Tree
Delegate task of name allocation/resolution of parts of the tree to distributed name servers
1.1 Domain name space
To have a hierarchical name space, a domain name space was designed. In this design the names
are defined in an inverted-tree structure with the root at the top. The tree can have only 128
levels: level 0 (root) to level 127.
Label
Each node in the tree has a label, which is a string with a maximum of 63 characters. The root
label is a null string (empty string). DNS requires that children of a node (nodes that branch from
the same node) have different labels, which guarantees the uniqueness of the domain names.
Domain Name
Each node in the tree has a domain name. A full domain name is a sequence of labels separated
by dots (.). The domain names are always read from the node up to the root. The last label is the
label of the root (null). Figure 1.1.2 shows some domain names.
Figure 1.1.2 Domain names and labels
Fully Qualified Domain Name
If a label is terminated by a null string, it is called a fully qualified domain name (FQDN). An
FQDN is a domain name that contains the full name of a host. It contains all labels, from the
most specific to the most general, that uniquely define the name of the host. For example, the
domain name challenger.ate.tbda.edu.
Partially Qualified Domain Name
If a label is not terminated by a null string, it is called a partially qualified domain name
(PQDN). A PQDN starts from a node, but it does not reach the root. It is used when the name to
be resolved belongs to the same site as the client. Here the resolver can supply the missing part,
called the suffix, to create an FQDN. For example, if a user at the jhda.edu. site wants to get the
IP address of the challenger computer, he or she can define the partial name challenger The DNS
client adds the suffix atc.jhda.edu., before passing the address to the DNS server.
Domain
A domain is a subtree of the domain name space. The name of the domain is the domain name
of the node at the top of the subtree. Figure 1.1.3 shows some domains. Note that a domain may
itself be divided into domains (or subdomains as they are sometimes called).
Figure 1.1.3 Domains
1.2 Name-address Resolution
DNS is designed as a client/server application. A host that needs to map an address to a name or
a name to an address calls a DNS client called a resolver. The resolver accesses the closest DNS
server with a mapping request. If the server has the information, it satisfies the resolver;
otherwise, it either refers the resolver to other servers or asks other servers to provide the
information.
Although the names used by the DNS is very convenient to humans, it cannot be used for
communication through the internet. This requires mapping a name to an address known as
Name-address Resolution. The mapping of the name to the address can be done using a name
server, where a look-up table is maintained. A single name server could contain the entire DNS
database and respond to all queries about it. However, the server would be very much overloaded
and when it would fail, the entire Internet would be crippled. To avoid this problem, the entire
name space is divided into non-overlapping zones. Each zone contains some part of the tree and
also contains name servers holding the authorization information about the zone. In practice, a
zone will have a primary name server and one or more secondary name servers, which get their
information from the primary name servers. This is how smaller databases are maintained in a
distributed manner as shown in Fig. 1.1.4.
Fig. 1.1.4. DNS servers
To map a name onto an IP address, an application program calls a library procedure known as
resolver. The resolver sends a UDP packet to a local DNS server, which searches for the name in
its database. If the name is found, it returns the IP address to the resolver, which in turn informs
it to the client. After having the IP address, the client then establishes a TCP connection with a
destination node. However, if the local DNS server does not have the requested information, it
seeks the help from other servers and finally reports back. This is known as recursive resolution,
as shown in Fig. 1.1.5. The client may not ask for a recursive answer and in that case the
mapping can be done iteratively. If a server is an authority for the name, the reply is sent.
Otherwise, it sends the IP address of another server that is likely to resolve the query. The client
sends query to the second server and so on. This process is known as iterative resolution as
shown in Fig. 1.1.6.
Fig. 1.1.5 Recursive resolution Fig. 1.1.6 Iterative resolution
To avoid another search when a query is received for a name that is not in its domain, the
information is stored in the cash memory of the server. This mechanism is known as caching.
This improves the efficiency of resolution. However, the mapping is not stored in the cache
memory indefinitely. A time-to-live TTL) counter is associated with each mapping and when the
time expires, the mapping is purged.
1.3 REGISTRARS
How are new domains added to DNS? This is done through a registrar, a commercial entity
accredited by ICANN. A registrar first verifies that the requested domain name is unique and
then enters it into the DNS database. A fee is charged. Today, there are many registrars; their
names and addresses can be found at http://www.intenic.net.
To register, the organization needs to give the name of its server and the IP address of the server.
For example, a new commercial organization named wonderful with a server named ws and IP
address 200.200.200.5 needs to give the following information to one of the registrars:
Domain name: WS.wonderful.com
IP address: 200.200.200.5
2. Electronic Mail
Electronic mail is among the most widely available application services. Each user, who intends
to participate in email communication, is assigned a mailbox, where out-going and incoming
messages are buffered, allowing the transfer to take place in thebackground. The message
contains a header that specifies the sender, recipients, and subject, followed by a body that
contains message.
The first component of an electronic mail system is the user agent (UA). It provides service to the
user to make the process of sending and receiving a message easier.
Services Provided by a User Agent
A user agent is a software package (program) that composes, reads, replies to, and forwards
messages. It also handles mailboxes.
When both sender and receiver are connected to the mail server via a LAN or a WAN, we need two
VAs, two pairs of MTAs (client and server), and a pair of MAAs (client and server). This is the most
common situation today. The situation is shown in Figure 2.1.1.
Figure 2.1.1
Here Bob is also connected to his mail server by a WAN or a LAN. After the message has
arrived at Bob's mail server, Bob needs to retrieve it. Here, we need another set of client/server
agents, which we call message access agents (MAAs). Bob uses an MAA client to retrieve his
messages. The client sends a request to the MAA server, which is running all the time, and
requests the transfer of the messages.
There are two important points here. First, Bob cannot bypass the mail server and use the MTA
server directly. To use MTA server directly, Bob would need to run the MTA server all the time
because he does not know when a message will arrive. This implies that Bob must keep his
computer on all the time if he is connected to his system through a LAN. If he is connected
through a-WAN, he must keep the connection up all the time. Neither of these situations is
feasible today.
Second, note that Bob needs another pair of client/server programs: message access programs.
This is so because an MTA client/server program is a push program: the client pushes the
message to the server. Bob needs a pull program. The client needs to pull the message from the
server.
2.1 Simple Mail Transfer Protocol (SMTP)
The TCP/IP protocol that supports electronic mail on the internet is called Simple Mail Transfer
Protocol (SMTP), which supports the following:
Sending a message to one or more recipients
Sending messages that include text, voice, video, or graphics
The actual mail transfer is done through message transfer agents. To send mail, a system must
have the client MTA, and to receive mail, a system must have a server MTA. The formal
protocol that defines the MTA client and server in the Internet is called the Simple Mail Transfer
Protocol (SMTP). Two pairs of MTA client/server programs are used in the most common
situation (fourth scenario). Figure 2.1.2 shows the range of the SMTP protocol in this scenario.
Figure 2.1.2
SMTP is used two times, between the sender and the sender's mail server and between the two
mail servers. SMTP simply defines how commands and responses must be sent back and forth.
Each network is free to choose a software package for implementation.
Commands and Responses
SMTP uses commands and responses to transfer messages between an MTA client and an MTA
server (see Figure 2.1.3).
Figure 2.1.3 Commands and responses
Mail Transfer Phases
The process of transferring a mail message occurs in three phases: connection establishment,
mail transfer, and connection termination.
The first and the second stages of mail delivery use SMTP. However, SMTP is not involved in
the third stage because SMTP is a push protocol; it pushes the message from the client to the
server. In other words, the direction of the bulk: data (messages) is from the client to the server.
On the other hand, the third stage needs a pull protocol; the client must pull messages from the
server. The direction of the bulk data is from the server to the client.
The third stage uses a message access agent. Currently two message access protocols are
available: Post Office Protocol, version 3 (POP3) and Internet Mail Access Protocol, version 4
(IMAP4). Figure 2.1.4 shows the position of these two protocols in the most common situation
(fourth scenario).
Figure 2.1.4 POP3 and IMAP4
POP3
Post Office Protocol, version 3 (POP3) is simple and limited in functionality. The client POP3
software is installed on the recipient computer; the server POP3 software is installed on the mail
server. Mail access starts with the client when the user needs to download e-mail from the
mailbox on the mail server. The client opens a connection to the server on TCP port 110. It then
sends its user name and password to access the mailbox. The user can then list and retrieve the
mail messages, one by one.
POP3 has two modes: the delete mode and the keep mode. In the delete mode, the mail is deleted
from the mailbox after each retrieval. In the keep mode, the mail remains in the mailbox after
retrieval. The delete mode is normally used when the user is working at her permanent computer
and can save and organize the received mail after reading or replying. The keep mode is
normally used when the user accesses her mail away from her primary computer (e.g., a laptop).
The mail is read but kept in the system for later retrieval and organizing.
IMAP4
Another mail access protocol is Internet Mail Access Protocol, version 4 (IMAP4). IMAP4 is
similar to POP3, but it has more features; IMAP4 is more powerful and more complex.
IMAP4 provides the following extra functions:
A user can check the e-mail header prior to downloading.
A user can search the contents of the e-mail for a specific string of characters prior to
downloading.
A user can partially download e-mail. This is especially useful if bandwidth is limited and the
e-mail contains multimedia with high bandwidth requirements.
A user can create, delete, or rename mailboxes on the mail server.
A user can create a hierarchy of mailboxes in a folder for e-mail storage.
3. File Transfer Protocol (FTP)
Transferring files from one computer to another is one of the most common tasks expected from
a networking or internetworking environment. As a matter of fact, the greatest volume of data
exchange in the Internet today is due to file transfer.
File Transfer Protocol (FTP) is the standard mechanism provided by TCP/IP for copying a file
from one host to another. Although transferring files from one system to another seems simple
and straightforward.
FTP differs from other client/server applications in that it establishes two connections between
the hosts. One connection is used for data transfer, the other for control information (commands
and responses). Separation of commands and data transfer makes FTP more efficient.
FTP uses two well-known TCP ports: Port 21 is used for the control connection, and port 20 is
used for the data connection.
Figure 3.1.1 shows the basic model of FTP. The client has three components: user interface,
client control process, and the client data transfer process. The server has two components: the
server control process and the server data transfer process. The control connection is made
between the control processes. The data connection is made between the data transfer processes.
Figure 3.1.1 FTP
The control connection remains connected during the entire interactive FTP session. The data
connection is opened and then closed for each file transferred.
Communication over Control Connection
Communication is achieved through commands and responses. Each command or response is
only one short line. Each line is terminated with a two-character (carriage return and line feed)
end-of-line token.
Communication over Data Connection
The transfer of files is done through the data connection. File transfer occurs over the data
connection under the control of the commands sent over the control connection.
A file is to be copied from the server to the client. This is called retrieving a file. It is done
under the supervision of the RETR command,
A file is to be copied from the client to the server. This is called storing a file. It is done
under the supervision of the STOR command.
A list of directory or file names is to be sent from the server to the client. This is done under
the supervision of the LIST command.
The heterogeneity problem is resolved by defining three attributes of communication: file type,
data structure, and transmission mode (see Figure 3.1.2).
Figure 3.1.2 data connection
File Type: FTP can transfer one of the following file types across the data connection: an ASCII
file, EBCDIC file, or image file. The ASCII file is the default format for transferring text files.
Each character is encoded using 7-bit ASCII.
Data Structure: FTP can transfer a file across the data connection by using one of the following
interpretations about the structure of the data: file structure, record structure, and page structure.
Transmission Mode: FTP can transfer a file across the data connection by using one of the
following three transmission modes: stream mode, block mode, and compressed mode. The
stream mode is the default mode. Data are delivered from FTP to TCP as a continuous stream of
bytes.
Anonymous FTP
To use FTP, a user needs an account (user name) and a password on the remote server. Some
sites have a set of files available for public access, to enable anonymous FTP. To access these
files, a user does not need to have an account or password. Instead, the user can use anonymous
as the user name and guest as the password. User access to the system is very limited. Some sites
allow anonymous users only a subset of commands.
4. World Wide Web (WWW)
The World Wide Web (WWW) is a repository of information linked together from points all
over the world. The WWW has a unique combination of flexibility, portability, and user-friendly
features that distinguish it from other services provided by the Internet. The WWW project was
initiated by CERN (European Laboratory for Particle Physics) to create a system to handle
distributed resources necessary for scientific research.
The WWW today is a distributed client/server service, in which a client using a browser can
access a service using a server. However, the service provided is distributed over many locations
called sites, as shown in Figure 4.1.1.
Figure 4.1.1 Architecture of WWW
Each site holds one or more documents, referred to as Web pages. Each Web page can contain a
link to other pages in the same site or at other sites. The pages can be retrieved and viewed by
using browsers. The request, among other information, includes the address of the site and the
Web page, called the URL.
Client (Browser)
A variety of vendors offer commercial browsers that interpret and display a Web document, and
all use nearly the same architecture. Each browser usually consists of three parts: a controller,
client protocol, and interpreters. The controller receives input from the keyboard or the mouse
and uses the client programs to access the document. After the document has been accessed, the
controller uses one of the interpreters to display the document on the screen. The client protocol
can be one of the protocols such as FTP or HTIP. The interpreter can be HTML, Java, or
JavaScript, depending on the type of document (see Figure 4.1.2).
Figure 4.1.2 Browser
Server
The Web page is stored at the server. Each time a client request arrives, the corresponding
document is sent to the client. To improve efficiency, servers normally store requested files in a
cache in memory; memory is faster to access than disk. A server can also become more efficient
through multithreading or multiprocessing. In this case, a server can answer more than one
request at a time.
Uniform Resource Locator
A client that wants to access a Web page needs the address. To facilitate the access of documents
distributed throughout the world, HTTP uses locators. The uniform resource locator (URL) is a
standard for specifying any kind of information on the Internet. The URL defines four things:
protocol, host computer, port, and path
WEB DOCUMENTS
The documents in the WWW can be grouped into three broad categories: static, dynamic, and
active. The category is based on the time at which the contents of the document are determined.
Static Documents
Static documents are fixed-content documents that are created and stored in a server. The client
can get only a copy of the document. The contents in the server can be changed, but the user
cannot change them. When a client accesses the document, a copy of the document is sent. The
user can then use a browsing program to display the document. Hypertext Markup Language
(HTML) is a language for creating Web pages.
Dynamic Documents
A dynamic document is created by a Web server whenever a browser requests the document.
When a request arrives, the Web server runs an application program or a script that creates the
dynamic document. The server returns the output of the program or script as a response to the
browser that requested the document. Because a fresh document is created for each request, the
contents of a dynamic document can vary from one request to another. A very simple example of
a dynamic document is the retrieval of the time and date from a server. Time and date are kinds
of information that are dynamic in that they change from moment to moment. The Common
Gateway Interface (CGI) is a technology that creates and handles dynamic documents. CGI is a
set of standards that defines how a dynamic document is written, how data are input to the
program, and how the output result is used. A few technologies have been involved in creating
dynamic documents using scripts.
Among the most common are Hypertext Preprocessor (PHP), which uses the Perl language; Java
Server Pages (JSP), which uses the Java language for scripting; Active Server Pages (ASP), a
Microsoft product which uses Visual Basic language for scripting; and ColdFusion, which
embeds SQL database queries in the HTML document. Dynamic documents are sometimes
referred to as server-site dynamic documents.
Active Documents
For many applications, we need a program or a script to be run at the client site. These are called
active documents. For example, suppose we want to run a program that creates animated
graphics on the screen or a program that interacts with the user. The program definitely needs to
be run at the client site where the animation or interaction takes place. When a browser requests
an active document, the server sends a copy of the document or a script. The document is then
run at the client (browser) site. One way to create an active document is to use Java applets. Java
is a combination of a high-level programming language, a run-time environment, and a class
library that allows a programmer to write an active document (an applet) and a browser to run it.
It can also be a stand-alone program that doesn't use a browser.
5. Hypertext Transfer Protocol (HTTP)
The Hypertext Transfer Protocol (HTTP) is a protocol used mainly to access data on the World
Wide Web. HTTP functions as a combination of FTP and SMTP. It is similar to FTP because it
transfers files and uses the services of TCP. However, it is much simpler than FTP because it
uses only one TCP connection. There is no separate control connection; only data are transferred
between the client and the server. HTTP is like SMTP because the data transferred between the
client and the server look like SMTP messages. In addition, the format of the messages is
controlled by MIME-like headers. Unlike SMTP, the HTTP messages are not destined to be read
by humans; they are read and interpreted by the HTTP server and HTTP client (browser). SMTP
messages are stored and forwarded, but HTTP messages are delivered immediately. The
commands from the client to the server are embedded in a request message. The contents of the
requested file or other information are embedded in a response message. HTTP uses the services
of TCP on well-known port 80.
HTTP Transaction
Figure 5.1.1 illustrates the HTTP transaction between the client and server. Although HTTP uses
the services of TCP, HTTP itself is a stateless protocol. The client initializes the transaction by
sending a request message. The server replies by sending a response. HTTP version 1.1 specifies a
persistent connection by default.
Figure 5.1.1 HTTP transaction
6. Simple Network Management Protocol (SNMP)
Network managers use network management software that help them to locate, diagnose and rectify
problems. Simple Network Management Protocol (SMTP) provides a systematic way for managing
network resources (see fig. 6.1.1). It uses transport layer protocol for communication. It allows them
to monitor switches, routers and hosts. There are four components of the protocol:
Management of systems
Management of nodes; hosts, routers, switches
Management of Information Base; specifies data items a host or a router must keep and the
operations allowed on each (eight categories)
Management of Protocol; specifies communication between network management client
program a manager invokes and a network management server running on a host or router
Fig. 6.1.1 Functions of a network management system
To do management tasks, SNMP uses two other protocols: Structure of Management Information
(SMI) and Management Information Base (MIB). SNMP defines the format of packets
exchanged between a manager and an agent. It reads and changes the status (values) of objects
(variables) in SNMP packets.

More Related Content

PPTX
Application layer
Sagar jethi
 
PDF
Application layer protocol
Tom Hanstead
 
PDF
Internet Domains
adil raja
 
PPT
retrieving the mail
tumetr1
 
PPTX
Application layer : DNS
Kongu Engineering College, Perundurai, Erode
 
PPTX
Application layer
reshmadayma
 
PPT
Chapter 2 : Application Layer
Amin Omi
 
PPT
connectivity utility
tumetr1
 
Application layer
Sagar jethi
 
Application layer protocol
Tom Hanstead
 
Internet Domains
adil raja
 
retrieving the mail
tumetr1
 
Application layer
reshmadayma
 
Chapter 2 : Application Layer
Amin Omi
 
connectivity utility
tumetr1
 

What's hot (19)

PPTX
Application layer
SakthiVinoth78
 
PPT
Email
Siddharth Chandel
 
PPTX
Application layer
rohit nimbalkar
 
PPTX
Application layer
AnithaRaj31
 
PPT
OSCh15
Joe Christensen
 
DOCX
Bt0076, tcpip
smumbahelp
 
PPTX
CCNA 1 Routing and Switching v5.0 Chapter 10
Nil Menon
 
ODP
BP108 Admin for the Developer -- Build and Secure Your Own IBM Lotus Domino S...
NerdGirlJess
 
PPTX
Computer networks
mamanning2
 
PDF
Lecture 9 electronic_mail_representation_and_transfer
Serious_SamSoul
 
DOCX
Internet
Jack Nicole
 
PDF
Unit-4 networking basics in java
Amol Gaikwad
 
PPTX
Electronic mail
Bhojak Rajendra(rahul)
 
ODP
JMP105 - "How Stuff Works" - Domino Style!
NerdGirlJess
 
PDF
Unit 5 application layer
Kritika Purohit
 
PDF
Email - Electronic Mail
Peter R. Egli
 
PPTX
Electronic Mail
Owaßs JårÄ
 
PPT
Lecture1 intro
denizgurkan_UH
 
PPT
Jaimin chp-7 - application layer- 2011 batch
Jaimin Jani
 
Application layer
SakthiVinoth78
 
Application layer
rohit nimbalkar
 
Application layer
AnithaRaj31
 
OSCh15
Joe Christensen
 
Bt0076, tcpip
smumbahelp
 
CCNA 1 Routing and Switching v5.0 Chapter 10
Nil Menon
 
BP108 Admin for the Developer -- Build and Secure Your Own IBM Lotus Domino S...
NerdGirlJess
 
Computer networks
mamanning2
 
Lecture 9 electronic_mail_representation_and_transfer
Serious_SamSoul
 
Internet
Jack Nicole
 
Unit-4 networking basics in java
Amol Gaikwad
 
Electronic mail
Bhojak Rajendra(rahul)
 
JMP105 - "How Stuff Works" - Domino Style!
NerdGirlJess
 
Unit 5 application layer
Kritika Purohit
 
Email - Electronic Mail
Peter R. Egli
 
Electronic Mail
Owaßs JårÄ
 
Lecture1 intro
denizgurkan_UH
 
Jaimin chp-7 - application layer- 2011 batch
Jaimin Jani
 
Ad

Viewers also liked (20)

PPT
Lecture 04
Sehrish Rafiq
 
PPT
Lecture 03
Sehrish Rafiq
 
PPT
Lecture 06
Sehrish Rafiq
 
PPT
ASP.NET Session 2
Sisir Ghosh
 
PPT
Lecture 22
Sehrish Rafiq
 
PPT
Lecture 05
Sehrish Rafiq
 
PPT
Lecture 18
Sehrish Rafiq
 
PPT
Lecture 12
Sehrish Rafiq
 
PPT
Lecture 02
Sehrish Rafiq
 
PPT
Lecture 10
Sehrish Rafiq
 
PPT
Lecture 07
Sehrish Rafiq
 
PPT
Data Communications and Networking Lecture 16
Sehrish Rafiq
 
PPT
Lecture 09
Sehrish Rafiq
 
PPT
Lecture 24
Sehrish Rafiq
 
PDF
Overview of data communication and networking
Sisir Ghosh
 
PPT
Chapter 3: Data & Signals
Shafaan Khaliq Bhatti
 
PPT
Lecture 08
Sehrish Rafiq
 
PPT
Chapter 7: Transmission Media
Shafaan Khaliq Bhatti
 
PPT
Message Authentication: MAC, Hashes
Shafaan Khaliq Bhatti
 
PPSX
Data communication - Lecture-01
Sehrish Rafiq
 
Lecture 04
Sehrish Rafiq
 
Lecture 03
Sehrish Rafiq
 
Lecture 06
Sehrish Rafiq
 
ASP.NET Session 2
Sisir Ghosh
 
Lecture 22
Sehrish Rafiq
 
Lecture 05
Sehrish Rafiq
 
Lecture 18
Sehrish Rafiq
 
Lecture 12
Sehrish Rafiq
 
Lecture 02
Sehrish Rafiq
 
Lecture 10
Sehrish Rafiq
 
Lecture 07
Sehrish Rafiq
 
Data Communications and Networking Lecture 16
Sehrish Rafiq
 
Lecture 09
Sehrish Rafiq
 
Lecture 24
Sehrish Rafiq
 
Overview of data communication and networking
Sisir Ghosh
 
Chapter 3: Data & Signals
Shafaan Khaliq Bhatti
 
Lecture 08
Sehrish Rafiq
 
Chapter 7: Transmission Media
Shafaan Khaliq Bhatti
 
Message Authentication: MAC, Hashes
Shafaan Khaliq Bhatti
 
Data communication - Lecture-01
Sehrish Rafiq
 
Ad

Similar to Application layer (20)

PPT
Application layer protocols-SMTP Unit-V.ppt
jayaprasanna10
 
DOCX
telnet ftp email
swatihans
 
PPTX
Application Layer.pptx
Kongu Engineering College, Perundurai, Erode
 
PPTX
Domain Name System DNS
Akshay Tiwari
 
PPT
Chapter 25
Faisal Mehmood
 
PPT
Ch25
Wayne Jones Jnr
 
PPT
domain network services (dns)
Vikas Jagtap
 
PDF
domain name system dns dns dns dns dns dnsdns dns dns dns dns dns
DeepaThilakK
 
PPT
ch25.ppt
MannyAnacleto1
 
PPT
DNS.ppt
SANDY4772
 
PPT
DNS-DOmain name system DNS
8lekha
 
PPT
ch25.ppt
MohammedAlobaidy16
 
PPT
Ch25
Mothi R
 
DOC
How to configure dns server(2)
Amandeep Kaur
 
PPTX
3-Application Layer.pptx
SachinDUpadhye
 
PPT
25-Domain Name System.ppt
thiru17270
 
PPT
application layer protocols DNS,SNMP,web service.ppt
jayaprasanna10
 
PPT
Chapter 29 Domain Name System.ppt
webhostingguy
 
PPTX
Lec-7-dns.pptx
Syed Ejaz
 
PPTX
Dns 2
Tech_MX
 
Application layer protocols-SMTP Unit-V.ppt
jayaprasanna10
 
telnet ftp email
swatihans
 
Domain Name System DNS
Akshay Tiwari
 
Chapter 25
Faisal Mehmood
 
domain network services (dns)
Vikas Jagtap
 
domain name system dns dns dns dns dns dnsdns dns dns dns dns dns
DeepaThilakK
 
ch25.ppt
MannyAnacleto1
 
DNS.ppt
SANDY4772
 
DNS-DOmain name system DNS
8lekha
 
ch25.ppt
MohammedAlobaidy16
 
Ch25
Mothi R
 
How to configure dns server(2)
Amandeep Kaur
 
3-Application Layer.pptx
SachinDUpadhye
 
25-Domain Name System.ppt
thiru17270
 
application layer protocols DNS,SNMP,web service.ppt
jayaprasanna10
 
Chapter 29 Domain Name System.ppt
webhostingguy
 
Lec-7-dns.pptx
Syed Ejaz
 
Dns 2
Tech_MX
 

More from Sisir Ghosh (18)

PPT
ASP.NET Session 3
Sisir Ghosh
 
PPT
ASP.NET Session 4
Sisir Ghosh
 
PPT
ASP.NET Session 5
Sisir Ghosh
 
PPT
ASP.NET Session 6
Sisir Ghosh
 
PPT
ASP.NET Session 7
Sisir Ghosh
 
PPT
ASP.NET Session 8
Sisir Ghosh
 
PPT
ASP.NET Session 9
Sisir Ghosh
 
PPT
ASP.NET Session 10
Sisir Ghosh
 
PPT
ASP.NET Session 11 12
Sisir Ghosh
 
PPT
ASP.NET Session 13 14
Sisir Ghosh
 
PPT
ASP.NET Session 16
Sisir Ghosh
 
PPT
ASP.NET System design 2
Sisir Ghosh
 
PPT
ASP.NET Session 1
Sisir Ghosh
 
PDF
Transport layer
Sisir Ghosh
 
PDF
Routing
Sisir Ghosh
 
PDF
Network security
Sisir Ghosh
 
PDF
Module ii physical layer
Sisir Ghosh
 
PDF
Error detection and correction
Sisir Ghosh
 
ASP.NET Session 3
Sisir Ghosh
 
ASP.NET Session 4
Sisir Ghosh
 
ASP.NET Session 5
Sisir Ghosh
 
ASP.NET Session 6
Sisir Ghosh
 
ASP.NET Session 7
Sisir Ghosh
 
ASP.NET Session 8
Sisir Ghosh
 
ASP.NET Session 9
Sisir Ghosh
 
ASP.NET Session 10
Sisir Ghosh
 
ASP.NET Session 11 12
Sisir Ghosh
 
ASP.NET Session 13 14
Sisir Ghosh
 
ASP.NET Session 16
Sisir Ghosh
 
ASP.NET System design 2
Sisir Ghosh
 
ASP.NET Session 1
Sisir Ghosh
 
Transport layer
Sisir Ghosh
 
Routing
Sisir Ghosh
 
Network security
Sisir Ghosh
 
Module ii physical layer
Sisir Ghosh
 
Error detection and correction
Sisir Ghosh
 

Recently uploaded (20)

PDF
Biological Classification Class 11th NCERT CBSE NEET.pdf
NehaRohtagi1
 
PPTX
Dakar Framework Education For All- 2000(Act)
santoshmohalik1
 
PPTX
INTESTINALPARASITES OR WORM INFESTATIONS.pptx
PRADEEP ABOTHU
 
PPTX
HISTORY COLLECTION FOR PSYCHIATRIC PATIENTS.pptx
PoojaSen20
 
PPTX
Python-Application-in-Drug-Design by R D Jawarkar.pptx
Rahul Jawarkar
 
PPTX
A Smarter Way to Think About Choosing a College
Cyndy McDonald
 
PPTX
Care of patients with elImination deviation.pptx
AneetaSharma15
 
PPTX
Command Palatte in Odoo 18.1 Spreadsheet - Odoo Slides
Celine George
 
PDF
Module 2: Public Health History [Tutorial Slides]
JonathanHallett4
 
PPTX
PROTIEN ENERGY MALNUTRITION: NURSING MANAGEMENT.pptx
PRADEEP ABOTHU
 
PPTX
Measures_of_location_-_Averages_and__percentiles_by_DR SURYA K.pptx
Surya Ganesh
 
PPTX
CARE OF UNCONSCIOUS PATIENTS .pptx
AneetaSharma15
 
PPTX
How to Track Skills & Contracts Using Odoo 18 Employee
Celine George
 
PPTX
CDH. pptx
AneetaSharma15
 
PPTX
Introduction to pediatric nursing in 5th Sem..pptx
AneetaSharma15
 
PPTX
How to Close Subscription in Odoo 18 - Odoo Slides
Celine George
 
PPTX
Basics and rules of probability with real-life uses
ravatkaran694
 
PDF
Review of Related Literature & Studies.pdf
Thelma Villaflores
 
DOCX
SAROCES Action-Plan FOR ARAL PROGRAM IN DEPED
Levenmartlacuna1
 
DOCX
Modul Ajar Deep Learning Bahasa Inggris Kelas 11 Terbaru 2025
wahyurestu63
 
Biological Classification Class 11th NCERT CBSE NEET.pdf
NehaRohtagi1
 
Dakar Framework Education For All- 2000(Act)
santoshmohalik1
 
INTESTINALPARASITES OR WORM INFESTATIONS.pptx
PRADEEP ABOTHU
 
HISTORY COLLECTION FOR PSYCHIATRIC PATIENTS.pptx
PoojaSen20
 
Python-Application-in-Drug-Design by R D Jawarkar.pptx
Rahul Jawarkar
 
A Smarter Way to Think About Choosing a College
Cyndy McDonald
 
Care of patients with elImination deviation.pptx
AneetaSharma15
 
Command Palatte in Odoo 18.1 Spreadsheet - Odoo Slides
Celine George
 
Module 2: Public Health History [Tutorial Slides]
JonathanHallett4
 
PROTIEN ENERGY MALNUTRITION: NURSING MANAGEMENT.pptx
PRADEEP ABOTHU
 
Measures_of_location_-_Averages_and__percentiles_by_DR SURYA K.pptx
Surya Ganesh
 
CARE OF UNCONSCIOUS PATIENTS .pptx
AneetaSharma15
 
How to Track Skills & Contracts Using Odoo 18 Employee
Celine George
 
CDH. pptx
AneetaSharma15
 
Introduction to pediatric nursing in 5th Sem..pptx
AneetaSharma15
 
How to Close Subscription in Odoo 18 - Odoo Slides
Celine George
 
Basics and rules of probability with real-life uses
ravatkaran694
 
Review of Related Literature & Studies.pdf
Thelma Villaflores
 
SAROCES Action-Plan FOR ARAL PROGRAM IN DEPED
Levenmartlacuna1
 
Modul Ajar Deep Learning Bahasa Inggris Kelas 11 Terbaru 2025
wahyurestu63
 

Application layer

  • 1. Application Layer There are several applications in the application layer of the Internet model that follow the client/server paradigm. The client/server programs can be divided into two categories: those that can be directly used by the user, such as e-mail, and those that support other application programs. The Domain Name System (DNS) is a supporting program that is used by other programs such as e-mail. 1. Domain Name System Although IP addresses are convenient and compact way for identifying machines and are fundamental in TCP/IP, it is unsuitable for human user. Meaningful high-level symbolic names are more convenient for humans. Application software permits users to use symbolic names, but the underlying network protocols require addresses. This requires the use of names with proper syntax with efficient translation mechanism. A concept known as Domain Name System (DNS) was invented for this purpose. DNS is a naming scheme that uses a hierarchical, domain-based naming scheme on a distributed database system. The basic approach is to divide the internet into several hundred top-level domains, which come in two flavors - generic and countries. Nearly all organizations in USA, are under generic name, where each domain is partitioned into subdomains, and these are further partitioned, and so on, as represented in the form of a tree as shown in Fig. 1.1.1. The leaves of the tree represent domains that contain no subdomains, represent single hosts, or a company or contain a thousand of hosts. Naming follows organizational boundaries, not physical networks. The hierarchical naming system, which is used by DNS has many advantages over flat addressing scheme used earlier. Key features of the two approaches are highlighted below: Fig. 1.1.1 Partial Domain Name Space Flat namespace Each machine is given a unique (by NIC) name Special file is used to keep name-address mapping All hosts must know the current mapping for all other hosts with which they want to communicate Large mapping file, if communication with a large number of machines is required Not a good scheme for communicating to arbitrary machines over large networks such as Internet
  • 2. Hierarchical Namespace Break complete namespace into domains Domains broken up recursively into one or more subdomains, each of which is basically a domain again Further division to create any level of hierarchy – Namespace Tree Delegate task of name allocation/resolution of parts of the tree to distributed name servers 1.1 Domain name space To have a hierarchical name space, a domain name space was designed. In this design the names are defined in an inverted-tree structure with the root at the top. The tree can have only 128 levels: level 0 (root) to level 127. Label Each node in the tree has a label, which is a string with a maximum of 63 characters. The root label is a null string (empty string). DNS requires that children of a node (nodes that branch from the same node) have different labels, which guarantees the uniqueness of the domain names. Domain Name Each node in the tree has a domain name. A full domain name is a sequence of labels separated by dots (.). The domain names are always read from the node up to the root. The last label is the label of the root (null). Figure 1.1.2 shows some domain names. Figure 1.1.2 Domain names and labels Fully Qualified Domain Name If a label is terminated by a null string, it is called a fully qualified domain name (FQDN). An FQDN is a domain name that contains the full name of a host. It contains all labels, from the most specific to the most general, that uniquely define the name of the host. For example, the domain name challenger.ate.tbda.edu. Partially Qualified Domain Name If a label is not terminated by a null string, it is called a partially qualified domain name (PQDN). A PQDN starts from a node, but it does not reach the root. It is used when the name to be resolved belongs to the same site as the client. Here the resolver can supply the missing part, called the suffix, to create an FQDN. For example, if a user at the jhda.edu. site wants to get the IP address of the challenger computer, he or she can define the partial name challenger The DNS client adds the suffix atc.jhda.edu., before passing the address to the DNS server.
  • 3. Domain A domain is a subtree of the domain name space. The name of the domain is the domain name of the node at the top of the subtree. Figure 1.1.3 shows some domains. Note that a domain may itself be divided into domains (or subdomains as they are sometimes called). Figure 1.1.3 Domains 1.2 Name-address Resolution DNS is designed as a client/server application. A host that needs to map an address to a name or a name to an address calls a DNS client called a resolver. The resolver accesses the closest DNS server with a mapping request. If the server has the information, it satisfies the resolver; otherwise, it either refers the resolver to other servers or asks other servers to provide the information. Although the names used by the DNS is very convenient to humans, it cannot be used for communication through the internet. This requires mapping a name to an address known as Name-address Resolution. The mapping of the name to the address can be done using a name server, where a look-up table is maintained. A single name server could contain the entire DNS database and respond to all queries about it. However, the server would be very much overloaded and when it would fail, the entire Internet would be crippled. To avoid this problem, the entire name space is divided into non-overlapping zones. Each zone contains some part of the tree and also contains name servers holding the authorization information about the zone. In practice, a zone will have a primary name server and one or more secondary name servers, which get their information from the primary name servers. This is how smaller databases are maintained in a distributed manner as shown in Fig. 1.1.4. Fig. 1.1.4. DNS servers
  • 4. To map a name onto an IP address, an application program calls a library procedure known as resolver. The resolver sends a UDP packet to a local DNS server, which searches for the name in its database. If the name is found, it returns the IP address to the resolver, which in turn informs it to the client. After having the IP address, the client then establishes a TCP connection with a destination node. However, if the local DNS server does not have the requested information, it seeks the help from other servers and finally reports back. This is known as recursive resolution, as shown in Fig. 1.1.5. The client may not ask for a recursive answer and in that case the mapping can be done iteratively. If a server is an authority for the name, the reply is sent. Otherwise, it sends the IP address of another server that is likely to resolve the query. The client sends query to the second server and so on. This process is known as iterative resolution as shown in Fig. 1.1.6. Fig. 1.1.5 Recursive resolution Fig. 1.1.6 Iterative resolution To avoid another search when a query is received for a name that is not in its domain, the information is stored in the cash memory of the server. This mechanism is known as caching. This improves the efficiency of resolution. However, the mapping is not stored in the cache memory indefinitely. A time-to-live TTL) counter is associated with each mapping and when the time expires, the mapping is purged. 1.3 REGISTRARS How are new domains added to DNS? This is done through a registrar, a commercial entity accredited by ICANN. A registrar first verifies that the requested domain name is unique and then enters it into the DNS database. A fee is charged. Today, there are many registrars; their names and addresses can be found at http://www.intenic.net. To register, the organization needs to give the name of its server and the IP address of the server. For example, a new commercial organization named wonderful with a server named ws and IP address 200.200.200.5 needs to give the following information to one of the registrars: Domain name: WS.wonderful.com IP address: 200.200.200.5
  • 5. 2. Electronic Mail Electronic mail is among the most widely available application services. Each user, who intends to participate in email communication, is assigned a mailbox, where out-going and incoming messages are buffered, allowing the transfer to take place in thebackground. The message contains a header that specifies the sender, recipients, and subject, followed by a body that contains message. The first component of an electronic mail system is the user agent (UA). It provides service to the user to make the process of sending and receiving a message easier. Services Provided by a User Agent A user agent is a software package (program) that composes, reads, replies to, and forwards messages. It also handles mailboxes. When both sender and receiver are connected to the mail server via a LAN or a WAN, we need two VAs, two pairs of MTAs (client and server), and a pair of MAAs (client and server). This is the most common situation today. The situation is shown in Figure 2.1.1. Figure 2.1.1 Here Bob is also connected to his mail server by a WAN or a LAN. After the message has arrived at Bob's mail server, Bob needs to retrieve it. Here, we need another set of client/server agents, which we call message access agents (MAAs). Bob uses an MAA client to retrieve his messages. The client sends a request to the MAA server, which is running all the time, and requests the transfer of the messages. There are two important points here. First, Bob cannot bypass the mail server and use the MTA server directly. To use MTA server directly, Bob would need to run the MTA server all the time because he does not know when a message will arrive. This implies that Bob must keep his computer on all the time if he is connected to his system through a LAN. If he is connected through a-WAN, he must keep the connection up all the time. Neither of these situations is feasible today. Second, note that Bob needs another pair of client/server programs: message access programs. This is so because an MTA client/server program is a push program: the client pushes the message to the server. Bob needs a pull program. The client needs to pull the message from the server.
  • 6. 2.1 Simple Mail Transfer Protocol (SMTP) The TCP/IP protocol that supports electronic mail on the internet is called Simple Mail Transfer Protocol (SMTP), which supports the following: Sending a message to one or more recipients Sending messages that include text, voice, video, or graphics The actual mail transfer is done through message transfer agents. To send mail, a system must have the client MTA, and to receive mail, a system must have a server MTA. The formal protocol that defines the MTA client and server in the Internet is called the Simple Mail Transfer Protocol (SMTP). Two pairs of MTA client/server programs are used in the most common situation (fourth scenario). Figure 2.1.2 shows the range of the SMTP protocol in this scenario. Figure 2.1.2 SMTP is used two times, between the sender and the sender's mail server and between the two mail servers. SMTP simply defines how commands and responses must be sent back and forth. Each network is free to choose a software package for implementation. Commands and Responses SMTP uses commands and responses to transfer messages between an MTA client and an MTA server (see Figure 2.1.3). Figure 2.1.3 Commands and responses Mail Transfer Phases The process of transferring a mail message occurs in three phases: connection establishment, mail transfer, and connection termination. The first and the second stages of mail delivery use SMTP. However, SMTP is not involved in the third stage because SMTP is a push protocol; it pushes the message from the client to the server. In other words, the direction of the bulk: data (messages) is from the client to the server. On the other hand, the third stage needs a pull protocol; the client must pull messages from the server. The direction of the bulk data is from the server to the client. The third stage uses a message access agent. Currently two message access protocols are available: Post Office Protocol, version 3 (POP3) and Internet Mail Access Protocol, version 4 (IMAP4). Figure 2.1.4 shows the position of these two protocols in the most common situation (fourth scenario).
  • 7. Figure 2.1.4 POP3 and IMAP4 POP3 Post Office Protocol, version 3 (POP3) is simple and limited in functionality. The client POP3 software is installed on the recipient computer; the server POP3 software is installed on the mail server. Mail access starts with the client when the user needs to download e-mail from the mailbox on the mail server. The client opens a connection to the server on TCP port 110. It then sends its user name and password to access the mailbox. The user can then list and retrieve the mail messages, one by one. POP3 has two modes: the delete mode and the keep mode. In the delete mode, the mail is deleted from the mailbox after each retrieval. In the keep mode, the mail remains in the mailbox after retrieval. The delete mode is normally used when the user is working at her permanent computer and can save and organize the received mail after reading or replying. The keep mode is normally used when the user accesses her mail away from her primary computer (e.g., a laptop). The mail is read but kept in the system for later retrieval and organizing. IMAP4 Another mail access protocol is Internet Mail Access Protocol, version 4 (IMAP4). IMAP4 is similar to POP3, but it has more features; IMAP4 is more powerful and more complex. IMAP4 provides the following extra functions: A user can check the e-mail header prior to downloading. A user can search the contents of the e-mail for a specific string of characters prior to downloading. A user can partially download e-mail. This is especially useful if bandwidth is limited and the e-mail contains multimedia with high bandwidth requirements. A user can create, delete, or rename mailboxes on the mail server. A user can create a hierarchy of mailboxes in a folder for e-mail storage. 3. File Transfer Protocol (FTP) Transferring files from one computer to another is one of the most common tasks expected from a networking or internetworking environment. As a matter of fact, the greatest volume of data exchange in the Internet today is due to file transfer. File Transfer Protocol (FTP) is the standard mechanism provided by TCP/IP for copying a file from one host to another. Although transferring files from one system to another seems simple and straightforward. FTP differs from other client/server applications in that it establishes two connections between the hosts. One connection is used for data transfer, the other for control information (commands and responses). Separation of commands and data transfer makes FTP more efficient. FTP uses two well-known TCP ports: Port 21 is used for the control connection, and port 20 is used for the data connection.
  • 8. Figure 3.1.1 shows the basic model of FTP. The client has three components: user interface, client control process, and the client data transfer process. The server has two components: the server control process and the server data transfer process. The control connection is made between the control processes. The data connection is made between the data transfer processes. Figure 3.1.1 FTP The control connection remains connected during the entire interactive FTP session. The data connection is opened and then closed for each file transferred. Communication over Control Connection Communication is achieved through commands and responses. Each command or response is only one short line. Each line is terminated with a two-character (carriage return and line feed) end-of-line token. Communication over Data Connection The transfer of files is done through the data connection. File transfer occurs over the data connection under the control of the commands sent over the control connection. A file is to be copied from the server to the client. This is called retrieving a file. It is done under the supervision of the RETR command, A file is to be copied from the client to the server. This is called storing a file. It is done under the supervision of the STOR command. A list of directory or file names is to be sent from the server to the client. This is done under the supervision of the LIST command. The heterogeneity problem is resolved by defining three attributes of communication: file type, data structure, and transmission mode (see Figure 3.1.2). Figure 3.1.2 data connection File Type: FTP can transfer one of the following file types across the data connection: an ASCII file, EBCDIC file, or image file. The ASCII file is the default format for transferring text files. Each character is encoded using 7-bit ASCII.
  • 9. Data Structure: FTP can transfer a file across the data connection by using one of the following interpretations about the structure of the data: file structure, record structure, and page structure. Transmission Mode: FTP can transfer a file across the data connection by using one of the following three transmission modes: stream mode, block mode, and compressed mode. The stream mode is the default mode. Data are delivered from FTP to TCP as a continuous stream of bytes. Anonymous FTP To use FTP, a user needs an account (user name) and a password on the remote server. Some sites have a set of files available for public access, to enable anonymous FTP. To access these files, a user does not need to have an account or password. Instead, the user can use anonymous as the user name and guest as the password. User access to the system is very limited. Some sites allow anonymous users only a subset of commands. 4. World Wide Web (WWW) The World Wide Web (WWW) is a repository of information linked together from points all over the world. The WWW has a unique combination of flexibility, portability, and user-friendly features that distinguish it from other services provided by the Internet. The WWW project was initiated by CERN (European Laboratory for Particle Physics) to create a system to handle distributed resources necessary for scientific research. The WWW today is a distributed client/server service, in which a client using a browser can access a service using a server. However, the service provided is distributed over many locations called sites, as shown in Figure 4.1.1. Figure 4.1.1 Architecture of WWW Each site holds one or more documents, referred to as Web pages. Each Web page can contain a link to other pages in the same site or at other sites. The pages can be retrieved and viewed by using browsers. The request, among other information, includes the address of the site and the Web page, called the URL. Client (Browser) A variety of vendors offer commercial browsers that interpret and display a Web document, and all use nearly the same architecture. Each browser usually consists of three parts: a controller, client protocol, and interpreters. The controller receives input from the keyboard or the mouse and uses the client programs to access the document. After the document has been accessed, the controller uses one of the interpreters to display the document on the screen. The client protocol can be one of the protocols such as FTP or HTIP. The interpreter can be HTML, Java, or JavaScript, depending on the type of document (see Figure 4.1.2).
  • 10. Figure 4.1.2 Browser Server The Web page is stored at the server. Each time a client request arrives, the corresponding document is sent to the client. To improve efficiency, servers normally store requested files in a cache in memory; memory is faster to access than disk. A server can also become more efficient through multithreading or multiprocessing. In this case, a server can answer more than one request at a time. Uniform Resource Locator A client that wants to access a Web page needs the address. To facilitate the access of documents distributed throughout the world, HTTP uses locators. The uniform resource locator (URL) is a standard for specifying any kind of information on the Internet. The URL defines four things: protocol, host computer, port, and path WEB DOCUMENTS The documents in the WWW can be grouped into three broad categories: static, dynamic, and active. The category is based on the time at which the contents of the document are determined. Static Documents Static documents are fixed-content documents that are created and stored in a server. The client can get only a copy of the document. The contents in the server can be changed, but the user cannot change them. When a client accesses the document, a copy of the document is sent. The user can then use a browsing program to display the document. Hypertext Markup Language (HTML) is a language for creating Web pages. Dynamic Documents A dynamic document is created by a Web server whenever a browser requests the document. When a request arrives, the Web server runs an application program or a script that creates the dynamic document. The server returns the output of the program or script as a response to the browser that requested the document. Because a fresh document is created for each request, the contents of a dynamic document can vary from one request to another. A very simple example of a dynamic document is the retrieval of the time and date from a server. Time and date are kinds of information that are dynamic in that they change from moment to moment. The Common Gateway Interface (CGI) is a technology that creates and handles dynamic documents. CGI is a
  • 11. set of standards that defines how a dynamic document is written, how data are input to the program, and how the output result is used. A few technologies have been involved in creating dynamic documents using scripts. Among the most common are Hypertext Preprocessor (PHP), which uses the Perl language; Java Server Pages (JSP), which uses the Java language for scripting; Active Server Pages (ASP), a Microsoft product which uses Visual Basic language for scripting; and ColdFusion, which embeds SQL database queries in the HTML document. Dynamic documents are sometimes referred to as server-site dynamic documents. Active Documents For many applications, we need a program or a script to be run at the client site. These are called active documents. For example, suppose we want to run a program that creates animated graphics on the screen or a program that interacts with the user. The program definitely needs to be run at the client site where the animation or interaction takes place. When a browser requests an active document, the server sends a copy of the document or a script. The document is then run at the client (browser) site. One way to create an active document is to use Java applets. Java is a combination of a high-level programming language, a run-time environment, and a class library that allows a programmer to write an active document (an applet) and a browser to run it. It can also be a stand-alone program that doesn't use a browser. 5. Hypertext Transfer Protocol (HTTP) The Hypertext Transfer Protocol (HTTP) is a protocol used mainly to access data on the World Wide Web. HTTP functions as a combination of FTP and SMTP. It is similar to FTP because it transfers files and uses the services of TCP. However, it is much simpler than FTP because it uses only one TCP connection. There is no separate control connection; only data are transferred between the client and the server. HTTP is like SMTP because the data transferred between the client and the server look like SMTP messages. In addition, the format of the messages is controlled by MIME-like headers. Unlike SMTP, the HTTP messages are not destined to be read by humans; they are read and interpreted by the HTTP server and HTTP client (browser). SMTP messages are stored and forwarded, but HTTP messages are delivered immediately. The commands from the client to the server are embedded in a request message. The contents of the requested file or other information are embedded in a response message. HTTP uses the services of TCP on well-known port 80. HTTP Transaction Figure 5.1.1 illustrates the HTTP transaction between the client and server. Although HTTP uses the services of TCP, HTTP itself is a stateless protocol. The client initializes the transaction by sending a request message. The server replies by sending a response. HTTP version 1.1 specifies a persistent connection by default. Figure 5.1.1 HTTP transaction
  • 12. 6. Simple Network Management Protocol (SNMP) Network managers use network management software that help them to locate, diagnose and rectify problems. Simple Network Management Protocol (SMTP) provides a systematic way for managing network resources (see fig. 6.1.1). It uses transport layer protocol for communication. It allows them to monitor switches, routers and hosts. There are four components of the protocol: Management of systems Management of nodes; hosts, routers, switches Management of Information Base; specifies data items a host or a router must keep and the operations allowed on each (eight categories) Management of Protocol; specifies communication between network management client program a manager invokes and a network management server running on a host or router Fig. 6.1.1 Functions of a network management system To do management tasks, SNMP uses two other protocols: Structure of Management Information (SMI) and Management Information Base (MIB). SNMP defines the format of packets exchanged between a manager and an agent. It reads and changes the status (values) of objects (variables) in SNMP packets.