Professional Documents
Culture Documents
NT CH5 Mca1
NT CH5 Mca1
TECHNOLOGY
CH.5
APPLICATION LAYER
PROTOCOLS
An application layer protocol defines how application processes
(clients and servers), running on different end systems, pass messages
to each other. In particular, an application layer protocol defines: The
types of messages, e.g., request messages and response messages.
The Application layer includes the following functions:
Identifying communication partners: The application layer identifies
the availability of communication partners for an application with data
to transmit.
Determining resource availability: The application layer determines
whether sufficient network resources are available for the requested
communication.
Synchronizing communication: All the communications occur between
the applications requires cooperation which is managed by an
application layer.
Services of Application Layers
Network Virtual terminal: An application layer allows a user to log on to a remote
host. To do so, the application creates a software emulation of a terminal at the
remote host. The user's computer talks to the software terminal, which in turn, talks
to the host. The remote host thinks that it is communicating with one of its own
terminals, so it allows the user to log on.
File Transfer, Access, and Management (FTAM): An application allows a user to access
files in a remote computer, to retrieve files from a computer and to manage files in a
remote computer. FTAM defines a hierarchical virtual file in terms of file structure, file
attributes and the kind of operations performed on the files and their attributes.
.Addressing: To obtain communication between client and server, there is a need for
addressing. When a client made a request to the server, the request contains the
server address and its own address. The server response to the client request, the
request contains the destination address, i.e., client address. To achieve this kind of
addressing, DNS is used.
Mail Services: An application layer provides Email forwarding and storage.
Directory Services: An application contains a distributed database that provides access
for global information about various objects and services.
Authentication: It authenticates the sender or receiver's message or both.
Dynamic Host Configuration Protocol
•Dynamic Host Configuration Protocol (DHCP) is a network
management protocol used to dynamically assign an IP
address to any device, or node, on a network so they can
communicate using IP (Internet Protocol).
•DHCP automates and centrally manages these
configurations. There is no need to manually assign IP
addresses to new devices. Therefore, there is no
requirement for any user configuration to connect to a
DHCP based network.
•DHCP can be implemented on local networks as well as
large enterprise networks.
•DHCP is the default protocol used by the most routers and
networking equipment. DHCP is also called RFC (Request for
comments) 2131.
DHCP does the following:
•DHCP manages the provision of all the nodes or devices
added or dropped from the network.
•DHCP maintains the unique IP address of the host using
a DHCP server.
•It sends a request to the DHCP server whenever a
client/node/device, which is configured to work with
DHCP, connects to a network.
•The server acknowledges by providing an IP address to
the client/node/device.
•DHCP is also used to configure the proper subnet mask,
default gateway and DNS server information on the
node or device.
There are many versions of DCHP are available for use in
IPV4 (Internet Protocol Version 4) and IPV6 (Internet
Protocol Version 6).
How DHCP works
•DHCP runs at the application layer of the TCP/IP protocol
stack to dynamically assign IP addresses to DHCP
clients/nodes and to allocate TCP/IP configuration
information to the DHCP clients.
• Information includes subnet mask information, default
gateway, IP addresses and domain name system
addresses.
•DHCP is based on client-server protocol in which servers
manage a pool of unique IP addresses, as well as
information about client configuration parameters, and
assign addresses out of those address pools.
The DHCP lease process works as follows:
•First of all, a client (network device) must be connected
to the internet.
•DHCP clients request an IP address. Typically, client
broadcasts a query for this information.
•DHCP server responds to the client request by providing
IP server address and other configuration information.
This configuration information also includes time period,
called a lease, for which the allocation is valid.
•When refreshing an assignment, a DHCP clients request
the same parameters, but the DHCP server may assign a
new IP address. This is based on the policies set by the
administrator.
Components of DHCP
DHCP Server: DHCP server is a networked device running the DCHP service that
holds IP addresses and related configuration information. This is typically a server
or a router but could be anything that acts as a host.
DHCP client: DHCP client is the endpoint that receives configuration information
from a DHCP server. This can be any device like computer, laptop, endpoint or
anything else that requires connectivity to the network. Most of the devices are
configured to receive DHCP information by default.
IP address pool: IP address pool is the range of addresses that are available to
DHCP clients. IP addresses are typically handed out sequentially from lowest to the
highest.
Subnet: Subnet is the partitioned segments of the IP networks. Subnet is used to
keep networks manageable.
Lease: Lease is the length of time for which a DHCP client holds the IP address
information. When a lease expires, the client has to renew it.
DHCP relay: A host or router that listens for client messages being broadcast on
that network and then forwards them to a configured server. The server then
sends responses back to the relay agent that passes them along to the client.
DHCP relay can be used to centralize DHCP servers instead of having a server on
each subnet.
Benefits of DHCP
There are following benefits of DHCP:
Centralized administration of IP configuration: DHCP IP configuration
information can be stored in a single location and enables that administrator to
centrally manage all IP address configuration information.
Dynamic host configuration: DHCP automates the host configuration process
and eliminates the need to manually configure individual host. When TCP/IP
(Transmission control protocol/Internet protocol) is first deployed or when IP
infrastructure changes are required.
Seamless IP host configuration: The use of DHCP ensures that DHCP clients get
accurate and timely IP configuration IP configuration parameter such as IP
address, subnet mask, default gateway, IP address of DND server and so on
without user intervention.
Flexibility and scalability: Using DHCP gives the administrator increased
flexibility, allowing the administrator to move easily change IP configuration
when the infrastructure changes.
DNS
The Domain Network System (DNS) protocol helps Internet users and network
devices discover websites using human-readable hostnames, instead of numeric IP
addresses.
The DNS process works as follows:
•A browser, application or device called the DNS client, issues a DNS request or
DNS address lookup, providing a hostname such as “example.com”.
•The request is received by a DNS resolver, which is responsible for finding the
correct IP address for that hostname.
•The DNS resolver looks for a DNS name server that holds the IP address for the
hostname in the DNS request.
•The resolver starts from the Internet’s root DNS server, moving down the
hierarchy to Top Level Domain (TLD) DNS servers (“.com” in this case), down to the
name server responsible for the specific domain “example.com”.
•When the resolver reaches the authoritative DNS name server for
“example.com”, it receives the IP address and other relevant details, and returns it
to the DNS client. The DNS request is now resolved.
•The DNS client device can connect to the server directly using the correct IP
address.
Structure of DNS
The Domain Namespace
•The DNS namespace governs public hostnames used on the
Internet. The namespace is a tree structure, with each node in the
tree having a textual label and zero or more DNS resource records
(RR) describing the domain.
•The domain name consists of the label, together with the label of
its parent nodes, separated by a dot (as in “example.com”). The
domain namespace is divided into zones, and each zone is
delegated to a specific legal entity for administration and
management.
Domain Name Syntax and Format
Client
The HTTP client sends a request to the server in the form of a request method,
URI, and protocol version, followed by a MIME-like message containing request
modifiers, client information, and possible body content over a TCP/IP
connection.
Server
The HTTP server responds with a status line, including the message's protocol
version and a success or error code, followed by a MIME-like message
containing server information, entity meta information, and possible entity-body
content.
Header Fields
HTTP header fields provide required information about the request or response, or
about the object sent in the message body. There are four types of HTTP message
headers:
General-header: These header fields have general applicability for both request and
response messages.
Request-header: These header fields have applicability only for request messages.
Response-header: These header fields have applicability only for response messages.
Entity-header: These header fields define meta information about the entity-body or, if
no body is present, about the resource identified by the request.
Uniform Resource Locator (URL)
A client that wants to access the document in an internet needs an address and to facilitate
the access of documents, the HTTP uses the concept of Uniform Resource Locator (URL).
The Uniform Resource Locator (URL) is a standard way of specifying any kind of information
on the internet.
The URL defines four parts: method, host computer, port, and path.
Method: The method is the protocol used to retrieve the document from a server. For
example, HTTP.
Host: The host is the computer where the information is stored, and the computer is given an
alias name. Web pages are mainly stored in the computers and the computers are given an
alias name that begins with the characters "www". This field is not mandatory.
Port: The URL can also contain the port number of the server, but it's an optional field. If the
port number is included, then it must come between the host and path and it should be
separated from the host by a colon.
Path: Path is the pathname of the file where the information is stored. The path itself contain
slashes that separate the directories from the subdirectories and files.
HTTP - Methods
E-mail Protocols are set of rules that help the client to properly transmit the information to or
from the mail server. Here in this tutorial, we will discuss various protocols such as SMTP,
POP, and IMAP.
SMTP stands for Simple Mail Transfer Protocol. It was first proposed in 1982. It is a
standard protocol used for sending e-mail efficiently and reliably over the internet.
Key Points:
SMTP is application level protocol.
SMTP is connection oriented protocol.
SMTP is text based protocol.
It handles exchange of messages between e-mail servers over TCP/IP network.
Apart from transferring e-mail, SMPT also provides notification regarding incoming
mail.
When you send e-mail, your e-mail client sends it to your e-mail server which further
contacts the recipient mail server using SMTP client.
These SMTP commands specify the sender’s and receiver’s e-mail address, along with
the message to be send.
The exchange of commands between servers is carried out without intervention of any
user.
In case, message cannot be delivered, an error report is sent to the sender which
makes SMTP a reliable protocol.
The default port for SMTP are:
Port 25 – This is the default non-encrypted port.
Port 465/ 587 – This is default port for secure connections.
IMAP
IMAP stands for Internet Message Access Protocol. It was first proposed in 1986.
There exist five versions of IMAP as follows:
Original IMAP
IMAP2
IMAP3
IMAP2bis
IMAP4
Key Points:
IMAP allows the client program to manipulate the e-mail message on the server
without downloading them on the local computer.
The e-mail is hold and maintained by the remote server.
It enables us to take any action such as downloading, delete the mail without reading
the mail.It enables us to create, manipulate and delete remote message folders called
mail boxes.
IMAP enables the users to search the e-mails.
It allows concurrent access to multiple mailboxes on multiple mail servers.
Although transferring files from one system to another is very simple and
straightforward, but sometimes it can cause problems. For example, two
systems may have different file conventions. Two systems may have different
ways to represent text and data. Two systems may have different directory
structures. FTP protocol overcomes these problems by establishing two
connections between hosts. One connection is used for data transfer, and
another connection is used for the control connection.
Mechanism of FTP
Data Connection: The Data Connection uses very complex rules as data types
may vary. The data connection is made between data transfer processes. The
data connection opens when a command comes for transferring the files and
closes when the file is transferred.
For sending the actual file, FTP makes use of data connection. A data
connection is initiated on port number 20.
FTP sends the control information out-of-band as it uses a separate control
connection.
TELNET
•TELNET stands for TErminaL NETwork.
•It is a type of protocol that enables one computer to connect to local
computer.
•It is a used as a standard TCP/IP protocol for virtual terminal service which is
given by ISO.
•It is a network protocol used on the Internet or local area networks to provide
a bidirectional interactive communications facility.
•Typically, telnet provides access to a command-line interface on a remote host
via a virtual terminal connection which consists of an 8-bit byte oriented data
connection over the Transmission Control Protocol (TCP).
•User data is interspersed in-band with TELNET control information.
•Computer which starts connection known as the local computer. Computer
which is being connected to i.e. which accepts the connection known
as remote computer.
•When the connection is established between local and remote computer.
During telnet operation whatever that is performing on the remote computer
will be displayed by local computer.
• Telnet operates on client/server principle. Local computer uses telnet client
program and the remote computers uses telnet server program.
•The network terminal protocol (TELNET) allows a user to log in on any other computer
on the network. We can start a remote session by specifying a computer to connect to.
From that time until we finish the session, anything we type is sent to the other
computer.
•The Telnet program runs on the computer and connects your PC to a server on the
network. We can then enter commands through the Telnet program and they will be
executed as if we were entering them directly on the server console. This enables we
to control the server and communicate with other servers on the network. To start a
Telnet session, we must log in to a server by entering a valid username and password.
Telnet is a common way to remotely control Web servers.
•Telnet was developed in 1969 to aid in remote connectivity between computers over
a network. Telnet can connect to a remote machine that on a network and is port
listening. Most common ports to which one can connect to through telnet are:
Port 21 ~ File Transfer Protocol
Port 22 – SSH Remote Login Protocol
Port 23 – Telnet Server
Port 25 – Simple Mail Transfer Protocol (SMTP)
Port 53 – Domain Name Server (DNS)
Port 69 – Trivial File Transfer Protocol (TFTP)
Port 70 – Gopher
Port 80 – Hyper Text Transfer Protocol (HTTP)
Port 110 – Post Office Protocol 3 (POP3)
When the user wants to access an application program on a remote
computer, then the user must perform remote login.
How remote login occurs
At the local site
•The user sends the keystrokes to the terminal driver, the characters are then
sent to the TELNET client.
•The TELNET client which in turn, transforms the characters to a universal
character set known as network virtual terminal characters and delivers them
to the local TCP/IP stack
At the remote site
The commands in NVT (Network Virtual Terminal)forms are transmitted to the
•The
TCP/IP at the remote machine. Here, the characters are delivered to the
operating system and then pass to the TELNET server.
•The TELNET server transforms the characters which can be understandable by
a remote computer.
•However, the characters cannot be directly passed to the operating system as
a remote operating system does not receive the characters from the TELNET
server. Therefore it requires some piece of software that can accept the
characters from the TELNET server. The operating system then passes these
characters to the appropriate application program.
The term telnet is also used to refer to the software that implements the client part of the
protocol. Telnet client applications are available for virtually all computer
platforms. Telnet is also used as a verb. To telnet means to establish a connection using
the Telnet protocol, either with a command line client or with a graphical interface.