Q1: A user starts browsing a webpage hosted at a remote server. The browser opens a single TCP connection to fetch the entire webpage from the server. The webpage consists of a top-level index page with multiple embedded image objects. Assume that all caches (e.g., DNS cache, browser cache) are all initially empty. The following packets leave the user's computer in some order. (2024 SET 1)
(i) HTTP GET request for the index page
(ii) DNS request to resolve the web server's name to its IP address
(iii) HTTP GET request for an image object
(iv) TCP SYN to open a connection to the web server
Which one of the following is the CORRECT chronological order (earliest in time to latest) of the packets leaving the computer ?
(a) (iv), (ii), (iii), (i)
(b) (ii), (iv), (iii), (i)
(c) (ii), (iv), (i), (iii)
(d) (iv), (ii), (i), (iii)
Ans: (c)
Sol: The standard sequence of operations when trying to reach a server are as follows.
Option C would be the best fit for the discussed sequence
Q2: Suppose in a web browser, you click on the www.gate-2023.in URL. The browser cache is empty. The IP address for this URL is not cached in your local host, so a DNS lookup is triggered (by the local DNS server deployed on your local host) over the 3-tier DNS hierarchy in an iterative mode. No resource records are cached anywhere across all DNS servers. (2023)
Let RTT denote the round trip time between your local host and DNS servers in the DNS hierarchy. The round trip time between the local host and the web server hosting www.gate-2023.in is also equal to RTT. The HTML file associated with the URL is small enough to have negligible transmission time and negligible rendering time by your web browser, which references 10 equally small objects on the same web server.
Which of the following statements is/are CORRECT about the minimum elapsed time between clicking on the URL and your browser fully rendering it?
(a) 7 RTTs, in case of non-persistent HTTP with 5 parallel TCP connections.
(b) 5 RTTs, in case of persistent HTTP with pipelining.
(c) 9 RTTs, in case of non-persistent HTTP with 5 parallel TCP connections.
(d) 6 RTTs, in case of persistent HTTP with pipelining.
Ans: (c, d)
Sol: Case I :
Persistent HTTP : TCP connection is established once and multiple files are transmitted in single connection.
Pipelined : New HTTP request can be sent to server without receiving acknowledgement of previous. Say a client
Alfiya request a page from server, following steps are followed in order before Alfiya gets all data needed :
(i) There's 3-tier DNS hierarchy, 100 kup is done in iterative mode taking 3 RTT.
(ii) 1 RTT is used for TCP connection establishment.
(iii) 1 RTT is used to fetch HTML base file.
(iv) 1 RTT is for all other 10 objects.
So, n total 6 RTT's are used.
Case-II : Non persistent HTTP with 5 parallel connections :
Non persistent : TCP connection is made for each HTTP request and closed.
5-prallel connections : 5 objects could be sent parallel at same time.
So, in this case the client Alfiya have to wait for request to be fulfilled as following steps need to be completed.
(i) 3 RTT for DNS resolution.
(ii) 1 RTT for TCP connection establishment.
(iii) 1 RTT for fetch base HTML page.
(iv) 1 RTT for TCP connection establishment.
(v) 1 RTT to get 5 objects parallely (5 still test)
(vi) 1 RTT for TCP connection establishment
(viii) 1 RTT for getting remaining 5 objects.
In total it takes RTT's.
Hence, the correct options are (C) & (D).
Q3: Consider the resolution of the domain name www. gate . org. in by a DNS resolver. Assume that no resource records are cached anywhere across the DNS servers and that iterative query mechanism is used in the resolution. The number of DNS query-response pairs involved in completely resolving the domain name is . (2022)
(a) 2
(b) 3
(c) 4
(d) 5
Ans: (c)
Q4: Assume that you have made a request for a web page through your web browser to a web server. Initially the browser cache is empty. Further, the browser is configured to send HTTP requests in non-persistent mode. The web page contains text and five very small images .The minimum number of TCP connections required to display the web page completely in your browser is__________. (2020)
(a) 1
(b) 6
(c) 5
(d) 2
Ans: (b)
Sol: In HTTP non-persistent connection, each time a request is served by the server, the connection is automatically closed by the server.
So we need 1 connection for web page and 5 for images. Thus, in total we need 6TCPconnections to fetch web page completely.
Answer: 6
Q5: Which of the following protocol pairs can be used to send and retrieve e-mails (in that order)? (2019)
(a) IMAP POP3
(b) SMTP, POP3
(c) SMTP, MIME
(d) IMAP, SMTP
Ans: (b)
Sol: Simple Mail Transfer Protocol (SMTP) is the standard protocol for sending emails across the Internet.
IMAP and POP3 are the Internet mail protocols used for retrieving emails.
MIME allows the users to exchange different (non-ASCII) kinds of data files in an email : audio, video, images, etc
So from the given options, option B is the correct one i.e. SMTP to send e-mail and POP3 to retrieve e-mail.
Q6: Identify the correct sequence in which the following packets are transmitted on the network by a host when a browser requests a webpage from a remote server, assuming that the host has just been restarted. (2016 SET 2)
(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
Ans: (c)
Sol: During packet transmission, first step is to make the DNS query.
Whenever client makes a query, server identify the DNS. DNS (domain name server) query is used to identify the address of DNS.
After this, a TCP connection is to be established for further communication. TCP connection will be established by sending TCP SYN message.
After connection establishment, HTTP GET request to the server to retrieve the webpage it should display. After the server has sent the response, it closes the TCP connection.
Q7: Which of the following is/are example(s) of stateful application layer protocols? (2016 SET 1)
(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
Ans: (c)
Sol: Stateless protocol is a communications protocol in which no information is retained by either sender or receiver.(Note:The remembered information is called as the state)
HTTP(Stateless | Application Layer | Uses TCP (80)) - No information is maintained. If in some case state maintenance is required then cookies are used. Now HTTPS is HTTP over a secure connection So it is also stateless.
FTP (Stateful | Application Layer | Uses TCP (20 and 21)) server that conducts an interactive session with the user. During the session, a user is provided a means to be authenticated and set various variables (working directory, transfer mode), all stored on the server as part of the user's state.
TCP (Stateful / Transport Layer) various information related to connection is maintained.
BGP (Stateful / Application Layer / Uses TCP ) Finite state Automata is used to describe the state.
POP3 (Stateful / Application Layer / Uses TCP(110))
In General if some authorization is required then stateful design is used.
Q8: Which one of the following statements is NOT correct about HTTP cookies? (2015 SET 2)
(a) A cookie 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
Ans: (a)
Sol: Cookies are not piece of code, they are just strings typically in the form of key value pairs.
Q9: 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? (2015 SET 1)
(a) HTTP, FTP
(b) HTTP, TELNET
(c) FTP, SMTP
(d) HTTP, SMTP
Ans: (a)
Sol: HTTP: Multiple TCP connections can be used at client and server end.
FTP: For FTP also multiple connections can be used at the same time.
TELENT: Only one TCP connection is allowed at a time.
SMTP: SMTP also allows only one TCP connection at a time.
Q10: 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)? (2014 SET 2)
(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
Ans: (b)
Sol: Firstly, Q makes a TCP connection with S.
After that, it sends the first request for the webpage. When it is received, it sees that there is also an image which needs to be picked up, so it makes another request to S for the image.
Then it may close the TCP connection.
This is how it is done if we are using HTTP version 1.1( which is always used now). One connection, also called HTTP persistent connection, is enough to make several requests on the same server.
So, the answer is B.
Q11: Identify the correct order in which the following actions take place in an interaction between a web browser and a web server. (2014 SET 1)
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
Ans: (a)
Sol: 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.
Q12: The protocol data unit (PDU) for the application layer in the Internet stack is (2012)
(a) Segment
(b) Datagram
(c) Message
(d) Frame
Ans: (c)
Sol: For Application, Presentation and Session layers, the PDU is message
For Transport layer, PDU is segment for TCP and datagram for UDP
For Network layer, PDU is packet
For Datalink layer, PDU is frames
For physical layer, PDU is stream of bits
Q13: HTML (Hyper Text Markup Language) has language elements which permit certain actions other than describing the structure of the web document. Which one of the following actions is NOT supported by pure HTML (without any server or client side scripting) pages? (2011)
(a) Embed web objects from different sites into the same page
(b) Refresh the page automatically after a specified interval
(c) Automatically redirect to another page upon download
(d) Display the client time as part of the page
Ans: (d)
Sol: I think D is the correct answer, to display the system time help of any scripting language like Java Script, Jscript etc.. is required that can not be done using pure HTML.
Q14: Consider different activities related to email. (2011)
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) 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
Ans: (c)
Sol: Sender/Client send mail from client mailbox to server mail box with the help of SMTP protocol whereas Receiver or Server retrieve the mail from its mail box to reading using POP3 protocol.
When we want to take the help of process to see email in browser in that case we use HTTP . Because It creates beautiful page of mailbox with the help of process.
Q15: Which one of the following is not a client server application? (2010)
(a) Internet chat
(b) Web browsing
(c) E-mail
(d) Ping
Ans: (d)
Sol: (A) Typical internet chat is a client/server app, since a client makes a connection to a central server and receives update. There are some chat systems that work on a P2P model.
(B) Web browsing is client/server, where a browser is the client and the web page is served up by a server.
(C) E-mail is typically thought of as a client/server app, although hops will be made between POP servers.
(D) Ping uses ICMP protocol, and a ping client sends a request to a destination and gets back a response. It is a connection testing tool.
So, D is the answer
Powered by Froala Editor
21 videos|113 docs|66 tests
|
1. What are some common examples of application layer protocols? |
2. How does HTTP work in the application layer? |
3. What is the purpose of SMTP in the application layer? |
4. How does DNS function in the application layer? |
5. What role does FTP play in the application layer? |
|
Explore Courses for Computer Science Engineering (CSE) exam
|