http - What happens when my browser does a search? (ARP,DNS,TCP specifics) -


i'm trying learn basics of arp/tcp/http (in sort of scatter-shot way). example, happens when go google.com , search?

my understanding far:

  • for machine communicate others (the gateway in case), may need arp broadcast (if doesn't have mac address in arp cache)

  • it needs resolve google.com's ip address. contacting dns server. (i'm not sure how knows dns server is? or gateway knows?)

  • this involves communication through tcp protocol since http built on (tcp handshake: syn, syn/ack, ack, requests content, rst, rst/ack, ack)

  • to load webpage, browser gets index.html, parses it, sends more requests based on needs? (images,etc)

  • and finally, actual google search, don't understand how browser knows communicate "i typed in search box , hit enter".

does seem right? / did wrong or leave out crucial?

firstly try understand your home router 2 devices: switch , router. enter image description here

focus on these facts:

  • the switch connects devices in lan together(including router).
  • the router merely connects switch(lan) isp(wan).
  • your lan ethernet network works mac addresses.

for machine communicate others (the gateway in case), may need arp broadcast (if doesn't have mac address in arp cache)

correct.

when want send file dekstop laptop, not want go through router. want go through switch, faster(lower layer). know ip of laptop in network. reason need mac address. that's arp kicks in.

in case broadcast arp request in lan until responds you. router or other device connected switch.

it needs resolve google.com's ip address. contacting dns server. (i'm not sure how knows dns server is? or gateway knows?)

if use dhcp, has provided ip of dns server. if not, means manually provided ip of dns. ip of dns server stored locally on computer.

making dns request putting ip in packet request , forwarding packet network.

sidenote: dhcp provides ip address of router.

this involves communication through tcp protocol since http built on (tcp handshake: syn, syn/ack, ack, requests content, rst, rst/ack, ack)

yes. clarify things: when computer sends request

frame[ip[tcp[get www.google.com]]] 

the frame being sent lan's switch forwards mac of router. router open frame check destination ip , route accordingly(in case wan). when frame arrives @ server, server open tcp segment , read payload, http message. ack/syn etc. messages being processed computer , server , not router or switch.

to load webpage, browser gets index.html, parses it, sends more requests based on needs? (images,etc)

yes. html file tree structure can have embedded resources images, javafiles, css etc. each such resource new request has sent.

once browser gets these recourses, render webpage.

and finally, actual google search, don't understand how browser knows communicate "i typed in search box , hit enter".

when type single character, being sent server. server responds suggestions. easy that.

references(good reads):


Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

c++ - Clear the memory after returning a vector in a function -

erlang - Saving a digraph to mnesia is hindered because of its side-effects -