[Ilugc] [OT] how does a Browser work?

  • From: peevee.chaitanya@xxxxxxxxx (peevee)
  • Date: Mon Apr 25 18:12:29 2005

Binand Sethumadhavan wrote:

On 25/04/05, peevee <peevee.chaitanya@xxxxxxxxx> wrote:
 

can anyone tell me how a browser typically works....
I mean, when i type a web address, how or where does it resolve the ip
for that name,
how does it know which server to contact for resolving it first??
later i know that the dns is resolved and the packets reaches the
respective server, and response comes accodingly,
all i want to know is , the initial part..
   


Not just a browser, but any network-aware software does the initial
part similarly.

Every TCP/IP "stack" has a subsystem called a resolver - your browser
typically starts by asking the resolver to resolve a name into an IP
address. The resolver consults a configuration file - /etc/resolv.conf
on Unix - and asks the nameservers listed there (which is typically
the IP address(es) of the nearest DNS cache) to resolve the name for
 

initially where does it get this nearest DNS cache from??



it. The DNS cache performs a complex recursive lookup procedure, and
extracts the IP address associated with the name, caches the result
and tells your resolver what it got. The resolver in turn tells your
application the IP address. Then the browser switches its attention to
the socket subsystem of TCP/IP and tries to open a connection to the
IP address it got thus.

It is in reality somewhat more complicated (especially on Linux,
Solaris etc.), because another layer of abstraction exists between the
resolver and the application called Name Services. Depending on the
configuration in /etc/nsswitch.conf, this layer decides whether to
contact the resolver, the NIS database or simply your /etc/hosts to
figure out what IP address is associated with a given name.

Binand
_______________________________________________
To unsubscribe, email ilugc-request@xxxxxxxxxxxxx with 
"unsubscribe <password> <address>"
in the subject or body of the message.  
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc

 


Other related posts: