Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
03-29-2013, 03:18 AM
|
#1
|
LQ Newbie
Registered: Feb 2013
Posts: 20
Rep: 
|
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,
|
|
|
03-29-2013, 04:53 AM
|
#2
|
Member
Registered: May 2008
Location: France
Distribution: Ubuntu, Debian
Posts: 343
Rep:
|
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 05:01 AM.
|
|
|
03-29-2013, 04:56 AM
|
#3
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 23,700
|
name is resolved, it will be translated to an ip. ip is not resolved, ip is used to find another host.
|
|
|
03-29-2013, 06:08 AM
|
#4
|
LQ Newbie
Registered: Feb 2013
Posts: 20
Original Poster
Rep: 
|
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.
|
|
|
03-29-2013, 06:55 AM
|
#5
|
Senior Member
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,281
|
When you type IP address in browser window it will connect directly to server with this address, no DNS is used.
|
|
|
03-29-2013, 07:04 AM
|
#6
|
Member
Registered: May 2008
Location: France
Distribution: Ubuntu, Debian
Posts: 343
Rep:
|
Quote:
Originally Posted by LeHibou2
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.
|
|
|
03-29-2013, 07:09 AM
|
#7
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 23,700
|
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
|
|
|
03-29-2013, 08:21 AM
|
#8
|
LQ Newbie
Registered: Feb 2013
Posts: 20
Original Poster
Rep: 
|
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 08:22 AM.
|
|
|
03-29-2013, 08:31 AM
|
#9
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 23,700
|
why should they handle the whole internet traffic?
see here: http://www.howstuffworks.com/dns.htm
|
|
|
03-29-2013, 10:52 AM
|
#10
|
LQ Newbie
Registered: Feb 2013
Posts: 20
Original Poster
Rep: 
|
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 !
|
|
|
03-29-2013, 12:58 PM
|
#11
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 23,700
|
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").
|
|
|
03-29-2013, 03:03 PM
|
#12
|
Member
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 891
Rep: 
|
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.
|
|
|
03-29-2013, 07:23 PM
|
#13
|
Senior Member
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,805
|
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
|
|
|
03-29-2013, 10:00 PM
|
#14
|
Moderator
Registered: Mar 2008
Posts: 22,290
|
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.
|
|
|
03-29-2013, 10:49 PM
|
#15
|
Member
Registered: May 2008
Location: France
Distribution: Ubuntu, Debian
Posts: 343
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 06:21 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|