Dns configuration notes

-as of Fri Mar 17 05:47:31 EST 2006-

First of all:

LOCAL DNS

ndb/dns -r

You only need a

   dns = 1.1.1.1
entry in your ipnet configuration ( see
Network configuration ) and that server will be used to answer dns queries.

If you're using ip/ipconfig to configure your network via dhcp, dns entry will be automatically setup.

INTERNAL DNS SERVER

(normally used as a dns-cache to avoid waste on bandwidth with www.google.com queries :) ndb/dns -s)

You need to use root dns servers directly, then you can answer all the names to your clients directly (they doesn't need to go out there to ask for them, so you saves bandwidth). You will need an entry like:

dom=
              ns=A.ROOT-SERVERS.NET
              ns=B.ROOT-SERVERS.NET
         dom=A.ROOT-SERVERS.NET ip=198.41.0.4
         dom=B.ROOT-SERVERS.NET ip=128.9.0.107
see /lib/ndb/local.complicated for a complete example.

PRIMARY DNS SERVER

(or master -> ndb/dns -s)

You will need an entry like:

dom=cs.bell-labs.com soa=
             refresh=3600 ttl=3600
             ns=plan9.bell-labs.com
             ns=ns1.cs.bell-labs.com
             ns=ns2.cs.bell-labs.com
             mb=presotto@plan9.bell-labs.com
             mx=mail.research.bell-labs.com pref=20
             mx=plan9.bell-labs.com pref=10
             dnsslave=nslocum.cs.bell-labs.com
             dnsslave=vex.cs.bell-labs.com

in your /lib/ndb/local file. You can see examples in /lib/ndb/local.complicated that comes with standard distribution.

If you are familiar with DNS, you will find that entry self-explanatory. If not:

If you have your zone entry ready, take a look at ndb file again to see if all the names you used in the zone definition can be resolved using ndb information (with entries like dom=plan9.bell-labs.com ip=1.1.1.1 or sys entries as described in Network configuration ).

SLAVE DNS SERVER

I never done that in plan9, but i suppose is like setting up a primary one. There is no options and no automatic transfer zone from a master to a Plan9 dns slave server.

COMBINATIONS (AND NDB/DNS COMMAND)

It is possible to use a mixture of those configurations. You only need to make all the entries you need in your ndb file and use the correct option to start your dns server:

The ndb/dns command normally is executed via /rc/bin/cpurc, so take a look in this file for the ndb/dns line.