From: Brian W. <bwe...@xb...> - 2007-07-17 22:02:57
|
On Tue, 17 Jul 2007, Stefano Bagnara wrote: > Hi all, > > my limited dns knowledge don't let me to reach a conclusion about this > issue. > > > If I ask MX servers for that domain to that server, no MX found. > -------------------- > # host -t mx zunft-oberstrass.ch. 194.246.118.118 > Using domain server: > Name: 194.246.118.118 > Address: 194.246.118.118#53 > Aliases: > > zunft-oberstrass.ch has no MX record > ---------------- > > if I ask any type I get 2 NS records > ---------------- > # host -a zunft-oberstrass.ch. 194.246.118.118 > Trying "zunft-oberstrass.ch" > Using domain server: > Name: 194.246.118.118 > Address: 194.246.118.118#53 > Aliases: > > ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 61311 > ;; flags: qr rd; QUERY: 1, ANSWER: 2, AUTHORITY: 2, ADDITIONAL: 0 > > ;; QUESTION SECTION: > ;zunft-oberstrass.ch. IN ANY > > ;; ANSWER SECTION: > zunft-oberstrass.ch. 49631 IN NS ns2.nameserver.ch. > zunft-oberstrass.ch. 49631 IN NS ns1.nameserver.ch. > > ;; AUTHORITY SECTION: > zunft-oberstrass.ch. 49631 IN NS ns2.nameserver.ch. > zunft-oberstrass.ch. 49631 IN NS ns1.nameserver.ch. > > Received 112 bytes from 194.246.118.118#53 in 11 ms > -------------------- > > If I ask the MX to one of the delegated NS I found an answer. > -------------------- > # host -t mx zunft-oberstrass.ch. ns2.nameserver.ch. > Using domain server: > Name: ns2.nameserver.ch. > Address: 217.71.81.4#53 > Aliases: > > zunft-oberstrass.ch mail is handled by 10 mail.zunft-oberstrass.ch. > -------------------- > > > Now, the same thing using unix dig: > ---------------------- > # dig @194.246.118.118 zunft-oberstrass.ch. mx > > ; <<>> DiG 9.3.2 <<>> @194.246.118.118 zunft-oberstrass.ch. mx > ; (1 server found) > ;; global options: printcmd > ;; Got answer: > ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 52236 > ;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 2, ADDITIONAL: 0 > > ;; QUESTION SECTION: > ;zunft-oberstrass.ch. IN MX > > ;; AUTHORITY SECTION: > zunft-oberstrass.ch. 49470 IN NS ns2.nameserver.ch. > zunft-oberstrass.ch. 49470 IN NS ns1.nameserver.ch. > > ;; Query time: 10 msec > ;; SERVER: 194.246.118.118#53(194.246.118.118) > ;; WHEN: Tue Jul 17 11:03:38 2007 > ;; MSG SIZE rcvd: 84 > -------------------------- > So, no MX record found, but it returns the 2 NS like "host" did. > > > Now dnsjava dig command line: > -------------------- > #java -cp dnsjava-2.0.3.jar dig @194.246.118.118 zunft-oberstrass.ch. mx > ; java dig 0.0 > ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 31604 > ;; flags: qr rd ra ; qd: 1 an: 1 au: 2 ad: 2 > ;; QUESTIONS: > ;; zunft-oberstrass.ch., type = MX, class = IN > > ;; ANSWERS: > zunft-oberstrass.ch. 3516 IN MX 10 mail.zunft-oberstrass.ch. > > ;; AUTHORITY RECORDS: > zunft-oberstrass.ch. 86316 IN NS ns1.nameserver.ch. > zunft-oberstrass.ch. 86316 IN NS ns2.nameserver.ch. > > ;; ADDITIONAL RECORDS: > mail.zunft-oberstrass.ch. 3516 IN A 195.129.94.130 > mail.zunft-oberstrass.ch. 3516 IN A 195.129.94.194 > > ;; Message size: 137 bytes > ;; Query time: 138 ms > -------------------- > It finds the MX record!! > > > Can anyone explain me why there is such a difference and if this is a > result of a buggy server or where is the problem? > > Is this only a difference between "recursive" client (dnsjava dig) and > "non recursive" client (unix dig)? Something's very strange here. Both the standard unix dig and dnsjava's dig default to recursive queries - this can be been by the fact that both answers have the RD (recursion desired) bit set. For some reason, only the answer from dnsjava's dig has the RA (recursion available) bit set. I'm seeing the same responses, but I can't think of any good reason why that would happen. I tried adding the +qr option to the standard dig, and the -q option to dnsjava's dig, which causes the queries to be printed as well as the responses, but all that shows is that the queries are identical (except for query id). Brian |