DNS : Help

Kevin Darcy kcd at daimlerchrysler.com
Mon Oct 14 21:36:19 UTC 2002


"Narayan, Krishnan" wrote:

> Hi : I need help, since i am new to BIND. We have BIND 8.2 running. I
> need to put a entry for MX and A record. I would appreciate the help.

The most foolproof way to do this is add a couple lines like:

foo.example.com. in mx 0 mail.example.com.
bar.example.com. in a 1.2.3.4

to the appropriate zone file. (Use whatever preference value you prefer
for the MX record, whatever IP you prefer for the A record, and of
course whatever names you prefer throughout). Be careful to put a dot at
the end of all names you add, otherwise they might be misinterpreted.

After you've added the lines, increment the serial number of the zone
(it's the first numeric field in the SOA record), and then reload or
restart your nameserver, so that it loads the new version of the zone.

You would be wise to familiarize yourself with the syntax of zone files.
The above syntax is "foolproof", but it's quite verbose, and if you
always format your resource records this way, your zone file quickly
becomes unreadable. Once you know what you are doing, in many cases you
should be able to use relative names (e.g. just "foo" instead of
"foo.example.com.") or under the right circumstances, just
leading-whitespace, in your resource records. This makes the zonefile
much easier to read and maintain.


- Kevin




More information about the bind-users mailing list