Re: Bind dlz mysql => subdomain delegation

dominique <[email protected]>
Newsgroups gmane.network.dns.bind9.dlz
Message-ID <[email protected]>
Héhé !
I found the trouble !! or a bug ?
There is a trouble only with a DLZ zone, Bind go to the internet to
resolve fake (but local) zone in particular case.
(the log on the bottom)

There is no problem with a real zone... because a real zone working fine
 on the internet :)

First)
Create a fake zone : test.com on 192.168.1.10 with DLZ
For the moment everythings looks right and easy

> host -l  test.com 192.168.1.10
> Using domain server:
> Name: 192.168.1.10
> Address: 192.168.1.10#53
> Aliases:

> www.test.com has address 192.168.1.11
> ns2.test.com has address 192.168.1.11
> ns1.test.com has address 192.168.1.10
> test.com has address 192.168.1.10
> test.com name server ns1.test.com.
> www.test.com has address 192.168.1.10
> sub.test.com name server ns2.test.com.

Second)
Create a fake sub domain sub.test.com on ns2.test.com (192.168.1.11)
With a www CNAME www.google.com.
And everythings looks good

>host www.sub.test.com 192.168.1.11
>Using domain server:
>Name: 192.168.1.11
>Address: 192.168.1.11#53
>Aliases:

>www.sub.test.com is an alias for www.google.com.

* But when I'm trying to resolve on 192.168.1.10 *
>host www.sub.test.com 192.168.1.10
;; connection timed out; no servers could be reached


