0

i am trying to set up a reverse zone for my bind dns server, under the subnet 192.168.0.65/29 my zone datafile looks like this:

   @       IN      SOA     server.example.com.   server.example.com.   (
                            2014101300 ; serial
                            1000       ; refresh
                            180        ; retry
                            180        ; expire
                            10         ; minimum
                            )

    65      IN      CNAME   65.64/29
    66      IN      CNAME   66.64/29
    67      IN      CNAME   67.64/29
    68      IN      CNAME   68.64/29

    66      IN      NS      server.example.com.

    65      IN      PTR     router.example.com.
    66      IN      PTR     server.example.com.
    67      IN      PTR     client-1.example.com.
    68      IN      PTR     client-2.example.com.

When i try to load this file it fails and displays the following error: "CNAME and other data". Any ideas to what might have gone wrong??

1
  • Can you clarify if this supposed to represent a reverse zone for 192.168.0.0/24 where you are trying to delegate a zone for 192.168.0.64/29 (based on tools.ietf.org/html/rfc2317) or if this a supposed to represent such a rfc2317-style zone for 192.168.0.64/29. The included zone data looks like a mix of the two. Oct 13, 2014 at 17:05

3 Answers 3

2

The CNAME records should be in your 0.168.192.IN-ADDR.ARPA. zone. It should also have glue records for the 64/27.23.168.192.IN-ADDR.ARPA. zone to which you are delegating.

65        IN  CNAME   65.64/29.0.168.192.IN-ADDR.ARPA. ;qualified
66        IN  CNAME   66.64/29 ;unqualified name
67        IN  CNAME   67.64/29 

The zone for 64/27.23.168.192.IN-ADDR.ARPA. should contain the rest of the records. If you are doing this on the same DNS server, you can omit the glue and NS records.

See How to Delegate Reverse Subnet Maps records for documentation and examples. RFC 2317, Classless IN-ADDR.ARPA delegation, has already been linked to.

2
  • Shouldn't it be 65 IN CNAME 65.65/29.0.168.192.IN-ADDR.ARPA. instead ? Oct 13, 2014 at 21:17
  • @XavierLucas In this case yes, the values were copied from the referenced documentation. The 27 or 29 doesn't matter much other than a reference to the size of the delegation. 64/29 indicates a subnet of 8 addresses starting at 64. 64/27 indicates a subnet of 32 addresses starting at 64, which could then be re-delegated as 64/29 and addition subnets.
    – BillThor
    Oct 13, 2014 at 21:24
1

The right hand side of a CNAME record should be a canonical name not something that looks like a CIDR address. See for instance RFC 2181 for clarification.

A more logical zone file would be one without all the CNAME RR records you have there.

0

Your Zonefile lists these entries for 66:

66      IN      CNAME   66.64/29
66      IN      NS      server.example.com.
66      IN      PTR     server.example.com.

So you do not only have a CNAME-record, but an NS and PTR as well, whis is explicitly forbidden. A CNAME "redirects" all queries (MX, A,...), so you may not override these by specifying additional resource records.

Apart from this, your zone file looks a little awkward to me; after the SOA-Record, I'd only expect this kind of entries:

@       IN      NS      server.example.com.

65      IN      PTR     router.example.com.
66      IN      PTR     server.example.com.
67      IN      PTR     client-1.example.com.
68      IN      PTR     client-2.example.com.

By the way, your CNAME's right hand side seems weird to me, "65.64/29.0.168.192.in-addr.arpa." will most probably not be resolvable (slashes not being allowed AFAIK), but I'm pretty sure, your setup won't need these CNAMEs.

2
  • Read RFC2317 Oct 13, 2014 at 21:25
  • Thanks for pointing this out, I didn't yet need CIDR reverse delegation yet. Striked this part of my answer.
    – matt_gnu
    Oct 14, 2014 at 6:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .