computer networks gate questions
computer networks gate questions

GATE Questions – Application Layer

Computer Networks GATE Questions – Application Layer

Computer Networks GATE Questions based on Application Layer are discussed here in this tutorial. These Application Layer Questions are asked in previous year GATE exam.

These questions will be beneficial for GATE aspirants in understanding the pattern and level of GATE exam. Students are kindly requested to practice these questions very well.

Q1. Which among the following is correct matching      GATE 2007

(M) SMTP                  (1) Application layer

(N) BGP                     (2) Transport layer

(O) TCP                     (3) Data link layer

(P) PPP                      (4) Network layer

                                  (5) Physical layer

(A) M – 2  N – 1 O– 3 P– 5

(B) M– 1 N – 4  O – 2 P – 3

(C) M – 1 N– 4 O – 2 P – 5

(D) M – 2 N – 4 O – 1 P– 3

Answer : Option B is Correct

Explanation

SMTP is simple mail transfer protocol and it is a application layer protocol.

BGP is Border Gateway Protocol used in Routing hence belong to network layer.

TCP is Connection Oriented Transmission Control Protocol used at Transport layer.

PPP is Point to Point Link  Protocol used at Data Link Layer.

Q 2. Consider the RSA encryption system. If  the value of the public modulus parameter n is given 3007. And value of  φ(n) = 2880, where φ( ) denotes Euler’s Totient Function, then  what will be the prime factor having value greater than 50 ?   GATE 2009

(A) 97

(B) 31

(C) 37

(D) 91

Answer : Correct Option is A

Explanation

Consider P and q two prime number that generate modulus parameter n in RSA algorithm.

So we can write

n = p*q

p*q=3007

φ(n) =(p-1)*(q-1)

2880= p*q-p-q+1

2880=3007-p-q+1

p+ q =128

p+3007/p=128

by solving this equation we will get p= 31 or p=97

So if P is 31 then q will be 97 , since 97 is greater than 50 as per given in question so 97 is right answer.

Q3. Which among the following is  maximum size of data passed by application layer on TCP ? GATE 2008

(A) Any size

(B) 2^16 bytes-size of TCP header

(C) 2^16 bytes

(D) 1500 bytes

Answer : Option A is Correct

Explanation

Default TCP maximum segment size is 536 but since maximum segment size parameter is controlled by a TCP option, so a host can change the value in any later segment.

Q4. A HTML supportive browser on network client machine Q accesses a static HTML webpage from a HTTP server S.  If there is exactly one image in a static HTML page and which is also at server  S.  Which among the following is correct option ? if there is no caching. GATE 2014

(A) Q have to send at least 2 HTTP requests to S by a individual TCP connection.

(B) Q have to send at least 2 HTTP requests to S, but only using a single TCP connection to server S is enough.

(C) Only a single HTTP request from Q to S is sufficient, and a single TCP connection between Q and S is necessary for this task.

(D) A single HTTP request from Q to S is sufficient, and this task can be done  without any TCP connection between Q and S

Q5. UDP is used By ? GATE 2007

(A) HTTP

(B) Telnet

(C) DNS

(D) SMTP

Answer : Option C is Right

Explanation

DNS use UDP in Naming System

Q6. Which among the following is correct about a Layer 4 Firewall ?. GATE 2011

(A) It Can not block HTTP traffic during 9:00PM and 5:00AM

(B) It Can Not  block all ICMP traffic

(C) It can not stop incoming traffic from a specific IP address but allow outgoing traffic to same IP

(D) It Can not block TCP traffic from a specific user on a specific IP address on multi-user system during 9:00PM and 5:00AM

Answer (A)

Explanation

Layer 4 firewall belong to Transport layer.L4 Firewalls or layer 4 firewall has the ability to actively track network connections, and allow/deny traffic based on the state of those sessions (that is, stateful packet inspection).

and since HTTP is an application layer protocol( Layer 5). Since firewall is at layer 4, it cannot block HTTP data.

Q7. Consider the following activities from m1 to m3 related to email. GATE 2011

m1:Sending an email from a mail client to mail server

m2:Downloading an email from mailbox server to a mail client

m3:Checking email in a web browser

Find the correct match for the Protocol used for each activity.

(A) m1:HTTP, m2:SMTP, m3:POP

(B) m1:SMTP, m2:FTP, m3:HTTP

(C) m1:SMTP, m2:POP, m3:HTTP

(D) m1:POP, m2:SMTP, m3:IMAP

Answer : Option C is right.

Explanation

SMTP is used to send the email.

Post Office Protocol (POP) is used by clients to receive mails.

Checking mails in web browser is a an HTTP process

Q8 . If a browser send a request to remote server to access a web page then  Which among the following is the correct sequence to send the packet over the network from a host. Assume that the host has just restarted. GATE 2016

(A) HTTP GET request, DNS query, TCP SYN

(B) DNS query, HTTP GET request, TCP SYN

(C) DNS query, TCP SYN, HTTP GET request

(D) TCP SYN, DNS query, HTTP GET request

Answer : Option C is right.

Explanation

Whole process is explained here

In the start When the client request for a webpage, the query is made in the form domain name like www.google.com then at first DNS find the IP Address corresponds to this
domain.

After that DNS server is located a TCP connection is to be established for the further communication. To establish the TCP Connection TCP protocol send q message TCP SYN

when server received this request then it responded by sending a SYN_ ACK message to client and then ACK back to server from client. This is similar to 3 way handshaking protocol.

Once the connection has been established then after that HTTP protocol comes into picture.

It requests for the webpage using its GET method and thus, sending an HTTP GET request.

So we can say that correct sequence for the transmission of packets is

DNS query, TCP SYN, HTTP GET request.

Q9. If there are n person then how much key will be required to make communication among each other in Symmetric and Public Key encryption Environment respectively. GATE 2008

(A) n(n-1) and 2n

(B) 2n and ((n(n – 1))/2)

(C) ((n(n – 1))/2) and 2n

(D) ((n(n – 1))/2) and n

Answer: Option C is Right

Explanation

In case of private key or secret key cryptography for communication between each pair of individuals secret key will be required,
so if an individual wants to communicate with other remaining n-1 individuals he should have n-1 secret keys.

So, total number of secret keys in private encryption will be

=n×(n−1) (If we include copies) or n×(n−1)/2 (distinct keys).

For public key encryption each individual needs to have a public and private key,
so the total keys required in 2×n.

Q10.  Consider the these two statements

  1. A hash function is an injective function.
  2. encryption technique such as DES performs a permutation on the elements of its input alphabet. Which option is correct regarding above.. GATE 2008

(A) Both are false

(B) Statement (i) is true and the other is false

(C) Statement (ii) is true and the other is false

(D) Both are true

Answer : Option C is Right

Explanation

Since we know that a hash function H(X) is mapped from a larger set to a predefined output set

For example, let H(X) = (X)%5

The above function H(X) is not injective because

Let X1 = 10, X2 = 15

H(10) = H(15) = 0

As the output of H(X1) = H(X2)

where X1 and X2 are not same.

It means for different value of X , we are getting Same Image in output

So H(X) is many-to-one function.

First statement is not true.

Conclusion and Summary

We have discussed the Computer Networks GATE Questions based on Application Layer in this tutorial. I hope that these questions will be beneficial for Computer Science Students and GATE 2022 Aspirants.

Good Luck !

Leave a Reply

Your email address will not be published. Required fields are marked *