Skip to content

Instantly share code, notes, and snippets.

@hlindqvist
Last active January 29, 2016 14:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hlindqvist/1014c922624db96e0d71 to your computer and use it in GitHub Desktop.
Save hlindqvist/1014c922624db96e0d71 to your computer and use it in GitHub Desktop.
Just to demonstrate that the problem of mixing data between different zones in the same file is
just as relevant for completely static records, and is found by the normal named-checkzone tool (as well as named-checkconf -z):
$ cat >test.zone
$TTL 7200
@ IN SOA ns.example.com. hostmaster.example.com. 1 3600 1800 3600000 7200
@ IN NS ns.example.com.
$ORIGIN 0.222.92.in-addr.arpa.
1 IN PTR fr-edge-hsrp-be20-2001.example.net.
$ /usr/sbin/named-checkzone 0.222.92.in-addr.arpa. test.zone
zone 0.222.92.in-addr.arpa/IN: loaded serial 1
OK
$ /usr/sbin/named-checkzone 1.222.92.in-addr.arpa. test.zone
test.zone:5: ignoring out-of-zone data (1.0.222.92.in-addr.arpa)
zone 1.222.92.in-addr.arpa/IN: loaded serial 1
OK
$
@sharewax
Copy link

yes, thank you, that explain all:

test-file
$TTL 7200
@ IN SOA ns.example.com. hostmaster.example.com. 1 3600 1800 3600000 7200
@ IN NS ns.example.com.
$ORIGIN 0.222.92.in-addr.arpa.
1 IN PTR fr-edge-hsrp-be20-2001.example.net.
$ORIGIN 1.222.92.in-addr.arpa.
1 IN PTR fr-edge-hsrp-be20-2001.example.net.
# named-checkzone 1.222.92.in-addr.arpa. test-file
test-file:5: ignoring out-of-zone data (1.0.222.92.in-addr.arpa)
zone 1.222.92.in-addr.arpa/IN: loaded serial 1
OK

named-checkzone 0.222.92.in-addr.arpa. test-file
test-file:7: ignoring out-of-zone data (1.1.222.92.in-addr.arpa)
zone 0.222.92.in-addr.arpa/IN: loaded serial 1
OK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment