0

example zone file (domain1.com):

@ IN NS dns1.domain.com.
@ IN NS dns2.domain.com.

dns1 IN A **.**.178.93
dns2 IN A **.**.178.93

Do i have to declare IN NS in every domain zone file using bind9? It is possible to include these entries so i don't need to type it every time?

Alexander Kim
  • 597
  • 3
  • 8
  • 21

1 Answers1

2

Yes. RFC 1033 states: "NS records for a domain exist in both the zone that delegates the domain, and in the domain itself" and therefore NS records can not be omitted completely.

Glue records are only needed when the name-servers are within the same zone as the domain. By registering all your domains on the same name-servers you already reduce the effort by half, the zone for example.org would then be sufficient with only:

@ IN NS ns1.example.com.
@ IN NS ns2.example.com.

and doesn't need glue records.

You might even be able use the @INCLUDE option to include the name servers from an second file:

@INCLUDE common-zone-data/name-servers.inc ; include common name-servers

where name-servers.inc contains the two NS resource records mentioned above.

If all your zones are identical anyway, simply point them to the same zone-file in your named.conf:

zone "example.com" {
        type master;
        file "common-zone-data/default.zone";
};
zone "example.org" {
        type master;
        file "common-zone-data/default.zone";
};
HBruijn
  • 72,524
  • 21
  • 127
  • 192