[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] DNS assistance requested
- Subject: Re: [cobalt-users] DNS assistance requested
- From: jk@xxxxxxxxxxxx (Jens Kristian Søgaard)
- Date: Wed Feb 16 13:21:25 2000
"Jerome Chan" <jchan@xxxxxxxxx> writes:
> Telnet into your Cobalt box and at the command line run (as root)
> nslookup
> when the > prompt comes up type
> server <insert dns server name here>
> then you can type
> <theIPYouWantToTest>
> and nslookup will use the specified dns server name to check.
If you really want to make it simple, that is really to tiresome!
Instead you can just use:
nslookup theIPYouWantToTest DnsServer
15:58:55: ~/ # nslookup 192.168.0.1 localhost
Server: localhost
Address: 127.0.0.1
Name: sjaks.soegaard.net
Address: 192.168.0.1
15:59:06: ~/ #
Or, as I prefer, use dig:
dig @dnsserver testaddress
> All you need now is a list of dns servers around the block from Australia,
> Singapore, Japan, Israel, Germany, London, Canada, etc to do the testing...
> I sense a tool here would be nice. Hrm...
Perl is useful for almost anything. You can easily make up a program
to do any sort of odd job you come across, fx this can be used to test
dns-propagation (the list of nameservers covers danish nameservers, so
YMMV).
[TestPropagation]
#!/usr/bin/perl -w
use Net::DNS;
@servers = ( 'localhost', 'ns2.wol.dk', 'ns1.cybercity.dk', 'ns1.inet.tele.dk', 'uranus.daimi.aau.dk' );
$host = shift or die( "Usage: TestPropagation <hostname>\n\n" );
$res = new Net::DNS::Resolver;
format =
@<<<<<<<<<<<<<<<<<<<< => @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$server, $ip
.
foreach $server (@servers) {
$res->nameservers( $server );
if( $packet = $res->query( $host ) ) {
@rrs = $packet->answer;
$ip = shift( @rrs )->address;
}
else {
$ip = "Query failed";
}
write;
}
[TestPropagation]
This program is just a quick hack, so don't expect it to handle all
situations (fx it does not resolve CNAME's). But it can be used in
most situtations....
--
Jens Kristian Søgaard,
jk@xxxxxxxxxxxx -- http://www.jksoegaard.dk/
Søger du noget? -- http://www.google.com/