--=-=-= Content-Transfer-Encoding: quoted-printable John Hebert <[EMAIL PROTECTED]> writes:
> What database or collection of information does the command "dig" > query when it looks up information on a domain name? > > I assume dig talks to my primary name server from /etc/resolv.conf, > which returns some kinda shared DNS record. Where is this record > originally generated? dig queries whatever dns server is in resolv.conf. It can, however, query any nameserver you specify, ie. $ dig scottharney.com @arbitrary.dns.server.here Of course, arbitrary.dns.server.here needs to answer queries from external clients. Some do. some don't. Use 'dig -x' to do reverse dns queries (ie query an IP address to return the domain). Another useful command to do dns queries is 'host'.(1) Let's say your just using your ISP's nameservers specified in resolv.conf. Those nameservers perform lookups on your behalf. So you dig for scottharney.com. If they have previously looked up scottharney.com and the record information has not expired, it will return the record. If not, it will query the .com 'root' name servers. They will then tell the nameserver where to get authoritative name information, ie. the nameservers I have specified with my registrar. The authoritative information is in those nameservers. That's the database. It has the mappings of names to IP addresses. (1) It also tells the requesting server how long to cache those records before requiring a fresh query. If you want to find information about registrars and authoritative information for a domain, use whois, ie 'whois scottharney.com'.=20 There is one 'master' whois database and it references whois databases maintained by individual registrars. Back when I worked with you at Fastband, things were much simpler -- we just had one registrar in the form of Network Solutions. ;) If you _really_ want to learn about DNS, set up a local caching nameserver. While I have set up many BIND installations, I highly recommend djbdns. http://cr.yp.to/djbdns.html . There are others as well. You can also resolve internal names yourself which can be educational and useful. I use a domain internally called .local.lan. I also wrote an article sometime back that's on (the new) nolug.org: http://www.nolug.org/index.php?module=3DStatic_Docs&func=3Dview&f=3Dnolug-d= ns/index.html I give a quick and dirty conceptual overview of dns and include examples of using dig and whois. > If I'm asking something that can be answered via reading, please pass > along some URLs. (1) Don't use nslookup. It's deprecated. The version on most Linux distros even says so when you run it. (2) I am deliberately ignoring the subject of reverse DNS. Unless you work for an ISP, you aren't authoritative for any IP pools so you don't normally get to set up reverse. Although I generally set it up on my internal private IP pools. =2D-=20 Scott Harney<[EMAIL PROTECTED]> "...and one script to rule them all." gpg key fingerprint=3D7125 0BD3 8EC4 08D7 321D CEE9 F024 7DA6 0BC7 94E5 --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQA+cWwQ8CR9pgvHlOURAm9TAKCF8WJ1TRLqwpyassoI4r5RC9zmYQCcDXno LhLSmGBuvqQAZ2JVompmWE8= =w8VA -----END PGP SIGNATURE----- --=-=-=--