Here the log of bind WITH a DLZ zone:
23-Feb-2008 16:28:46.949 fctx 0xb7746008(www.sub.test.com/A'): start
23-Feb-2008 16:28:46.949 fctx 0xb7746008(www.sub.test.com/A'): try
23-Feb-2008 16:28:46.949 fctx 0xb7746008(www.sub.test.com/A'): cancelqueries
23-Feb-2008 16:28:46.949 fctx 0xb7746008(www.sub.test.com/A'): getaddresses
23-Feb-2008 16:28:46.949 createfetch: ns2.test.com A
...
23-Feb-2008 16:28:46.950 fctx 0xb7705008(ns2.test.com/A'): start
23-Feb-2008 16:28:46.950 fctx 0xb7705008(ns2.test.com/A'): try
23-Feb-2008 16:28:46.950 fctx 0xb7705008(ns2.test.com/A'): cancelqueries
23-Feb-2008 16:28:46.950 fctx 0xb7705008(ns2.test.com/A'): getaddresses
...
23-Feb-2008 16:28:46.953 fctx 0xb76c4008(./NS'): start
23-Feb-2008 16:28:46.953 fctx 0xb76c4008(./NS'): try
23-Feb-2008 16:28:46.953 fctx 0xb76c4008(./NS'): cancelqueries
23-Feb-2008 16:28:46.953 fctx 0xb76c4008(./NS'): getaddresses
23-Feb-2008 16:28:46.953 fctx 0xb76c4008(./NS'): query

... BIND GO TO INTERNET AND of COURSE THE FAKE ZONE ISN'T on
worldnic.com ...

23-Feb-2008 16:28:47.740 resquery 0xb770d008 (fctx
0xb7705008(ns2.test.com/A)): response
23-Feb-2008 16:28:47.740 received packet:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id:  59933
;; flags: qr ; QUESTION: 1, ANSWER: 0, AUTHORITY: 2, ADDITIONAL: 3
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;ns2.test.com.                  IN      A

;; AUTHORITY SECTION:
test.com.               172800  IN      NS      ns65.worldnic.com.
test.com.               172800  IN      NS      ns66.worldnic.com.

;; ADDITIONAL SECTION:
ns65.worldnic.com.      172800  IN      A       205.178.190.33
ns66.worldnic.com.      172800  IN      A       205.178.189.33

23-Feb-2008 16:28:47.740 fctx 0xb7705008(ns2.test.com/A'): noanswer_response
23-Feb-2008 16:28:47.740 fctx 0xb7705008(ns2.test.com/A'): cache_message
23-Feb-2008 16:28:47.740 fctx 0xb7705008(ns2.test.com/A'): cancelquery


WITH a non DLZ zone it's working fine (standard zone file):

host  www.sub.test.com 192.168.1.10
Using domain server:
Name: 192.168.1.10
Address: 192.168.1.10#53
Aliases:

www.sub.test.com is an alias for www.google.com.

And the log:
23-Feb-2008 16:44:41.934 fctx 0xb77ee008(www.sub.test.com/A'): start
23-Feb-2008 16:44:41.934 fctx 0xb77ee008(www.sub.test.com/A'): try
23-Feb-2008 16:44:41.934 fctx 0xb77ee008(www.sub.test.com/A'): cancelqueries
23-Feb-2008 16:44:41.934 fctx 0xb77ee008(www.sub.test.com/A'): getaddresses
... (THIS IS THE Magic LINE ... the local zone is found on BIND)
23-Feb-2008 16:44:41.934 dns_adb_createfind: found A for name 0xb78f4a58
in db
...
23-Feb-2008 16:44:41.942 resquery 0xb77f4008 (fctx
0xb77ee008(www.sub.test.com/A)): response
23-Feb-2008 16:44:41.942 received packet:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id:  50369
;; flags: qr aa ra cd ; QUESTION: 1, ANSWER: 4, AUTHORITY: 7, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags: do; udp: 4096
;; QUESTION SECTION:
;www.sub.test.com.              IN      A

;; ANSWER SECTION:
www.sub.test.com.       10800   IN      CNAME   www.google.com.


@+
Dominique











dominique a écrit :
> I understand ... but the SOA shoud be in the second server for
> delegation isn't it ?
> 
> Server 1 is manage by test.com maintainer.
> Server 2 is manage by another person.
> 
> On server 1:
> 	$ORIGIN test.com.
> 	@   SOA ns1.test.com. admin.test.com 3600 3600 600 3000 10
> 	@    NS ns1.test.com.
> 	ns1 A  192.168.100.1
> 	subns A  192.168.100.2
> 	sub NS subns.test.com
> 
> On serveur 2:
> 	$ORIGIN sub.test.com.
> 	@ SOA subns.test.com. admin.sub.test.com 27716 900 600 8600 3600
> 	@ NS  subns.test.com.
> 	www CNAME google.com.
> 
> And this commande should work :
> dnstracer -s192.168.100.1 www.sub.test.com
> \_subns.test.com[sub.test.com] (192.168.100.2) Got authoritative answer
> 
> 
> 
> 
> Graham Weldon a écrit :
>> Allow me to extend the description from Graeme here.
>>
>> Consider a subdomain to be a complete separate, new domain.
>> Rather than jamming every domain that's going to serve major things into
>> one zone, split them out.
>>
>> So for subdomains that are just pointing to services (ns1.test.com) This
>> can just be an entry in the test.com zone.
>>
>> For subdomains that will have further subdomains, and will have mail
>> separate etc.. Split them out.
>>
>> Secondsite.test.com would be a complete separate entry in the DLZ
>> tables.
>> It would have its own NS entries, an SOA entry
>> MX Entries if you want to serve mail off it
>> And you can further add subdomains off that.
>>
>> I hope that helps :)
>>
>> Cheers,
>>  
>> Graham Weldon
>>  
>> Fluid Lino
>> (02) 4927 5337
>> (0407) 017 293
>> [email protected]
>> www.fluidlino.com.au
>>
>> -----Original Message-----
>> From: [email protected]
>> [mailto:[email protected]] On Behalf Of
>> Graeme Fowler
>> Sent: Tuesday, 19 February 2008 4:38 AM
>> To: [email protected]
>> Subject: Re: [Bind-dlz-testers] Bind dlz mysql => subdomain delegation
>>
>> On Mon, 2008-02-18 at 21:28 +0400, dominique wrote:
>>> 1) is it possible to use dlz for subdomain delegation
>> Yes.
>>
>>> 2) have you got a working sample.
>> No.
>>
>> However, in order to use subdomains you still need an SOA record for the
>> subdomain. Without that, the DLZ drivers will throw an error like the
>> one you saw.
>>
>> Graeme
>>
>>
>> ------------------------------------------------------------------------
>> -
>> This SF.net email is sponsored by: Microsoft Defy all challenges.
>> Microsoft(R) Visual Studio 2008.
>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>> _______________________________________________
>> Bind-dlz-testers mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/bind-dlz-testers
>>
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by: Microsoft
>> Defy all challenges. Microsoft(R) Visual Studio 2008.
>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> 
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.