On Dec 13, 2004, at 10:16, Steven W. Orr wrote:
dig or nslookup only goes through a dns server. Is there
such a thing that tells me how the resolver decides which szource it got
its answer from?
This isn't exactly what you asked for but it may help - it's a script I wrote to help me resolve addresses for debugging. All it does it is call the unix system call 'gethostbyname', but that lets you look in /etc/hosts, nis, netinfo, etc. whereas dig, nslookup, host are just for DNS as you found. You can spend too much time on a problem only to find it's due to an old /etc/hosts entry you didn't notice. DAMHIKT. Usage: ./gethostbyname.pl hostname.
-Bill
--- start gethostbyname.pl ---
#!/usr/bin/perl -w use strict; use warnings FATAL => 'all'; use Socket;
my $host = shift; my ($name,$aliases,$addrtype,$length,@addrs) = gethostbyname($host); print join ( ', ' , map( inet_ntoa($_), @addrs ) ) . "\n";
--- end gethostbyname.pl ---
---- Bill McGonigle, Owner Work: 603.448.4440 BFC Computing, LLC Home: 603.448.1668 [EMAIL PROTECTED] Cell: 603.252.2606 http://www.bfccomputing.com/ Text: [EMAIL PROTECTED] AIM: wpmcgonigle Skype: bill_mcgonigle
_______________________________________________ gnhlug-discuss mailing list [EMAIL PROTECTED] http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss