I want to talk to DNS directly

Mark.Andrews at nominum.com Mark.Andrews at nominum.com
Thu Jul 5 04:48:58 UTC 2001


> Hi Everybody !
> 
> I'm just working on something here for a friend of mine (how suspicious does
> that sound ? :) and I'm wondering how I can directly talk to a DNS server ?
> 
> To elaborate, I want to be able to do something like :
> 
>     telnet ns1.nameserver.com 53
>         query="nameserver.com"
> 
> And then have it tell me all I need to know... in a perfect world.
> 
> I've so far looked at orielly's DNS & Bind book, the DNS-HOWTO, and RFC 1034
> and 1035 which have been really helpfull, as you'd expect but I still can't
> get it. From what I can gather, and I know I'm way off I should be doing
> something like this :
> 2376423463423464, QTYPE=A, QCLASS=IN, QNAME=nameserver.com.
> ^^^ would be the ID header, 16 bits etc
> 
> The DNS server (bind in this case, not that I think that will matter) isn't
> being very friendly towards me, and just won't talk to me at all. Nor do any
> records of my badgering come up the messages log.
> 
> Any light anybody can shed on this would be REALLY appreciated ?
> 
> Thanks,
> Michael.

	DNS is a binary protocol, not a textual protocol.  Telnet
	is not really a useful client when talking to a DNS server.
	About the best it can do is tell you whether the server is
	running or not.

	The reason that you didn't get anything logged is that the
	nameserver was looking for a message that was 29045 bytes
	long ('q' * 256 + 'u').  You didn't send that much so it
	never processed it.

	Mark
--
Mark Andrews, Nominum Inc.
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742                 INTERNET: Mark.Andrews at nominum.com


More information about the bind-users mailing list