As some one mentioned in other forum that interviewer has asked the question given below.
I dont know exact answer but I would say HTTP request ? Any suggestion and explainations
Imagine a user sitting at an Ethernet-connected PC. He has a browser open. He types “www.google.com” in the address bar and hits enter.
Now tell me what the first packet to appear on the Ethernet is .
Thanks
There’s no guaranteed always-correct answer, but there are a few likely possibilities.
If the client is configured for DNS over UDP, then the first packet will be a UDP datagram containing a DNS query to resolve
www.google.comto an IP address.If the client is configured for DNS over TCP and the browser hasn’t already got an established TCP connection to the DNS server, the first packet will be part of the connection handshake to DNS, and therefore the answer will be that a
SYNpacket is first out of the gate.If the browser has been coded to maintain a long-lived TCP connection to the DNS server and assuming the DNS server has allowed the connection to stay alive, the first packet will be a DNS query, sent across the existing connection to that DNS server.
Finally, if the browser had recently visited
www.google.comrecently and is built to do some smart local caching of DNS query results then the first packet will be a SYN to establish a new connection to Google’s web server.If you want to be glib but absolutely precise about it, drop down a layer for your answer and say, “The first packet out will be an Ethernet frame containing a payload which supports whatever higher-level protocol is needed for the browser to serve up http://www.google.com“. In fairness, the question is about the Ethernet layer…