18 Unit-6 Application Layer Protocols
18 Unit-6 Application Layer Protocols
Networking
Unit-6: Application Layer Protocols and Services
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). This means that
a full domain name always ends in a null label, which
means the last character is a dot because the null string is
nothing.
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.
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
RESOLUTION
Mapping a name to an address or an address to a
name is called 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.
There are three methods of resolution:
Recursive
Iterative
Caching
Types of Resolution
Recursive Resolution
The client (resolver) can ask for a recursive answer from
a name server. This means that the resolver expects the
server to supply the final answer.
If the server is the authority for the domain name, it
checks its database and responds.
If the server is not the authority, it sends the request to
another server (the parent usually) and waits for the
response.
If the parent is the authority, it responds;
otherwise, it sends the query to yet another server.
When the query is finally resolved, the response travels
back until it finally reaches the requesting client.
This is called recursive resolution
Recursive
Resolution
Iterative Resolution
If the client does not ask for a recursive answer, the
mapping can be done iteratively.
If the server is an authority for the name, it sends the
answer. If it is not, it returns (to the client) the IP
address of the server that it thinks can resolve the
query.
The client is responsible for repeating the query to this
second server. If the newly addressed server can resolve
the problem, it answers the query with the IP address;
otherwise, it returns the IP address of a new server to
the client.
Now the client must repeat the query to the third server.
This process is called iterative resolution because the
client repeats the same query to multiple servers.
Iterative
Resolution
CACHING
Each time a server receives a query for a name
that is not in its domain, it needs to search its
database for a server IP address.
Reduction of this search time would increase
efficiency.
DNS handles this with a mechanism called caching.
When a server asks for a mapping from another
server and receives the response, it stores this
information in its cache memory before sending it
to the client.
If the same or another client asks for the same
mapping, it can check its cache memory and solve
the problem.
REMOTE LOGGING
In the Internet, users may want to run application
programs at a remote site and create results that
can be transferred to their local site.
One way to satisfy that demand is to create a
client/server application program such as (FTPs),
e-mail (SMTP) for each desired service.
The better solution is a general-purpose
client/server program that lets a user access any
application program on a remote computer; in
other words, allow the user to log on to a remote
computer.
One of such a client/server application program is
TELNET.
TELNET
TELNET is an abbreviation for TErminaL
NETwork.
Characteristics of TELNET
• Timesharing Environment
• Logging
• Local Logging
• Remote Logging
• Network Virtual Terminal
• Embedding
• Options
Time Sharing Environment
TELNET was designed at a time when most
operating systems, such as UNIX, were
operating in a timesharing environment. In
such an environment, a large computer
supports multiple users.
Logging
In a timesharing environment, users are part of
the system with some right to access
resources. To access the system, the user logs
into the system with a user id or log-in name.
Local Logging
Remote Logging
Network Virtual Terminal
We are dealing with heterogeneous systems.
• If we want to access any remote computer in the world, we must first know what
type of computer we will be connected to, and we must also install the specific
terminal emulator used by that computer.
• TELNET solves this problem by defining a universal interface called the network
virtual terminal (NVT) character set. Via this interface, the client TELNET
translates characters (data or commands) that come from the local terminal into
NVT form and delivers them to the network.
• The server TELNET, on the other hand, translates data and commands from
NVT form into the form acceptable by the remote computer.
ELECTRONIC MAIL
One of the most popular Internet
services is electronic mail (e-mail).
At the beginning of the Internet era, the
messages sent by electronic mail were
short and consisted of text only.
Today, electronic mail is much more
complex. It allows a message to include
text, audio, and video.
It also allows one message to be sent to
one or more recipients.
Components of e-mail
An e-mail system is based on the three
main components:
User Agent (UA)
Message Transfer Agent (MTA)
Message Access Agent (MAA).
User Agents(UA)
The user agent (UA) provides services to
the user to make the process of sending
and receiving a message easier.
User agent is software (a software agent)
that is acting on behalf of a user.
There are two types of user agents:
command-driven and GUI-based.
Message Transfer Agent (MTA): SMTP
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).
Message Access Agent (MAA)
SMTP is not involved in the third stage because
SMTP is a push protocol; it pushes the message
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
Currently two message access protocols are
available: Post Office Protocol, version 3 (POP3)
and Internet Mail Access Protocol, version 4
(IMAP4).
Architecture of e-mail
Architecture of e-mail can be described
using four scenarios
We begin with the simplest situation and
add complexity as we proceed.
The fourth scenario is the most common
in the exchange of email.
First Scenario:
When the sender and the receiver of an e-mail
are on the same system, we need only two user
agents. A mailbox is part of a local hard drive, a
special file with permission restrictions. Only the
owner of the mailbox has access to it.
Second Scenario
When the sender and the receiver of an e-mail
are on different systems, we need two UAs and a
pair of MTAs (client and server).
Third Scenario
When the sender is connected to the mail server
via a LAN or a WAN, we need two UAs and two
pairs of MTAs (client and server).
Fourth Scenario
When both sender and receiver are connected to
the mail server via a LAN or a WAN, we need two
UAs, two pairs of MTAs (client and server), and a
pair of MAAs (client and server). This is the most
common situation today.
File Transfer Protocol (FTP)
File Transfer Protocol (FTP) is the standard
mechanism provided by TCP/IP for copying a
file from one host to another.
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).
FTP uses two well-known TCP ports:
Port 21 is used for the control connection, and
port 20 is used for the data connection.
The client has three components:
user interface
client control process
client data transfer process
The server has two components:
server control process
server data transfer process
The control connection is made between the control processes.
The data connection is made between the data transfer
processes.
FTP uses the services of TCP. It needs two TCP
connections.
• The well-known port 21 is used for the
Usingcontrol
the control connection
connection
• The well-known port 20 is used for the data
connection.
Request message
Request line
Headers
1
A blank line
Body
Response message
Status line
Headers
2
A blank line
Body
Request and Status Lines:
The first line in a request message is called a
request line.
The first line in the response message is
called the status line.
Format of the request message
Format of the response message
Network Management: SNMP
Network management can be defined as
monitoring, testing, configuring, and
troubleshooting network components to
meet a set of requirements defined by an
organization.
These requirements include the smooth,
efficient operation of the network that provides
the predefined quality of service for users.
To accomplish this task, a network
management system uses hardware, software,
and humans.
Functions of Network
Management
The functions performed by a network
management system can be divided into five
broad categories:
Configuration management
Fault management
Performance management
Security management
Accounting management
Network Security
Security is one of the important aspects in data
communications and networking.
Security in networking is based on cryptography,
the science and art of transforming messages to
make them secure and immune to attack.
Cryptography can provide several aspects of
security related to the interchange of messages
through networks.
These aspects are
confidentiality,
integrity,
authentication, and
nonrepudiation.
Message Confidentiality: Message confidentiality or
privacy means that the sender and the receiver expect
confidentiality. The transmitted message must make
sense to only the intended receiver. To all others, the
message must be garbage.
Message Integrity: Message integrity means that the
data must arrive at the receiver exactly as they were
sent. There must be no changes during the transmission,
neither accidentally nor maliciously.
Message Authentication: In message authentication
the receiver needs to be sure of the sender's identity and
that an imposter has not sent the message.
Message Nonrepudiation: Message nonrepudiation
means that a sender must not be able to deny sending a
message that he or she, in fact, did send.
Entity Authentication: In entity authentication (or user
identification) the entity or user is verified prior to access
to the system resources (files, for example).
Cryptography
Cryptography, a word with Greek
origins, means "secret writing."
However, we use the term to refer to the
science and art of transforming messages
to make them secure and immune to
attacks.
Some Basic Terminology
plaintext - original message
ciphertext - coded message
key - info used in cipher known only to sender/receiver
encipher (encrypt) - converting plaintext to ciphertext
decipher (decrypt) - recovering plaintext from
ciphertext
cryptography - study of encryption principles/methods
Network Layer
source and destination IP addresses,
Transport Layer
source and destination port addresses
Type of protocol TCP or UDP
A packet-filter
firewall filters
packets at the
network or transport
layer.
Incoming packets from
network 131.34.0.0 are
blocked.
Incoming packets destined for any internal
TELNET server (port 23) are blocked.
Incoming packets destined for internal
host 194.78.20.8 are blocked. The
organization wants this host for internal
use only.
Outgoing packets destined for an HTTP server
(port 80) are blocked. The organization does not
want employees to browse the Internet.
Proxy Firewalls
Sometimes we need to filter a message based on
the information available in the message itself.
For example, assume that an organization wants to
implement the following policies regarding its Web pages:
Only those Internet users who have previously
established business relations with the company can
have access; access to other users must be blocked.
In this case, a packet-filter firewall is not feasible
because it cannot distinguish between different
packets arriving at TCP port 80 (HTTP). Testing must
be done at the application level (using URLs).
When the user client process sends a message, the
proxy firewall runs a server process to receive the
request.
The server opens the packet at the application level
and finds out if the request is legitimate.
If it is legitimate, the server acts as a client process
and sends the message to the real server.
If it is not legitimate, the message is dropped and
A proxy firewall filters
at the
application layer.