What to put into the SOA DNS entry field?

7,883

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
Share:
7,883

Related videos on Youtube

Quandary
Author by

Quandary

Mind the gap.

Updated on September 18, 2022

Comments

  • Quandary
    Quandary almost 2 years

    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 ?

    • adamo
      adamo almost 13 years
      See the SOA chapter from DNS for Rocket Scientists.