This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

DNS lookup

Old posts that have not been replied to for several years.
Locked
J
JingYou
Halfop
Posts: 58
Joined: Tue Oct 16, 2001 8:00 pm
Location: Singapore
Contact:

Post by JingYou »

When doing a DNS lookup, is it something like ping or something which actually makes the computer replies its DNS/IP ?
P
Petersen
Owner
Posts: 685
Joined: Thu Sep 27, 2001 8:00 pm
Location: Blackpool, UK

Post by Petersen »

No. (well technically the answer is 'maybe' but this is only a side effect of the real reason).

DNS was implemented many years ago on the original ARPA network to make it easier for humans to read (and remember) IP addresses. It functions as basically 1 huge distributed database. If your computer wants to query the address of, lets say not.a.real.vhost.egghelp.org, it asks its local nameserver for resolution. Chances are that your local nameserver don't know the IP of this host, so it has to ask others for it.
First thing it asks are 1 of the 13 root servers (A.ROOT-SERVERS.NET through to M.ROOT-SERVERS.NET). They prolly don't know either, but they'll have an NS (nameserver) record in their database which will point you to servers that know about .ORG addresses. So, your nameserver goes asks one of these servers what the address of not.a.real.vhost.egghelp.org is. Doubtful they'll know either, but they'll have an NS record for egghelp.org, so your nameserver goes asks one of these. This carries on up the tree, until eventually you hit a nameserver that has an A record for not.a.real.vhost.egghelp.org, which returns its IP.
Reverse DNS is done in exactly the same way, by use of the domain IN-ADDR.ARPA. Every IP is assigned one of these, so for example, my IP of 212.56.101.125 has the address 125.101.56.212.IN-ADDR.ARPA. (Notice the IP is written in reverse). Anyway, when a reverse dns query is executed, it querys the nameservers for the corresponding IN-ADDR.ARPA address, which propergates up the nameserver tree, until it hits a nameserver witch has a PTR (pointer) record for it, at which point it will return with a hostmask for the IP in question. (you might notice that if you try reverse dns on my IP, it will error. This is due to a namesever in the middle of the chain having incorrect info and thus breaking the system).

The final nameserver in the chain which has authority over your domain/ip can be anywhere in the world. Most shell servers with lots of vhosts have the nameservers for their ips/domains on the same box as the actual vhosts for simplicities sake. In the case of my host, the RDNS is pointed to my ISP's servers in the UK (well it should be once it gets fixed), and the nameservers for my domain which points to my box, britersen.co.uk, are in the USA somewhere.

If you need any more info, go read some FAQs about BIND (berkely internet name domain). http://www.isc.org/products/BIND/
Locked