2

question on the below DNS DLZ table
from http://en.gentoo-wiki.com/wiki/Bind_with_DLZ,_MySQL_and_replication:

+-----+------------+-------+------+------+-------------+---------------+------------+-------------------+------------+--------+------+-------+--------+
| id  | zone       | ttl   | type | host | mx_priority | data          | primary_ns | resp_contact      | serial     |refresh |retry |expire |minimum |
+-----+------------+-------+------+------+-------------+---------------+------------+-------------------+------------+--------+------+-------+--------+
| 100 | sample.com | 86400 | SOA  | @    |        NULL | NULL          | ns1.ns.com.| hostmaster.ns.com.| 2007080601 |  10800 | 7200 |604800 |  86400 | 
| 101 | sample.com | 86400 | NS   | @    |        NULL | ns1.ns.com.   | NULL       | NULL              |       NULL |   NULL | NULL |  NULL |   NULL | 
| 102 | sample.com | 86400 | NS   | @    |        NULL | ns2.ns.com.   | NULL       | NULL              |       NULL |   NULL | NULL |  NULL |   NULL | 
| 103 | sample.com | 86400 | MX   | @    |          10 | mail.mail.com.| NULL       | NULL              |       NULL |   NULL | NULL |  NULL |   NULL | 
| 104 | sample.com | 86400 | A    | @    |        NULL | 123.12.12.1   | NULL       | NULL              |       NULL |   NULL | NULL |  NULL |   NULL | 
| 105 | sample.com | 86400 | A    | www  |        NULL | 123.12.12.1   | NULL       | NULL              |       NULL |   NULL | NULL |  NULL |   NULL | 
+-----+------------+-------+------+------+-------------+---------------+------------+-------------------+------------+--------+------+-------+--------+

When I setup my OWN DNS-server, what exactly do I put into the SOA entry ? I mean I understand what I have to put into ttl, resp_contact, refresh, retry, expire minimum, id, zone, type and host field.

But what exactly is primary NS ? If I'm setting up a first DNS server, this would be the primary server itselfs, so ...

what I don't quite understand what i have to put into that field. I mean the primary ns would be the server that I set up, wouldn't it ?

voretaq7
  • 79,345
  • 17
  • 128
  • 213
Quandary
  • 974
  • 4
  • 18
  • 34
  • See the [SOA chapter](http://www.zytrax.com/books/dns/ch8/soa.html) from DNS for Rocket Scientists. – adamo Sep 11 '11 at 08:37

2 Answers2

2

Here is an example zone file for a domain that also hosts its own name server. The primary name server and mail server are on the same IP as the domain. Another machine hosts the secondary name server and the backup mail server. This other machine must be configured for both tasks, and you need glue records at the registrar.

$ttl 10800
example.com.    IN  SOA ns1.example.com. root.example.com. (
            1239719044
            3600
            3600
            604800
            38400 )
example.com.    IN  NS  ns1.example.com.
example.com.    IN  NS  ns2.example.com.
example.com.    IN  A   123.123.123.123
example.com.    IN  MX  0 mail.example.com.
example.com.    IN  MX  10 mail2.example.com.
example.com.    IN  TXT "v=spf1 a mx ptr ?all"
ns1.example.com.    IN  A   123.123.123.123
ns2.example.com.    IN  A   234.234.234.234
localhost.example.com.  IN  A   127.0.0.1
mail.example.com.   IN  A   123.123.123.123
mail2.example.com.  IN  A   234.234.234.234
xofer
  • 3,052
  • 12
  • 19
0

The "primary nameserver" is the nameserver upon which the records for the zone are managed. Dynamic record updates, amongst other things, should go to this nameserver rather than any other authoritative nameserver for the zone.

From RFC1034:

The zone data for the root domain might be:

.       IN      SOA     SRI-NIC.ARPA. HOSTMASTER.SRI-NIC.ARPA. (

[...]

The data in the SOA RR describes the management of the zone. The zone data is maintained on host SRI-NIC.ARPA, and the responsible party for the zone is HOSTMASTER@SRI-NIC.ARPA.

womble
  • 95,029
  • 29
  • 173
  • 228