Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 25

Application Layer

Hitesh Kag
Syllabus
2. Application Layer :
Principles of Network applications, Web &
HTTP, Domain Name System, Electronic Mail,
Socket Programming.
Principles of Network Applications
• Fundamental concepts that govern the design and
development of applications that run on a computer network.
These principles encompass several key aspects of network
applications, including:
• Network Application Architectures
• Processes Communicating
• The Interface Between the Process and the Computer
Network
• Transport Services Available to Applications
• Transport Services Provided by the Internet
• Application-Layer Protocols
Network Application Architectures

• It refer to the overall design and structure of a network


application.
• It encompasses how the application is divided into
different components, and how these components
interact with each other.
– Client-Server Architecture:
– Peer-to-Peer Architecture
– Three-Tier Architecture:
– Microservices Architecture
• Criteria to choose architecture: scalability, performance,
security, and maintainability, reliability.
Client-Server Architecture

• In this architecture, one component acts as a


client and makes requests to a server
component, which provides the requested
services.
• This architecture is commonly used in web
applications, where the client is a web browser
and the server is a web server.
Peer-to-Peer Architecture

• In this architecture, every component is both a


client and a server, and each component can
communicate directly with any other
component.
• This architecture is commonly used in file-
sharing applications, where each user’s device
acts as both a client and a server.
Three-Tier Architecture

• In this architecture, the application is divided into three


components:
– a client component,
– a middleware component, and
– a database component.
• The client component makes requests to the middleware
component, which communicates with the database
component to retrieve or update data.
• This architecture provides a layer of abstraction between
the client and the database, which can improve
performance and scalability
Microservices Architecture

• In this architecture, the application is divided into


a collection of small, independently deployable
components, known as microservices.
• Each microservice is responsible for a specific
aspect of the application’s functionality, and they
communicate with one another through APIs.
• This architecture allows for greater flexibility and
scalability compared to other architectures.
Processes Communicating
• Processes Communicating refers to the communication between
multiple processes in a computer network.
• Processes can be thought of as individual programs or tasks running on
a device, and they may be located on the same device or on different
devices connected to the network.
• Communication between processes is facilitated by the use of
protocols, which define the rules and formats for exchanging data.
• The communication between processes can be either synchronous or
asynchronous, meaning that either both processes must be available to
communicate at the same time or the communication can occur at
different times.
• The choice of protocols used for communication will depend on the
requirements of the application and the network infrastructure.
The Interface between the Process and the
Computer Network
• The Interface determines how the process
communicates with other processes and with the network
itself.
• The interface between a process and the computer
network is usually provided by a network stack, which is
a collection of protocols and services that handle the
communication between the process and the network.
• The network stack translates the process’s requests and
data into the appropriate network protocols, and vice
versa, allowing the process to communicate over the
network.
Transport Services Available to Applications
• Transport Services Available to Applications are the services
provided by the network stack that enable applications to
communicate with each other over a computer network.
• These services are responsible for ensuring that data is reliably
delivered between applications, and they provide the underlying
communication infrastructure for the application
• TCP (Transmission Control Protocol): TCP is a reliable,
connection-oriented transport service that provides error-checking
and flows control to ensure that data is delivered accurately.
Applications that require reliable data delivery, such as email or file
transfer, typically use TCP.
• UDP (User Datagram Protocol): UDP is an unreliable,
connectionless transport service that does not provide error checking
or flow control. Applications that require low latency or high speed,
such as video streaming or online gaming, typically use UDP.
• SCTP (Stream Control Transmission Protocol): SCTP is a
reliable, multi-homed transport service that provides error
checking and flow control.
• SCTP can handle multiple streams of data between
applications, allowing for efficient communication between
applications.
• DCCP (Datagram Congestion Control Protocol): DCCP is a
transport service that provides congestion control for
applications that do not require reliable data delivery.
• The choice of transport service will depend on the
requirements of the application, including reliability,
performance, and security requirements.
Transport Services Provided by the Internet

• The Internet provides two primary transport services for applications:


– TCP (Transmission Control Protocol) and UDP (User Datagram Protocol).
• TCP: TCP is a reliable, connection-oriented transport service that provides error-
checking and flows control to ensure that data is delivered accurately.
• Applications that require reliable data delivery, such as email or file transfer,
typically use TCP.
• TCP establishes a reliable connection between two devices and ensures that data
is transmitted in the correct order and without errors.
• UDP: UDP is an unreliable, connectionless transport service that does not
provide error checking or flow control.
• Applications that require low latency or high speed, such as video streaming or
online gaming, typically use UDP.
• Because UDP does not provide error checking or flow control, it is faster and
more efficient than TCP, but it may not be suitable for applications that require
reliable data delivery.
Application layer protocols
• The application layer is the topmost layer of the OSI and TCP/IP models
• Application-layer protocols define the rules for exchanging data between
applications, such as formatting, error detection and correction, and
security.
• Application layer protocols define how application processes (clients and
servers), running on different end systems, pass messages to each other.
• An application layer is an abstract layer that handles the sharing protocol
of the TCP/IP and OSI model.
• The purpose of application layer protocols is that users can send data,
access data, and use networks.
• The application layer also makes communication easier and sometimes
allows users to use software programs
Application Layer Protocol
• FTP
• HTTP
• Telnet
• SMTP
• DNS
• DHCP
• MIME
• POP
• TFTP
• NTP
• HTTPS
• RIP
• SSH
• Echo
FTP
• 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
because it establishes 2 connections between hosts.
• Two connections are Data Connection and Control Connection.
• Data Connection uses PORT 20, and control connection uses PORT 21.
• FTP is built on a client-server architecture and uses separate control and data
connections between the client and the server.
• One connection is used for data transfer, the other for control information
(commands and responses).
• The FTP is data reliably and efficiently.
• The client requests the server for a file. When the server receives a request
for a file, it opens a TCP connection for the client and transfers the file.
After the transfer is complete, the server closes the connection. For a second
file, client requests again and the server reopens a new TCP connection.
HTTP
• Hypertext Transfer Protocol(HTTP) is used mainly to access World
Wide Web (www) data.
• The Hypertext Transfer Protocol (HTTP) is the Web's main application-
layer protocol, although current browsers can access other types of
servers.
• A repository of information spread all over the world and linked
together.
• The HTTP protocol transfers data in plain text, hypertext, audio, video,
etc. HTTP utilizes TCP connections to send client requests and server
replies.
• HTTP works on client server model
• When a user wants to access any HTTP page on the internet, the client
machine at user end initiates a TCP connection to server on port 80
TELetype NETwork(TELNET)
• TELNET is an application layer protocol in which a client-
server application allows a user to log onto a remote machine
and lets the user access any application program on a remote
computer.
• TELNET uses the NVT (Network Virtual Terminal) system to
encode characters on the local system.
• On the server (remote) machine, NVT decodes the characters to
a form acceptable to the remote machine.
• TELNET is a protocol that provides a general, bi-directional,
eight-bit byte-oriented communications facility.
• Many application protocols are built upon the TELNET
protocol. Telnet services are used on PORT 23.
SMTP
• SMTP transfers messages from senders' mail servers to the recipients'
mail servers using TCP connections. In SMTP, users are based on e-mail
addresses. SMTP provides services for mail exchange between users on
the same or different computers.
Following the client/server model:
• SMTP has two sides: a client-side, which executes on a sender's mail
server, and a server-side, which executes on the recipient's mail server.
• Both the client and server sides of SMTP run on every mail server.
• When a mail server sends mail (to other mail servers), it acts as an
SMTP client.
• When a mail server receives mail (from other mail servers), it acts as an
SMTP server.
• SMTP uses TCP port number 25
DNS
• In Domain Name System(DNS), TCP/IP protocol uses the IP address that
uniquely identifies a host's connection to the Internet to identify an entity. DNS
is a hierarchical system based on a distributed database that uses a hierarchy of
Name Servers to resolve Internet host names into the corresponding IP
addresses required for packet routing by issuing a DNS query to a name server.
• DNS in the Internet: DNS is a protocol that can be used on different platforms.
• Domain name space is divided into three categories.
• Generic Domain: The generic domain defines registered hosts according to
their generic behavior. Each node in the tree defines a domain which is an index
to the domain name space database.
• Country Domain: The country domain section follows the same format as the
generic domain but uses 2 characters of country abbreviations (e.g., the US for
the United States) instead of 3 characters.
• Inverse Domain: The inverse domain maps an address to a name.
MIME
• The Multipurpose Internet Mail Extensions (MIME)
is an extension of SMTP that allows the transfer of
multimedia messages. If binary data is included in a
message, MIME headers are used to inform the
receiving mail agent that is as follows:
• Content-Transfer-Encoding: The header alerts the
receiving user agent that the message body has been
ASCII encoded and the type of encoding used.
• Content-Type: The header informs the receiving mail
agent about the type of data in the message.
POP
• POP(Post Office Protocol) is also called the POP3
protocol.
• This is a protocol used by a mail server in conjunction with
SMTP to receive and holds mail for hosts.
• POP3 mail server receives e-mails and filters them into the
appropriate user folders.
• When a user connects to the mail server to retrieve his
mail, the messages are downloaded from the mail server to
the user's hard disk.
• When a client needs to retrieve mails from server, it opens
a connection with the server on TCP port 110
17/4/23
• 18,13,20,04,23,29,28,32,38,42,56,45,47,
• D 9, 10

You might also like