LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 03-29-2013, 02:18 AM   #1
LeHibou2
LQ Newbie
 
Registered: Feb 2013
Posts: 20

Rep: Reputation: Disabled
Theory - Resolving ip address


Hi !

I would like to know how exactly my browser knows how to resolve an ip address when I type it directly in my browser.

I know about dns with name resolution, but what if I type xxx.xxx.xxx.xxx ?

I cannot understand what is the followed path to the final server in this precise case.
Doubt that it reaches zny dns server before being redirected, since it is not a name resolution but directly an ip resolution..


Any help ?

Thanks,
 
Old 03-29-2013, 03:53 AM   #2
manu-tm
Member
 
Registered: May 2008
Location: France
Distribution: Ubuntu, Debian
Posts: 239

Rep: Reputation: 23
Only domain names are resolved to IP addresses, not IP addresses themselves. But I'm afraid your question is not specific enough to be answered concisely here (IMO). And there are loads of online doc about this subject:
https://en.wikipedia.org/wiki/IP_address

Then, with more precise questions, you will probably get better answers.

Last edited by manu-tm; 03-29-2013 at 04:01 AM.
 
Old 03-29-2013, 03:56 AM   #3
pan64
Senior Member
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 4,609

Rep: Reputation: 1244Reputation: 1244Reputation: 1244Reputation: 1244Reputation: 1244Reputation: 1244Reputation: 1244Reputation: 1244Reputation: 1244
name is resolved, it will be translated to an ip. ip is not resolved, ip is used to find another host.
 
Old 03-29-2013, 05:08 AM   #4
LeHibou2
LQ Newbie
 
Registered: Feb 2013
Posts: 20

Original Poster
Rep: Reputation: Disabled
Hi !

When i type http://xxx.xxx.xxx.xxx -> it goes on the root dns, then back to my registrar/hosting provider which has the ip and gives the right to go on my website which has a dedicated ip.

But, how can root-dns be aware of where to look at to find the ip ?? There are so many hosting providers !

That is my question. I think we are at the root of the internet with this one.

To clarify : it is to understand, I know everybody use dns, but I need to understand.
 
Old 03-29-2013, 05:55 AM   #5
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,211

Rep: Reputation: 306Reputation: 306Reputation: 306Reputation: 306
When you type IP address in browser window it will connect directly to server with this address, no DNS is used.
 
Old 03-29-2013, 06:04 AM   #6
manu-tm
Member
 
Registered: May 2008
Location: France
Distribution: Ubuntu, Debian
Posts: 239

Rep: Reputation: 23
Quote:
Originally Posted by LeHibou2 View Post
But, how can root-dns be aware of where to look at to find the ip ?? There are so many hosting providers !
By querying databases they manage / maintain.
 
Old 03-29-2013, 06:09 AM   #7
pan64
Senior Member
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 4,609

Rep: Reputation: 1244Reputation: 1244Reputation: 1244Reputation: 1244Reputation: 1244Reputation: 1244Reputation: 1244Reputation: 1244Reputation: 1244
DNS does not care about that. the routing table will tell the host where to look for that given ip.
see here: http://www.cisco.com/univercd/cc/td/...pc_r/48383.htm
 
Old 03-29-2013, 07:21 AM   #8
LeHibou2
LQ Newbie
 
Registered: Feb 2013
Posts: 20

Original Poster
Rep: Reputation: Disabled
Thanks,

But I just cannot imagine that the root servers do requests/memcache request for all the ip's.

What kind of datacenters would it be ?

Bunch of ram ??

Please excuse me for being a numb, but I just open the eyes.

According to some sources, we talk about 13 clusters of 345 machines overall to handle the whole internet traffic.

The ram needed would not fit in 345 machines. Should we understand that each machine is a memcache shard for each cluster ? and that every cluster has the same datas ?
Then we would have problems with wan, so it is not possible.

Meaning that the informations are replicated 12 other times since every request might not hit the same root server ?

Thanks,

Last edited by LeHibou2; 03-29-2013 at 07:22 AM.
 
Old 03-29-2013, 07:31 AM   #9
pan64
Senior Member
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 4,609

Rep: Reputation: 1244Reputation: 1244Reputation: 1244Reputation: 1244Reputation: 1244Reputation: 1244Reputation: 1244Reputation: 1244Reputation: 1244
why should they handle the whole internet traffic?
see here: http://www.howstuffworks.com/dns.htm
 
