I l@ve RuBoard Previous Section Next Section

2.3 Adding a Host

2.3.1 Problem

You need to add a host to DNS.

2.3.2 Solution

Add an A and a PTR record for the host to the appropriate zones (which are almost certainly two different zones: a forward-mapping and a reverse-mapping zone). For example, to add a host called host.foo.example with the IP address 10.0.0.1 to DNS, you could add this record to the foo.example zone data file:

host.foo.example.    IN    A    10.0.0.1

And you'd add this record to the zone data file for the reverse-mapping zone, which might be 10.in-addr.arpa, 0.10.in-addr.arpa, or 0.0.10.in-addr.arpa, depending on how you break up administration of your reverse-mapping domain:

1.0.0.10.in-addr.arpa.    IN    PTR    host.foo.example.

2.3.3 Discussion

You're free to take advantage of the origin in the file to abbreviate the resource records. For example, if you're adding the A record to a line in the zone data file in which the origin is foo.example, you can write:

host    IN    A    10.0.0.1

If you're adding the PTR record on a line in which the origin is 0.0.10.in-addr.arpa, you can write:

10    IN    PTR    host.foo.example.

Since the default class is IN, for Internet, you can leave out the IN, too.

It's important to add PTR records for your hosts. Without PTR records, your hosts' addresses won't map to domain names, so they won't be able to access services that require reverse mapping, and your network management software may not identify them automatically.

You may also want to add other records for the host. If the host's domain name might appear on the right side of an email address, add an MX record specifying where mail addressed to the host should be delivered.

2.3.4 See Also

Section 2.5, for how to add an MX record; Section 2.10 to limit how long the records can be cached, Section 2.11 to learn how to handle multihomed hosts, and Chapter 4 of DNS and BIND.

    I l@ve RuBoard Previous Section Next Section