Application Layer Prtocols
Application Layer Prtocols
Features:
• Connection oriented protocol: control connection, data connection
• Support for authentication: username, password , secure file transfer
• Active and passive modes : Active :client open port and listen while server actively connect.
Passive : server open port and wait for the client to connect.
• FTP uses port 20 and 21
• FTP Working:
• The client establishes a control connection to the server using TCP port 21.
• The client requests a data connection mode (active or passive) from the server.
• The client and the server establish a data connection using TCP port 20
• The client sends commands to transfer files to or from the server over the data connection.
• The client closes the data connection after the file transfer is complete.
• The client sends a command to terminate the control connection.
Advantages of FTP:
• Efficient for large files
• Directory management
Disadvantages of FTP:
• Lack of encryption
• Complex configuration
2. HTTP(Hypertext Transfer Protocol):
• HTTP is a fundamental application layer protocol in TCP/IP model.
• It is used to transfer data, especially web pages, between clients and servers over the internet.
• HTTP is the foundation of data communication on the World Wide Web(WWW)
Features:
• HTTP follows client server architecture
• HTTP follows request response model
• HTTTP is stateless
• HTTP uses port 80
• HTTPS(HTTP secure) uses port 443
HTTP working:
• HTTP works on request-response cycle.
• first client sends a request to server for resource by searching any url or clicking on any link.
• Then, server process the client's request and checks for the existence of requested resource.
• After processing the request, server sends back the HTTP response along with status code, headers and
requested data.
• The browser receives the response sent by server and renders the content for users.
• After that HTTP closes the connection.
HTTP Request Methods
• GET:Requests using GET should only retrieve data and should not
contain a request content.
• HEAD:The HEAD method asks for a response identical to a GET request, but without a response
body.
• PUT : Send document from server to client.
• POST: send information from the client to server.
• TRACE : echoes the incoming request.
• DELETE: remove web page
• LINK: connect two existing resources.
• UNLINK :breaks existing connection.
Advantages of HTTP:
• Simple to implement
• Widely supported by browsers and servers
Disadvantages of HTTP:
• HTTTP is stateless
• It transmit data in plaintext.
3. SMTP(Simple Mail Transfer Protocol):
• SMTP is an Application Layer protocol in TCP/IP model that is used to send and route emails between
clients and servers.
• SMTP defines the rules for transferring electronic mail(email) across network .
• It is a connection oriented protocol
Features:
• SMTP is a text-based protocol means email messages are transmitted as plain text.
• SMTP follows client server architecture.
• SMTP operates on port 25.
• It is operate in session based manner.
SMTP working:
• Client initiates a TCP connection with the SMTP server.
• SMTP server listens for a connection and initiates a connection on that port.
• The connection is established.
• Client informs the SMTP server that it would like to send a mail.
• Assuming the server is OK, client sends the mail to its mail server.
• Client’s mail server use DNS to get the IP Address of receiver’s mail server.
• Then, SMTP transfers the mail from sender’s mail server to the receiver’s mail server.
SMTP working:
• E-mail system is implemented with the help of Message Transfer
Agents.
• Two MTA’s :one for sending emails and another for receiving emails.
• The formal protocol that defines MTA client and server in the internet
is called SMTP.
Advantages of SMTP:
• SMTP is relatively simple, text-based protocol
• Easy to implement and higher speed
• SMTP is reliable protocol
Disadvantages of SMTP:
• Lack of encryption and authentication
• Used only for sending mails.
4. TELNET:
• TELNET is an Application Layer protocol in TCP/IP model used for remote access to services, routers.
• TELNET stands for telecommunication network used for remote communication.
• TELNET enables a client to establish a command-line interface session on remote device, allowing users
to interact with the system.
Features:
• TELNET operates on a client-server model.
• It is a character-based protocol means it transmit character in plain text.
• TELNET operate on port 23.
TELNET working:
1. Connection Establishment: the TELNET client initiates a connection to the TELNET server, and server
accept the connection and initiates a login prompt.
2. Login and Authentication: the client is prompted for username and password, if it is valid then session is
established.
3. Command Execution: once authenticate user can send commands(open,close,set,quit) to the remote server.
Commands are processed, and the outputs are displayed on the clients screen.
4. Session Termination: the session can be terminated by entering an exit command
Advantages of TELNET:
• Simple to implement
• It support real time transmission
Disadvantages of TELNET:
• TELNET transmit data in plaintext.
• Lack of encryption
• Does not support features like file transfer.
4. BOOTP(Bootstrap Protocol):
• BOOTP is an Application Layer protocol in TCP/IP model used primarily to assign IP addresses and provide
bootstrapping information to devices in a network.
• BOOTP was designed to replace the reverse address resolution protocol(RARP).
• It is used to by a client for obtaining an IP address from a server.
Features:
• Bootstrapping information.
• IP address assignment.
• Protocol layering.
• Client-server model.
• Static IP Allocation.
BOOTP working:
• At the very beginning, each network participant does not have an IP address. The network
administrator then provides each host on the network with a unique IP address using the IPv4
protocol.
• The client installs the BOOTP network protocol using TCP / IP Intervention on its computer
system to ensure compatibility with all network protocols when connected to this network.
• The BOOTP network administrator then sends a message that contains a valid unicast address.
This unicast address is then forwarded to the BOOTP client by the master server.
Advantages of BOOTP:
• Static IP allocation.
• Automated IP configuration.
Disadvantages of BOOTP:
• Less efficient for large networks.
• Lack of dynamic addressing.
6. DHCP(Dynamic Host Configuration Protocol):
• DHCP is an Application Layer protocol in TCP/IP network model.
• DHCP used for automatically assigning IP addresses and other network configuration parameters to
devices on a network.
• It is a protocol that automatically assigns a unique IP address to each device that connects to a network.
• DHCP server allocate IP address in 3 ways Static, Dynamic and Automatic
Features:
• DHCP operates on a client-server model.
• DHCP dynamically assigns IP addresses to device from a pool.
• DHCP enables automated IP address assignment and network configuration
DHCP working:
• Successfully connect to a network via DHCP, the following steps must take place
1. When a client detects it has connected to DHCP server, it send a DHCPDISCOVER request.
2. The router either receives the request or redirect it to the appropriate DHCP server.
3. If the server accept the new device, it will send a DHCPOFFER message back to the client,
which contains the client device MAC address and IP address being offered.
4. The client return a DHCPREQUEST message to the server, confirming it will uses the IP
address.
5. Finally, the server responds with a DHCPAK acknowledgment message that confirms the client
has been given access for certain amount of time.
DHCP Protocol
Advantages of DHCP:
• DHCP is easy to implement.
• For implementation of DHCP does not require any additional costs.
Disadvantages of DHCP:
• Client is not able to access the network in the absence of the DHCP server.
• DHCP is vulnerable to various attack such as IP spoofing.