Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes Sockets and Internet Protocols and the fly likes Re : where is name resolution part Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Re : where is name resolution part" Watch "Re : where is name resolution part" New topic

Re : where is name resolution part

selva graj

Joined: Jun 30, 2005
Posts: 5
when we put some url in web client it has to do name resolution where it takes plce.. Is it in web client(ex. IE or netscape)
Frank Carver

Joined: Jan 07, 1999
Posts: 6920
If you mean how does your browser know where to look for a particular site, the answer is a protocol called DNS.
In a typical URL like
the process goes as follows:
1. your browser strips off the protocol information and local file details, leaving just the machine name (
2. your browser requests a connection to that machine from your local tcp/ip stack.
3. the tcp/ip stack first checks to see if it knows the IP address of that machine already. If it does, it gives it back to the browser.
4. if the stack doesn't know the address already it locates the IP address of its primary DNS server and asks that machine using the DNS protocol. If that machine knows, it returns the IP address, if not, it forwards it to it's primary DNS server and so on. If the name exists, it should eventually be found, and the IP address will be returned to the browser.
5. Once the browser has an IP address for the destination machine, it can open a socket and make HTTP requests etc.
From the above I hope you can see that if the local machine doesn't know many IP addresses, it can be quite a lot of network traffic to find out about a named host machine. This is what is happening when your browser status line says something like "looking up host". For performance reasons, most machines cache the results of DNS lookups, to resuce the amount of times they have to go through the whole DNS process.

Read about me at ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
I agree. Here's the link:
subject: Re : where is name resolution part
jQuery in Action, 3rd edition