Application Layer


1
Question 1
The protocol data unit (PDU) for the application layer in the Internet stack is
A
Segment
B
Datagram
C
Message
D
Frame
GATE CS 2012    Application Layer    
Discuss it


Question 1 Explanation: 
The Protocol Data Unit  is the unit of communication at a particular layer.
 The Layer 1 (Physical Layer) PDU is the bit or, more generally, symbol 
 The Layer 2 (Data Link Layer) PDU is the frame.
 The Layer 3 (Network Layer) PDU is the packet.
 The Layer 4 (Transport Layer) PDU is the segment
              for TCP or the datagram for UDP.
 The Layer 5 (Application Layer) PDU is the data or message.
Question 2
Consider different activities related to email.
m1: Send an email from a mail client to a mail server
m2: Download an email from mailbox server to a mail client
m3: Checking email in a web browser
Which is the application level protocol used in each activity? 
A
ml: HTTP m2: SMTP m3: POP
B
ml: SMTP m2: FTP m3: HTTP
C
ml: SMTP m2: POP m3: HTTP
D
ml: POP m2: SMTP m3: IMAP
GATE CS 2011    Application Layer    
Discuss it


Question 2 Explanation: 
Simple Mail Transfer Protocol (SMTP) is typically used by user clients for sending mails. Post Office Protocol (POP) is used by clients for receiving mails. Checking mails in web browser is a simple HTTP process.
Question 3
What is the maximum size of data that the application layer can pass on to the TCP layer below?
A
Any size
B
216 bytes - size of TCP header
C
216 bytes
D
1500 bytes
Application Layer    GATE CS 2008    
Discuss it


Question 3 Explanation: 
The default TCP Maximum Segment Size is 536. Where a host wishes to set the maximum segment size to a value other than the default, the maximum segment size is specified as a TCP option, initially in the TCP SYN packet during the TCP handshake. Because the maximum segment size parameter is controlled by a TCP option, a host can change the value in any later segment. Source: http://en.wikipedia.org/wiki/Maximum_segment_size
Question 4
Identify the correct order in which the following actions take place in an interaction between a web browser and a web server.
1. The web browser requests a webpage using HTTP.
2. The web browser establishes a TCP connection 
   with the web server.
3. The web server sends the requested webpage 
   using HTTP.
4. The web browser resolves the domain name 
   using DNS.
A
4,2,1,3
B
1,2,3,4
C
4,1,2,3
D
2,4,1,3
Application Layer    GATE-CS-2014-(Set-1)    
Discuss it


Question 4 Explanation: 
The web browser first need to figure out IP address of site from url using DNS, then establishes a TCP connection, typically at port 80. Once the TCP connection is established, the browser sends a HTTP request using GET. Finally web server responds with HTTP response.
Question 5
A graphical HTML browser resident at a network client machine Q accesses a static HTML webpage from a HTTP server S. The static HTML page has exactly one static embedded image which is also at S. Assuming no caching, which one of the following is correct about the HTML webpage loading (including the embedded image)?
A
Q needs to send at least 2 HTTP requests to S, each necessarily in a separate TCP connection to server S
B
Q needs to send at least 2 HTTP requests to S, but a single TCP connection to server S is sufficient
C
A single HTTP request from Q to S is sufficient, and a single TCP connection between Q and S is necessary for this
D
A single HTTP request from Q to S is sufficient, and this is possible without any TCP connection between Q and S
Application Layer    GATE-CS-2014-(Set-2)    
Discuss it


Question 5 Explanation: 
Whenever a browser opens a webpage, it makes a separate request for each object of page like image, css, javascript, etc. However if multiple resources are served from same server, then one TCP connect is sufficient.
Question 6
In one of the pairs of protocols given below, both the protocols can use multiple TCP connections between the same client and the server. Which one is that?
A
HTTP, FTP
B
HTTP, TELNET
C
FTP, SMTP
D
HTTP, SMTP
Application Layer    GATE-CS-2015 (Set 1)    
Discuss it


Question 6 Explanation: 
HTTP may use different TCP connection for different objects of a webpage if non-persistent connections are used. FTP uses two TCP connections, one for data and another control. TELNET and FTP can only use ONE connection at a time.
Question 7
Which one of the following statements is NOT correct about HTTP cookies?
A
A cookies is a piece of code that has the potential to compromise the security of an Internet user
B
A cookie gains entry to the user’s work area through an HTTP header
C
A cookie has an expiry date and time
D
Cookies can be used to track the browsing pattern of a user at a particular site
Application Layer    GATE-CS-2015 (Set 2)    
Discuss it


Question 7 Explanation: 
Cookies are not piece of code, they are just strings typically in the form of key value pairs.
Question 8
Consider the following statements: I. telnet, ftp and http are application layer protocols. II.l EJB (Enterprise Java Beans) components can be deployed in a J2EE (Java2 Enterprise Edition) application server. III. If two languages conform to the Common Language Specification (CLS) of the Microsoft.NET framework, then a class defined in any one of them may be inherited in the other. Which statements are true?  
A
l and II only
B
II and III only
C
l and III only
D
I, II and III
Application Layer    GATE-IT-2004    
Discuss it


Question 8 Explanation: 
If two languages conform to the Common Language Specification (CLS) of the Microsoft.NET framework ,then there are certain compliance rules which may be used for inheritance. Other statements are true.So,A is the Answer
Question 9
Which of the following is/are example(s) of stateful application layer protocols?
(i)  HTTP
(ii) FTP
(iii) TCP
(iv) POP3 
A
(i) and (ii) only
B
(ii) and (iii) only
C
(ii) and (iv) only
D
(iv) only
Application Layer    GATE-CS-2016 (Set 1)    
Discuss it


Question 9 Explanation: 
In computing, a stateless protocol is a communications protocol that treats each request as an independent transaction that is unrelated to any previous request so that the communication consists of independent pairs of request and response. Examples of stateless protocols (IP) and (HTTP) Source: https://en.wikipedia.org/wiki/Stateless_protocol TCP is stateful as it maintains connection information across multiple transfers, but TCP is not an application layer protocol. Of the given protocols, only FTP and POP3 are stateful application layer protocols.  
There are 9 questions to complete.
1

Company Wise Coding Practice    Topic Wise Coding Practice