Moving foo
When moving foo around there are a few things that need to be taken care of with respect to the nameserver and zones that are hosted on the foo DNS server.
Preparing for the move
Lower the TTL for the zone to one hour or thereabout. This means that when the zone is later changed, it will take less time before the changes are effective. When everything is up and working it is advisable to turn the TTL back up again (if you use NORID for secondary DNS services they will complain if you have a TTL of less than 1 day).
Make sure that you understand how your zone is delegated from the TLD you belong to. Specifically make sure that if your zone has any glue records that refer to the nameserver IP, these must be updated.
Most domains on foo use foo.nemo-project.org as the authorative NS, hence this zone must me updated first so that this name points to the correct IP. If this is not correct, nothing will work -- so when moving, make sure this zone gets priority with regard to changes.
Robustness
As has been mentioned on the various mailing lists for nemo-project, using CNAME resource records rather than A resource records for pointing names at machines can imply less work. If you use CNAME then things will work as long as what you are pointing to is correct and you won't have to do anything.
There is a good reason for using A records though: if you use CNAME you can NOT influence other resource records like for instance MX records. If you want to specify your MX explicitly, rather than accept whatever is chosen for the machine you would be pointing to with a CNAME, you must set up an A record -- that is, refer to the IP address of the machine directly.
Choose whatever makes sense to you.
After moving
After the machine is moved to a new IP address you must change the named.conf file. Note that since we run a "jailed" BIND this file will not reside under
/etc but under
/usr/home/bind/etc. Specifically you need to change the
listen-on section so the server binds to the correct address.
You also need to edit the
named_flags parameter found in
/etc/rc.conf so that bind is given the correct parameters at startup.
Be sure to
verify the nameserver is running because the nameserver is a critical component for those who use it to serve their domains and if it doesn't run for prolonged periods of time that could incur all manner of unpleasantness -- including people
losing their domains. So please double-check.
The last thing you do after moving is to make sure all your zones are correct. If owners of other zones have given you permission to modify their zones when moving the server then it would be a nice thing to do to fix their zones of they can't or are out of touch.
Adding new zones
In order to add a new zone to this nameserver you need to:
- create a zone file
- update the named.conf
The nameserver configuration is found under
/usr/home/bind/etc. the
named.conf directory is found under this directory and the zone files for the zones served from the DNS server on foo are under the
master directory. As you can see all the zone files are named after the zones they contain.
To create a zone file you either need to know what you are doing, you need to be willing to risk doing the wrong thing or you can just use an existing zone file for inspiration. There are several zones on the server. The
borud.no is a relatively simple one, so you can use that for inspiration when you create your zone.
When you've created your zone file and placed it in the
master directory, you need to add it to the
named.conf file. Just look at how it is done for the other zone files.
Next you need to tell the nameserver to reload the configuration. In order to do this you need to figure out the process id of the nameserver (PID) and then send this process the HUP signal.
Do not send the named process anything other than the HUP signal unless you really, really want to kill it.
After reloading the config you must check the
/var/log/messages file for error messages. If there are errors in your zone or the config file you
must fix this before logging out.
If all else fails
If you've screwed up or need help you may contact me (Bjørn Borud) and I'll try my best to help you. Please try not to screw up though :-).
--
BjornBorud - 19 Jul 2003