Data Communictions and Networking
Application Layer
Contents
Introduction to Application
Layer DNS : Domain
NameSpace Telnet :
TelNewtork
FTP : File Transfer Protocol
SNMP : Simple Network Management
Protocol QOS : Quality of Service
Introduction to Application Layer
It is the closest layer to the end user which means that the
application layer and end user can interact directly with the
software application. The application layer programs are based
on client and servers.
The following are the functionalies of Application Layer:
Identifying communication partners:It identifies the
availability of communication partners for an application with data
to transmit.
Determining resource availability:It 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
The Following are the Services of Application Layer :
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.
Services of Application Layers....
The Following are the Services of Application Layer :
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: This 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.
Application Layer Architecture
It is designed by the application developer and defines how
the application should be structured over the various end
systems.
Application architecture is of two types
Client-Server architecture : An application program running on
the local machine sends a request to another application program is
known as a client, and a program that serves a request is known as a
server. For example, when a web server receives a request from the
client host, it responds to the request to the client host.
Characteristics Of Client-server architecture:
Clients do not directly communicate with each other. For example, in a
web application, two browsers do not directly communicate with each
other.
A server is fixed, well-known address known as IP address because the
server is always on while the client can always contact the server by
sending a packet to the sender’s IP address.
Merits of Client/Server Architecture
Advantages....!
Centralized: Centralized back-up is possible in client-
server networks, i.e., all the data is stored in a server.
Security: These networks are more secure as all the
shared resources are centrally administered.
Performance: The use of the dedicated server increases the
speed of sharing resources. This increases the performance of
the overall system.
Scalability: We can increase the number of clients and servers
separately, i.e., the new element can be added, or we can add a
new node in a network at any time.
De-Merits of Client/Server Architecture
Dis-Advantages....!
Traffic Congestion is a big problem in Client/Server
networks. When a large number of clients send requests to
the same server may cause the problem of Traffic congestion.
It does not have a robustness of a network, i.e., when the
server is down, then the client requests cannot be met.
A client/server network is very decisive. Sometimes, regular
computer hardware does not serve a certain number of clients.
In such situations, specific hardware is required at the server
side to complete the work.
Sometimes the resources exist in the server but may not exist in
the client. For example, If the application is web, then we cannot
take the print out directly on printers without taking out the print
view window on the web.
Application Layer Architecture
P2P (peer-to-peer) architecture : It has no dedicated
server in a data center. The peers are the computers which are
not owned by the service provider and resides in the homes,
offices, schools, and universities. The peers communicate with
each other without passing the information through a dedicated
server, this architecture is known as peer-to-peer architecture.
The applications based on P2P architecture includes file sharing
and internet telephony.
Features of P2P
Self scalability: In a file sharing system, although each peer
generates a workload by requesting the files, each peer also
adds a service capacity by distributing the files to the peer.
Cost-effective: It is cost-effective as it does not require
significant server infrastructure and server bandwidth.
DNS : Domain Name Space
An application layer protocol defines how the application
processes running on different systems, pass the
messages to each other.
DNS stands for Domain Name System.
DNS is a directory service that provides a mapping between
the name of a host on the network and its numerical address.
DNS is required for the functioning of the internet. Each node in a
tree has a domain name, and a full domain name is a sequence
of symbols specified by dots.
DNS is a service that translates the domain name into IP
addresses. This allows the users of networks to utilize user-
friendly names when looking for other hosts instead of
remembering the IP addresses.
For Example, Suppose the FTP site at EduSoft had an IP
address of 132.147.165.50, most people would reach this site by
specifying ftp.EduSoft.com. Therefore, the domain name is more
reliable than IP address
DNS : Domain Name Space
DNS is a TCP/IP protocol used on different platforms. its
space is divided into three different sections: generic
domains, country domains, and inverse domain.
DNS : Domain Name Space
Generic Domain :
It defines the registered hosts according to their generic behavior.
Each node in a tree defines the domain name, which is an index
to the DNS database.
It uses three-character labels, and these labels describe
the organization type.
Example : .com (Commercial Orgnizations), .edu
(Educational institutions), .gov (Government institutions) and
Soon...
Country Domain : The format of country domain is
same as a generic domain, but it uses two-character
country abbreviations (e.g., .us for the United States) in
place of three character organizational abbreviations.
Inverse Domain : It is used for mapping an address to a
name. When the server has received a request from the
client, and the server contains the files of only authorized
clients. To determine whether the client is on the authorized
list or not, it sends a query to the DNS server and ask for
mapping an address to the name.
Example : Generic
Domains
Example : Country
Domains
Example : Inverse
Domains
DNS : Domain Name Space
Working of DNS :
DNS is a client/server network communication protocol.
DNS clients send requests to the. server while DNS servers
send responses to the client.
Client requests contain a name which is converted into an IP
address known as a forward DNS lookups while requests
containing an IP address which is converted into a name known
as reverse DNS lookups.
DNS implements a distributed database to store the name of all
the hosts available on the internet.
If a client like a web browser sends a request containing a
hostname, then a piece of software such as DNS resolver sends
a request to the DNS server to obtain the IP address of a
hostname. If DNS server does not contain the IP address
associated with a hostname, then it forwards the request to
another DNS server. If IP address has arrived at the resolver,
which in turn completes the request over the internet protocol.
Example - DNS
Works
Example - Domain Name
Space
Example - Domain Name
Space
Example - Domain Name
Space
Data Communictions and Networking
FTP - File Transfer Protocol
Prof. Pradeep
K V Assistant
Professor VIT
Chennai
File Transfer Protocol
FTP stands forFileTransferProtocol.
FTP is a standard internet protocol provided by TCP/IP used
for transmitting the files from one host to another.
It is mainly used for transferring the web page files from their
creator to the computer that acts as a server for other computers
on the internet.
It is also used for downloading the files to computer from
other servers.
Objectives of FTP :
It provides the sharing of files.
It is used to encourage the use of remote
computers. It transfers the data more reliably and
efficiently.
Why FTP?
Although transferring files from one system to another is very
simple and straightforward, but sometimes it can cause problems.
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.
Solution:
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
FTP is an application layer protocol which moves files
between local and remote file systems.
It runs on the top of TCP, like HTTP.
To transfer a file, 2 TCP connections are used by FTP in
parallel: Control connection and Data connection.
Mechanism of FTP
The above figure shows the basic model of the FTP.
The FTP client has three components: the user
interface, control process, and data transfer
process.
The server has two components: the server control process
and the server data transfer process.
Connections in FTP
Control Connection(Port : 21): It uses very simple rules for
communication. Through this, we can transfer a line of
command/response at a time. It is made between the control
processes and remains connected during the entire interactive
FTP session.
Data Connection(Port : 20): It uses very complex rules as data
types may vary. It is made between data transfer processes. It
opens when a command comes for transferring the files and
closes when the file is transferred.
FTP - Clients
It is a program that implements a FTP to transfer files between two
hosts on the internet.
It allows a user to connect to a remote host and upload or download
the files.
It has a set of commands, used to connect to a host, transfer the files,
and close the connection.
This GUI based FTP client makes the file transfer very easy and also does
not require to remember the FTP commands.
Control Connections in
FTP
Using the control
connection
Data Connections in
FTP
Using the Data
connection
Control/Data Connections in
FTP
Using
theControlconnection
Using
theDataconnection
Control/Data Connections in
FTP
Using
theCommandprocessing
Using theFile
Transfer
Commands in
FTP...!
Access Commandsin
FTP
Data Format Commandsin
FTP
Commands in
FTP...!
File Management Commandsin
FTP
Port Defining Commandsin
FTP
Commands in
FTP...!
File Transfer Commandsin
FTP
Miscellaneous Commandsin
FTP
Commands in FTP...!
Response Commandsin FTP
Commands in
FTP...!
Response
Commandsin FTP
Example : Retrieve List of Items in
Directory
Example : Actual FTP Sessions
FTP
Sessions
The colored lines show the responses from the server control
connection; The black lines show the commands sent by the
client.
The lines in white with black background show data transfer.
Advantages of FTP
Speed: One of the biggest advantages of FTP is speed. The
FTP is one of the fastest way to transfer the files from one
computer to another computer.
Efficient: It is more efficient as we do not need to complete
all the operations to get the entire file.
Security: To access the FTP server, we need to login with
the username and password. Therefore, we can say that
FTP is more secure.
Back & forth movement: FTP allows us to transfer the files
back and forth. Suppose you are a manager of the company,
you send some information to all the employees, and they all
send information back on the same server.
Disadvantages of FTP
The standard requirement of the industry is that all the FTP
transmissions should be encrypted. However, not all the FTP providers
are equal and not all the providers offer encryption. So, we will have to
look out for the FTP providers that provides encryption.
FTP serves two operations, i.e., to send and receive large files on a
network. However, the size limit of the file is 2GB that can be sent. It
also doesn’t allow you to run simultaneous transfers to multiple
receivers.
Passwords and file contents are sent in clear text that allows unwanted
eavesdropping. So, it is quite possible that attackers can carry out the
brute force attack by trying to guess the FTP password.
It is not compatible with every system.
Trival File Transfer Protocol (TFTP)
FTP is a standard mechanism provided by TCP/IP to copy a
file from one host to another, supports all files.
FTP uses TCP services, to transfer file from one host to another.
FTP uses two TCP connection one is well knownPort-21which is
used for connection control and second is well knownPort-
20which is used for transferring data.
What is TFTP?
Trivial File Transfer Protocol is a simple protocol that is used
for sending a file from the server to the client.
It uses the concept of UDP to share files between server and
client.
Understanding TFTP
TFTP has a very simple concept and has a very simple
design.
It has limited features when it is compared to File Transfer
Protocol.
In general TFTP does not follow any authentication
before the communication of file, so it can’t be used
over internet.
It does not apply any security mechanism while
filing communication.
It is used for communicating files among machines set up
in local intranet.
It uses a very small amount of memory, and used to
communicate boot files if computers do not have hard
disks
It uses the services of UDP on the well-known port 69.
How TFTP Works for?
TFTP provides communication takes place between a client and a
server.
TFTP uses UDP for communicating of files by establishing
a connnection using port 69.
Once the connection is established, the client generally
requests RRQ or WRQ to Read/Write the contents of File.
Once this is done, then files are communicated in the form of
small packets(512Bytes)
Once a packet is communicated from server to client, the server
waits to receive an acknowledgment from the client that packet
has been received.
Once, acknowledgment is received the server sends the next
packet of 512 bytes
This is done till the last packet is communicated from server-side
to client-side
What if...?
What will happen if a Packet is not received on the Client Side?
It starts timer, during communication b/w Client & Server for
acknowledgment.
It not received within the time, the server re-sends the same
packet until its acknowledgment is received.
However, if acknowledgment is received before the timer, then
it sends the next packet
How will the Client know that File Communicating is Done?
The last packet which is generated for sharing a particular file
is always less than 512 bytes.
Even if the packets generated are in multiples of 512 bytes, then
it sends an additional packet which is less than 512 bytes so
that the client could understand that it has received the file.
TFTP Messages
TFTP uses of five types
which are : Read request
Write request
Data Packets
Acknowledgment
request Error
TFTP Message
Formats
Read/Write Request
Format
Data Frame
Format
ACK / ERR
Format
Error Numbers and Its Meaning
Error Numbers in TFTP
Connection
Establishment
UDP Port Numbers used by
TFTP
Example -
TFTP
Example - Use of TFTP with
DHCP
FTP
vs.TFTP
Value FTP TTFTP
Authenti Authentication based on login TFTP does not provide
cation with username and password. authentication (login).
Connec FTP uses TCP (reliable
transmission). Errors
TFTP uses UDP. Errors
(lost packets, checksum
tion are handled by TCP
layer
errors) must handled by
TFTP server.
Protocol Transmission of data/control TFTP uses a simple lock-step
algorithm information is handled by protocol (each data packet
TCP & guarantees max needs to be acknowledged).
throughput Thus the throughput is limited.
Ccomplex and requires Simple and uses UDP,
larger memory and not Clients/Servers have a very
Footprint suited for small device small footprint and are
bootloaders suited for use in
bootloaders.
Control and FTP separates user data Uses only "1 channel",
data and control information i.e. Control packets flow in
channel by 2 separate TCP connections. one direction and Data pkts
in the reverse direction.
Data Communictions and Networking
Terminal Network (TelNet)
Prof. Pradeep
K V Assistant
Professor VIT
Chennai
Terminal Network
The main task of the internet is to provide services to users.
For example, users want to run different application
programs at the remote site and transfers a result to the
local site. This requires a client-server program such as FTP,
SMTP. But this would not allow us to create a specific
program for each demand.
The better solution is to provide a general client-server
program that lets the user access any application program on
a remote computer. Therefore, a program that allows a user
to log on to a remote computer.
A popular client-server program Telnet is used to
meet such demands. Telnet is an abbreviation for
Terminal Network.
Telnet provides a connection to the remote computer in such
a way that a local terminal appears to be at the remote side.
Types of Login using TelNet
1 Local Login:
When a user logs into a local computer, then it is known as local
login. When the workstation running terminal emulator, the
keystrokes entered by the user are accepted by the terminal
driver. The terminal driver then passes these characters to the
operating system which in turn, invokes the desired application
program.
However, the operating system has special meaning to
special characters.
For example, in UNIX some combination of characters have
special meanings such as control character with "z" means
suspend. Such situations do not create any problem as the
terminal driver knows the meaning of such characters. But, it can
cause the problems in remote login.
2 Remote Login: When the user wants to access an application
program on a remote computer, then the user must perform
remote login.
Local
Login
Remote
Login
How Remote Login occurs....?
At 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 Remote Site:
The commands in NVT forms are transmitted to 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.
∴ 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.
Network Virtual
Terminal
How NVT Works...!
The network virtual terminal is an interface that defines how data and
commands are sent across the network.
In today’s world, systems are heterogeneous. For example, the
operating system accepts a special combination of characters such as
end-of-file token running a DOS operating system ctrl+z while the token
running a UNIX operating system isctrl+d.
TELNET solves this issue by defining a universal interface known as
network virtual interface.
The TELNET client translates the characters that come from the local
terminal into NVT form and then delivers them to the network.
The Telnet server then translates the data from NVT form into a form
which can be understandable by a remote computer.
SNMP : Simple Network
Management Protocol
SNMP - Simple Network Management Protocol
SNMP stands for Simple Network Management Protocol.
It is an application–layer protocol defined by the
Internet Architecture Board (IAB).
It is a part of Transmission Control Protocol⁄Internet
Protocol (TCP⁄IP) protocol suite.
SNMP is one of the widely accepted protocols to
manage and monitor network elements.
It comes with bundle of network elements called SNMP
agents, which enables and configures to communicate
with the network management system (NMS).
SNMP is a framework used for managing devices on the
internet.
It provides a set of operations for monitoring and
managing the internet.
SNMP Concept
SNMP has two components Manager and Agent.
The Manager is a host that controls and monitors a set of
Agents such as routers.
It monitors the devices made by different
manufacturers and installed on different physical
networks.
It is used in a heterogeneous network made of different
LANs and WANs connected by routers or gateways.
SNMP Managers and Agents
A manager is a host that runs the SNMP client program
while the agent is a router that runs the SNMP server
program.
Management of the internet is achieved through simple
interaction between a manager and agent.
The agent is used to keep the information in a database
while the manager is used to access the values in the
database. For example, a router can store the appropriate
variables such as a number of packets received and
forwarded while the manager can compare these variables
to determine whether the router is congested or not.
Agents can also contribute to the management process. A
server program on the agent checks the environment, if
something goes wrong, the agent sends a warning
message to the manager.
Management Components
Management is not achieved only through the SNMP
protocol but also the use of other protocols that can
cooperate with the SNMP protocol.
Management is achieved through the use of the other two
protocols: SMI (Structure of management information) and
MIB(management information base).
Management is a combination of SMI, MIB, and SNMP. All
these three protocols such as abstract syntax notation 1
and basic encoding rules .
Management Components...!
SMI: It is a component used in network management. It
defines the type of data that can be stored in an object and
show how to encode the data for the transmission over a
network.
MIB: Each agent has its own MIB, which is a collection of all
the objects that the manager can manage. MIB is
categorized into eight groups: system, interface, address
translation, ip, icmp, tcp, udp, and egp. These groups are
under the mib object.
Management Components...!
SNMP Messages: It defines five types of messages:
GetRequest, GetNextRequest, SetRequest,
GetResponse, and Trap.
Management Componenets...!
GetRequest:
SNMP manager sends this message to request data from the
SNMP agent. It is simply used to retrieve data from SNMP
agents.
In response to this, the SNMP agent responds with the
requested value through a response message.
GetNextRequest:
This message can be sent to discover what data is available
on an SNMP agent. The SNMP manager can request data
continuously until no more data is left. In this way, the SNMP
manager can take knowledge of all the available data on
SNMP agents.
GetBulkRequest:
This message is used to retrieve large data at once by the
SNMP manager from the SNMP agent. It is introduced in
SNMPv2c.
SetRequest:
It is sent from a manager to the agent to set a value in a variable.
GetResponse:
It is sent from an agent to the manager in response to the
GetRequest and GetNextRequest message.
This message contains the value of a variable requested by the
manager. When sent in response to Get messages, it will contain
the data requested. When sent in response to the Set message, it
will contain the newly set value as confirmation that the value has
been set.
Trap: The Trap message is sent from an agent to the manager to
report an event. For example, if the agent is rebooted, then it
informs the manager as well as sends the time of rebooting.
SNMP
Architecture
Data Communictions and Networking
QoS : Quality of Service
Quality of Service
Quality of service: (QoS) is an internetworking issue that refers
to a set of techniques and mechanisms that guarantee the
performance of the network to deliver predictable service to an
application program.
The QoS focus mainly on the
Following: Data Flow
Characteristics
Flow Control to Improve QoS
Integrated Services
Differential Services.
Data Flow Characteristics
Traditionally, four types of characteristics are attributed to a
flow:
Reliability: is a characteristic that a flow needs in order to
deliver the packets safe and sound to the destination. Lack of
reliability means losing a packet or acknowledgment, which
entails retransmission.
Delay: Source-to-destination delay is another flow
characteristic. Again, applications can tolerate delay in
different degrees.
Jitter: Jitter is the variation in delay for packets belonging to the
same flow.
Bandwidth: Different applications need different bandwidths. In
video conferencing we need to send millions of bits per second
to refresh a color screen while the total number of bits in an e-
mail may not reach even a million.
Sensitivity of applications to flow
characteristics
Flow Control to Improve QoS
Scheduling:
Treating packets (datagrams) in the Internet based on their
required level of service can mostly happen at the routers.
It is at a router that a packet may be delayed, suffer from jitters, be
lost, or be assigned the required bandwidth.
A good scheduling technique treats the different flows in a fair and
appropriate manner.
Several scheduling techniques are designed to improve the quality
of service
Example : FIFO queuing, priority queuing, and weighted fair
queuing.
Traffic Shaping or Policing
To control the amount and the rate of traffic is called traffic shaping
or traffic policing.
The first term is used when the traffic leaves a network; the
second term is used when the data enters the network.
Example : Leaky bucket and Token bucket
Flow Control to Improve QoS...!
Resource Allocation
A flow of data needs resources such as a buffer, bandwidth,
CPU time, and so on.
The quality of service is improved if these resources are
reserved beforehand.
Integrated Services are the one which depends heavily on
resource reservation to improve the quality of service.
Admission Control:
It refers to the mechanism used by a router or a switch to
accept/reject a flow based on predefined parameters called
flow specifications.
Before a router accepts a flow for processing, it checks the
flow specifications to see if its capacity can handle the new
flow.
It takes into account bandwidth, buffer size, CPU speed, etc., as
well as its previous commitments to other flows.
Admission control in ATM networks is known as Connection
Admission Control (CAC), which is a major part of the strategy for
controlling congestion.
Integrated and Differentiated Service
Integrated Services:
Integrated Services : ntegrated service is flow-based QoS model
and designed for IP.
In integrated services, user needs to create a flow in the
network, from source to destination and needs to inform all
routers (every router in the system implements IntServ) of the
resource requirement.
Differentiated Service:
DS is a computer networking model, which is designed to achieve
the scalability by managing the network traffic.
DS is a class based QoS model specially designed for IP.
DS was designed by IETF (Internet Engineering Task Force)
to handle the problems of Integrated Services.
Integrated Services
The steps to understand how integrated services works.
Resource Reservation Protocol (RSVP):
An IP is connectionless, datagram, packet-switching protocol.
To implement a flow-based model, a signaling protocol is used to run
over IP, which provides the signaling mechanism to make reservation
(every applications need assurance to make reservation), this protocol is
called as RSVP.
Flow Specification: While making reservation, resource needs to
define the flow specification. The flow specification has two
parts:
Resource specification: It defines the resources that the flow needs to
reserve. For Ex: Buffer, bandwidth, etc.
Traffic specification: It defines the Traffic categorization of the flow.
Admit or deny: After receiving the flow specification from an
application, the router decides to admit or deny the service and
the decision can be taken based on the previous commitments
of the router and current availability of the resource.
Classification of Integrated Services
Guaranteed Service Class:
This service guarantees that the packets arrive within a
specific delivery time and not discarded, if the traffic flow
maintains the traffic specification boundary.
This type of service is designed for real time traffic, which needs
a guaranty of minimum end to end delay.
For example: Audio conferencing.
Controlled Load Service Class:
It is designed for the applications, which can accept some delays,
but are sensitive to overload network and to the possibility to lose
packets.
For example: E-mail or file transfer.
Problem with Integrated Services
The two problems with the Integrated services are:
Scalability: In Integrated Services, it is necessary for each router
to keep information of each flow. But, this is not always possible
due to growing network.
Solution: The main processing unit can be moved from central
place to the edge of the network to achieve the scalability. The
router does not need to store the information about the flows and
the applications (or the hosts) define the type of services they
want every time while sending the packets.
Service- Type LimitationThe integrated services model provides
only two types of services, guaranteed and control-load.
Solution: The routers, route the packets on the basis of class of
services define in the packet and not by the flow. This method
is applied by defining the classes based on the requirement of
the applications.
Tha
nks