Tuesday 21 February 2017

What happens when you ping a website

Take a scenario, where a user pings the website www.abc.com from a PC. On the PC screen from where the ping is issued, the reply is from an IP address and not from the website name www.abc.com. Network communications are based on IP addresses and not domain names. When the command ping www.abc.com is typed, a DNS query is send by the PC to the DNS server IP address which is configured on the TCP/IP adapter settings of the PC, to retrieve the IP address of www.abc.com. After the IP address is received, the ICMP request (Ping request) is sent to the IP address of the website to which the server sends a reply.

How will a request send by http browser from workstation to any website goes through router and come back to workstation and open web page. Explain how packets travel in term of ip protocols. ?

Once a web site is entered in the address bar and enter key pressed the following process happens.



1.    The system performs a check on the dns cache to check if there is any entry for the concerned domain name if yes goes to Step 3.
2.    The system performs a dns query for converting the domain name into ip by sending a query to the DNS server.
3.    Once a dns response for the query is received the initiates a 3 way handshake with destination ip on port 80 or 443.
4.    Client sends a sync to server, server sends a sync+ack to client. the client sends a ack to sync from the server.
5.    Once a 3 way hand shake is completed the browser presents the request to server.
6.    Based on the received request the server responds with requested file/data.

7.    Once the transmitting of data is completed the server sends a fin packet, then client sends a fin packet and connection gets terminated.


2 comments:

Note: only a member of this blog may post a comment.