Discussion
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.
(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 ?
Answer: C
The order is (ii), (iv), (i), (iii).
With empty caches the browser must first resolve the server's name, so the DNS request (ii) goes out first. Knowing the IP address, it opens a TCP connection with a SYN (iv). Once the connection is established it requests the index page (i), and only after receiving and parsing that page does it learn which images to fetch and send GET requests for them (iii).
A TCP SYN cannot precede DNS resolution, because the destination IP is not yet known, which rules out the options starting with (iv). The image GET cannot precede the index GET, because the image references are found inside the index page.
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development