NS record for subzone definition

Casey Deccio casey at deccio.net
Wed Mar 14 17:33:05 UTC 2012


On Tue, Mar 13, 2012 at 9:33 AM, hugo hugoo <hugobxl at hotmail.com> wrote:

>  Thanks for this interesting feedback.
> Now I have the problem to detect this kind of bad configuration.
>
> If I have:
>
> Zone toto.be:
>
> toto.be.
>
>         NS  ns1.xxx.be
>
>         + some records
>
>
> Zone titi.toto.be:
>
>
> titi.toto.be.
>
>          NS   ns1.xxx.be
>
>           + some records.
>
>
> What will be the command to detect that zone toto.be has no NS for
> titi.toto.be ??
>
>

Here's one command, given that ns1.xxx.be is authoritative for both toto.beand
titi.toto.be:

dig +noall +comments @ns1.xxx.be titi.toto.be ns | grep "status: NOERROR"
&& \
  dig +noall +comments @ns1.xxx.be titi.toto.be ds | grep "status: NXDOMAIN"

A zero exit status for the above command indicates that the NS RRs are
missing from the parent.  Note, however, that a non-zero exit status
doesn't necessarily mean that the NS records exist.

Casey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/bind-users/attachments/20120314/9943e47f/attachment.html>


More information about the bind-users mailing list