Using dig for checking domain registration

Scott Haneda talklists at newgeo.com
Tue Jun 30 00:27:47 UTC 2009


On Jun 29, 2009, at 5:08 PM, Mark Andrews wrote:

> In message <76610622-42BA-4ED3-B945-14F6C6796A65 at newgeo.com>, Scott  
> Haneda writ
> es:
>> I have been using the below command to determine if a domain is
>> registered.  I use this for an internal audit of what clients have
>> come and gone, and what DNS records I need to clean up.
>>
>> dig example.com NS +trace -4 @4.2.2.1 | grep -i ns1.example.com
>>
>> I run it also with ns2.example.com in the grep to make certain my
>> primary and secondary are listed.
>>
>> My current trouble is that I am getting intermittent failures if the
>> domain is not a tld of .com, .net, .org.
>>
>> $dig customtruckgraphics.us NS +trace -4 @4.2.2.1 +short
>> NS F.ROOT-SERVERS.NET. from server 4.2.2.1 in 19 ms.
>> NS M.ROOT-SERVERS.NET. from server 4.2.2.1 in 19 ms.
>> NS G.ROOT-SERVERS.NET. from server 4.2.2.1 in 19 ms.
>> NS E.ROOT-SERVERS.NET. from server 4.2.2.1 in 19 ms.
>> NS D.ROOT-SERVERS.NET. from server 4.2.2.1 in 19 ms.
>> NS L.ROOT-SERVERS.NET. from server 4.2.2.1 in 19 ms.
>> NS C.ROOT-SERVERS.NET. from server 4.2.2.1 in 19 ms.
>> NS K.ROOT-SERVERS.NET. from server 4.2.2.1 in 19 ms.
>> NS I.ROOT-SERVERS.NET. from server 4.2.2.1 in 19 ms.
>> NS J.ROOT-SERVERS.NET. from server 4.2.2.1 in 19 ms.
>> NS A.ROOT-SERVERS.NET. from server 4.2.2.1 in 19 ms.
>> NS B.ROOT-SERVERS.NET. from server 4.2.2.1 in 19 ms.
>> NS H.ROOT-SERVERS.NET. from server 4.2.2.1 in 19 ms.
>> dig: couldn't get address for 'J.GTLD.BIZ': not found
>
> 	J.GTLD.BIZ only has a IPv6 addresses.
>
>> Can someone explain to me what is happening here, and also, provide a
>> suggestion on how to best test for the conditions I am after?
>
> 	You need to run a version of dig with this bug fix or just re-try.
>
> 2517.   [bug]           dig +trace with -4 or -6 failed when it  
> chose a
>                        nameserver address of the excluded address.
>                        [RT #18843]
>
> Which should read.
> 	
> 2517.   [bug]           dig +trace with -4 or -6 failed when it  
> chose a
>                        nameserver address of the excluded address  
> type.
>                        [RT #18843]
>
> 	Alternatively do "dig ns parent.zone", then
> 	"dig +norec ns child.zone @parent-server".


Hi Mark, thanks for the reply.  I do not understand your last  
suggestion.  If the domain in question is customtruckgraphics.us, can  
you show me an example of how to do this?

As to the versions, I would not be onjectionable to updating, how do I  
tell which version of dig is on the machine, as well as where to find  
the version that addresses the two bugs listed above?  I can not  
rebuild named entirely, as it was enough trouble getting DLZ working  
on RHEL. I would just need to fish out dig, and build that separate.

Thank you.
-- 
Scott * If you contact me off list replace talklists@ with scott@ *




More information about the bind-users mailing list