Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Table of contents
1.
Introduction
2.
Frequently asked questions
3.
Conclusion
Last Updated: Mar 27, 2024

Application layer

Master Python: Predicting weather forecasts
Speaker
Ashwin Goyal
Product Manager @

Introduction

The Application Layer is the nearest layer in the Open System Interconnection (OSI) model. This layer provides several ways to manipulate the data (information), enabling any user to access the network efficiently. This layer also requests its bottom layer, the presentation layer, to receive various types of information. The Application Layer interface directly interacts with the application and provides standard web application services. 

Refer to this link to learn more about the Application layer.

Now, we will see gate questions on the Application layer in the OSI model with their solutions and explanations.

  1. Which of the following is/are examples of stateful application layer protocols?
    1. FTP
    2. TCP
    3. POP3
    4. HTTP

    a. 1 and 4 only
    b. 2 and 4 only
    c. 1 and 3 only
    d. 3 only
    Ans: c
    Explanation: TCP is stateful as it maintains connection information across multiple transfers, but TCP is not an application layer protocol. Only FTP and POP3 are stateful application layer protocols of the given protocols. 
     
  2. Which one of the following statements is incorrect about HTTP cookies?
    a. A cookie has an expiry date and time.
    b. A cookie tracks a user's browsing pattern at a particular site.
    c. A cookie gains entry to the user's work area through an HTTP header.
    d. A cookie is a piece of code that has the potential to compromise the 
        security of an Internet user.     
    Ans: d
    Explanation: Cookies are not a piece of code. They are just strings typically in the form of key-value pairs.
     
  3. In one of the pairs of protocols specified below, both protocols can use multiple TCP connections between the same client and the server. Which one is that?
    a. HTTP, TELNET
    b. HTTP,FTP
    c. HTTP,SMTP
    d. FTP,SMTP
    Ans: b
    Explanation: HTTP may use different TCP connections for other objects of a webpage if non-persistent connections are used. FTP uses two TCP connections, one for data and another for control. TELNET and FTP can only use ONE link at a time.
     
  4. A graphical HTML browser available at a network client machine Q controls a static HTML webpage from an HTTP server S. The static HTML page has precisely one static embedded image, which is also at S. which one of the following is correct about the HTML webpage loading (including the embedded image) considering no caching?
    a. A single HTTP request from Q to S is sufficient, and a single TCP 
        the connection between Q and S is necessary for this.
    b. Q requires sending at least 2 HTTP requests to S, but a single TCP 
        connection to server S is sufficient.
    c. A unit HTTP request from Q to S is enough, and this is possible without any 
      The TCP connection between Q and S.
    d. Q requires to send at least 2 HTTP requests to S, each necessarily in a separate TCP connection to server S.
    Ans: b
    Explanation: Whenever a browser opens a webpage, it makes a separate request for each page object like image, CSS, javascript, etc. However, if multiple resources are served from the same server, then one TCP connection is sufficient.
     
  5.  For the application layer in the Internet stack, The protocol data unit (PDU) is
    a. Message
    b. Frame
    c. Datagram
    d. Segment
    Ans: a
    Explanation: In the Application Layer, the Layer 5 PDU is the data or message.
     
  6. What is the single advantage of setting up a DMZ(Demilitarized Zone) with two firewalls?
    a. You can do load balancing
    b. Improve network performance
    c. You can do stateful packet filtering
    d. You can control where traffic enters in the three networks
    Ans: d
     
  7. What is the size of the ‘total length’ field in the IPv4 datagram?
    a. 32 bit
    b. 8 bit
    c. 4 bit
    d. 16 bit
    Ans: d
    Explanation: The size of the ‘total length’ field in the IPv4 datagram is 16 bit.
     
  8. A packet-filtering firewall can
    a. disallow some files from being accessed through FTP
    b. block some hosts from accessing the network
    c. deny certain users from accessing a service
    d. block worms and viruses from entering the network
    Ans: d
    Explanation: A packet filtering firewall can block particular hosts from accessing the network.
     
  9. A web client passes a request to a web server. The web server transmits a program to that client ans is executed at the client. It creates a web document. What are such web documents called?
    a. Dynamic
    b. Passive
    c. Active
    d. Static
    Ans: c
    Explanation: Active web document contains a software program sent by a server to connect with the client and write the query of the client as an answer.
     
  10.  Among the following protocols, which one is used to transfer electronic mail messages from one machine to another?
    a. SNMP
    b. FTP
    c. SMTP
    d. TELNET
    Ans: c

We will close the article now with faqs since you get some idea of the gate questions of the Application layer.

Frequently asked questions

  1. What are application layer protocols?
    It is a collection of rules used to communicate among the systems in the network. Even though the application layer is the medium through which you can share with other users, various protocols are required to assist with this communication. For example, if you have to open a web page, you need HTTP or HTTPS protocols. Similarly, you would require POP3 or IMAP and SMTP for sending and receiving emails. 
  2. Which protocol works in the application layer?
    The Hypertext Transfer Protocol (HTTP) is the Web's primary application-layer protocol, although current browsers can access other types of servers. 
  3. Which address is used at the application layer?
    The address that is used at the application layer is called a specific address.
  4. What types of problems can occur at the application layer?
    A problem at the application layer can cause unusable or unreachable resources when the data link, physical, transport, and network layers are functional. The application cannot provide data, although it is possible to have full network connectivity.
  5. What layer is FTP?
    It is an application layer protocol specifically used to transfer text and binary files over the Internet.
Get the tech career you deserve, faster!
Connect with our expert counsellors to understand how to hack your way to success
User rating 4.7/5
1:1 doubt support
95% placement record
Akash Pal
Senior Software Engineer
326% Hike After Job Bootcamp
Himanshu Gusain
Programmer Analyst
32 LPA After Job Bootcamp
After Job
Bootcamp

Conclusion

This article extensively discussed various GATE questions on the Application layer. This article covers the solution and explanation of these GATE questions.

Refer to this link to learn more about the Application layer in detail.

We hope that this blog helped you improve your knowledge regarding the Application layer, and in case you like to learn more, check our articles in the code studio library. Do upvote our blog to help other ninjas grow. Happy Coding!

Previous article
Hamming Code in Computer Networks
Next article
SAN
Live masterclass