Old 03-29-2013, 09:52 AM   #10
LeHibou2
LQ Newbie
 
Registered: Feb 2013
Posts: 20

Original Poster
Rep: Reputation: Disabled
Thanks,

I read in an article this point. It was wrong.

Quote:
DNS servers that perform the first task are normally managed by your Internet service provider (ISP). As mentioned earlier, the ISP's DNS server is part of the network configuration you get from DHCP as soon as you go online. These servers reside in your ISP's data centers, and they handle requests as follows:

If it has the domain name and IP address in its database, it resolves the name itself.
If it doesn't have the domain name and IP address in its database, it contacts another DNS server on the Internet. It may have to do this multiple times.
If it has to contact another DNS server, it caches the lookup results for a limited time so it can quickly resolve subsequent requests to the same domain name.
If it has no luck finding the domain name after a reasonable search, it returns an error indicating that the name is invalid or doesn't exist.
So :
1)
A is asking for my website.
Either he types www.example.com, then his request will go to his isp then, the isp will ask another dns server.
Or he types my ip address (not likely) and skip the dns step, and, if my ip is dedicated, lands on my website.

Like I said, there are multiple (thousands ? millions?) dns servers. Assuming the requests are really fast between servers, it would still take really long time to get the answer the first time.

Should be -much- more than a minute ?!

2)
In case I run my dns server (SOA) on a new website, the very first time someone looks for my website, his isp will contact many dns hosters/registrars and ask for my dns. My registrar/dns host advertises me, telling the world that my dns is no more hosted by them, but at my nameserver that I put in ns1 ns2. Right ?

Many thanks !
 
Old 03-29-2013, 11:58 AM   #11
pan64
Senior Member
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 4,609

Rep: Reputation: 1244Reputation: 1244Reputation: 1244Reputation: 1244Reputation: 1244Reputation: 1244Reputation: 1244Reputation: 1244Reputation: 1244
1. you can see, it takes less than a second (in general, but sometimes more)
2. not really, your name is registered by your ISP, his DNS will serve your IP. You do not need to have DNS. Also your own DNS will not recognised at all (only if it was registered as "official").
 
Old 03-29-2013, 02:03 PM   #12
baldy3105
Member
 
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 876

Rep: Reputation: 184Reputation: 184
The browser itself recognises valid IP addresses. When it see's one in the URL it does not bother to do a DNS lookup, or in fact what would technicaly be a reverse DNS lookup. The browser goes direct to the IP.

i.e. my router is 192.168.1.1. HTTP://192.168.1.1/admin takes me to the admin page.

HTTP://192.168,1.1 gives me a DNS error as it is not a valid IP therefore the browser has attempted to resolve it.
 
Old 03-29-2013, 06:23 PM   #13
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 1,419

Rep: Reputation: 595Reputation: 595Reputation: 595Reputation: 595Reputation: 595Reputation: 595
DNS just translates names to numeric IP addresses. Once you've got that number, DNS, just like a phone book, is out of the picture. When you give your browser a valid dotted quad IP address or anything else that can represent a 32-bit (for IPv4) number, it just puts that number into the destination address field of the IP packet and doesn't use DNS at all.

The following are all equivalent:
Code:
http://192.168.1.1
http://3232235777
http://0xc0a80101
 
Old 03-29-2013, 09:00 PM   #14
jefro
Guru
 
Registered: Mar 2008
Posts: 11,342

Rep: Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386
The actual order is to look at browsers settings, might be some unique setting like pac file, then hosts file lookup, then it goes out to dns.
 
Old 03-29-2013, 09:49 PM   #15
manu-tm
Member
 
Registered: May 2008
Location: France
Distribution: Ubuntu, Debian
Posts: 239

Rep: Reputation: 23
It's implemented at browser level by calling getaddrinfo() which takes care of domain names / IP addresses, before opening a socket to 'talk' to the server.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple way needed of resolving any name to the same address Mike Davies Linux - Networking 2 02-29-2012 12:31 PM
Resolving Host name to IP address. gardenair Fedora 1 01-25-2011 01:38 AM
sarg and resolving an IP address to a Hostname Wynand1 Linux - Networking 3 05-10-2006 05:00 AM
How to make an interface use a certain dns address for it's name resolving? Infernal211283 MEPIS 1 12-11-2005 02:44 AM
DHCP server not resolving address netguy2000 Linux - Networking 6 10-07-2004 04:19 AM


All times are GMT -5. The time now is 03:20 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration