A NS record tells name servers which machines are in charge
of a given domain zone.
This has one data-dependent field:
The name of the DNS node which a given NS record points to.
Any given zone must have one or more NS records. If no NS records are
present in a zone, MaraDNS will synthesize NS records for the zone
in question. If one wishes to set up their own NS records, all of the
NS records for a given DNS zone need to be placed immediately after the
SOA record.
MaraDNS also supports delegation NS records, which name the DNS servers
for a sub-zone, which usually is on another DNS server.
DNS allows for people to delegate sub-zones in DNS. Just as the "." server
delegates any name that ends in ".com." to another set of name servers,
and the ".com." name servers, in turn, delegate any names that ends
in "example.com.", such as "www.example.com.", to the "example.com."
name servers, the "example.com." name servers may further delegate
sub-zones.
For example, if example.com wishes
to sub-delegate "john.example.com." to John who works at Example, inc.,
lines like this can be added to the example.com zone file:
john.example.com. NS ns1.john.example.com.
john.example.com. NS ns2.john.example.com.
# It's important to provide "glue"; in other words, let the world know
# the IPs for these name servers.
ns1.john.example.com. 10.9.8.7
ns2.john.example.com. 10.5.77.65
John, who is running is own nameservers with the IPs 10.9.8.7 and 10.5.77.65
then has a zone file for john.example.com. that looks something like this:
# It is best if the NS records for a subzone agree with the delegation
# records above
john.example.com. NS ns1.john.example.com.
john.example.com. NS ns2.john.example.com.
ns1.john.example.com. 10.9.8.7
ns2.john.example.com. 10.5.77.65
# Now that that is out of the way, here is the rest of the zone
john.example.com. 10.9.8.7
www.john.example.com. 10.5.77.65
john.example.com. MX 10 mail.john.example.com.
mail.john.example.com. 10.9.8.7