Re: subdomain delegation
Todd Lyons <[email protected]> Wed, 11 Mar 2009 12:23:50 -0700
| Newsgroups | gmane.network.dns.bind9.dlz |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Mar 11, 2009 at 3:00 AM, Kris Nielander <[email protected]> wrote: > > 0 IN CNAME 0.0-26 > 1 IN CNAME 1.0-26 > 2 IN CNAME 2.0-26 > ... > > I also have need for the NS records. > > 0-26 IN NS ns1.example.net. > 0-26 IN NS ns2.example.net. > > This works fine. However, all the editing needs to be done in the main > zone which spans multiple customers. So I created a subzone per > customer. > > 0-26.1.1.1.in-addr.arpa > > With two NS records > > @ IN NS ns1.example.net. > @ IN NS ns2.example.net. You also need the SOA record for that subzone. I think it would be best if you showed all records for one delegated zone. > That doesn't work. However, if I swap the '@' for an '*' it does! Now I've looked > at the query logs and the query using an '*' passes right before the query using > an '@'. Surely, that can't be right or is that just spec?! Can you post the actual queries as well? > {select name from dns_zone where name = '%zone%'} > {select ttl, type, case when type='TXT' then concat('\"', data, > '\"') else data end as data from dns_record where zone_id = '%zone%' and > host = '%record%'} > {} The 4th query above specifies that you do not do a separate lookup for NS and SOA and that those records are returned by the 3rd query, immediately above it. <snip> > Main zone queries (I'll skip the CNAME resolve process): > > select name from dns_zone where name = '1.0-26.1.1.1.in-addr.arpa'; > select name from dns_zone where name = '0-26.1.1.1.in-addr.arpa'; > select name from dns_zone where name = '1.1.1.in-addr.arpa'; > select ttl, type, case when type='TXT' then concat('\"', data, '\"') > else data end as data from dns_record where zone_id = > '1.1.1.in-addr.arpa' and host = '0-26'; > > Subzone queries: > > select name from dns_zone where name = '1.0-26.1.1.1.in-addr.arpa'; > select name from dns_zone where name = '0-26.1.1.1.in-addr.arpa'; > select ttl, type, case when type='TXT' then concat('\"', data, '\"') > else data end as data from dns_record where zone_id = > '0-26.1.1.1.in-addr.arpa' and host = '1'; > select ttl, type, case when type='TXT' then concat('\"', data, '\"') > else data end as data from dns_record where zone_id = > '0-26.1.1.1.in-addr.arpa' and host = '*'; > elect ttl, type, case when type='TXT' then concat('\"', data, '\"') else > data end as data from dns_record where zone_id = > '0-26.1.1.1.in-addr.arpa' and host = '@'; Show the data returned by these queries. My bet is that no SOA is being returned for the subzone, but that's just a WAG. -- Regards... Todd All truth passes through three stages. First, it is ridiculed. Second, it is violently opposed. Third, it is accepted as being self-evident. ------------------------------------------------------------------------------ Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com