I am attempting to set up a LAN's domain-name server. My router has a given domain name from the ISP- something like foobar21.verizon.com.
I would like to assign my local computers names such as, gizmo, gadget, wizbob, etc.
In my bind(9) configuration file, I have this comment from the prefab file:
# This is the zone definition. replace example.com with your domain name
zone "local-network" IN {
type master;
file "/etc/bind/zones/local-network";
};
But, I don't really have a domain name! How do I resolve this?
As long as it is only going to be used for lookup inside your LAN you can use any top-level domain you want. It is perfectly fine to tell your local bind about the zone "nathan", which then would consist of gizmo.nathan., gadget.nathan., etc.
You can use a fictional top level domain like "lan" or "local"
You can use a fully qualified domain name that you do not own. However, if you're going to go down this route, make sure you pick an FQDN that is not and could never be owned by a third party. So pick one ending with .lan or .local, as Zaid suggests.
The reason for doing this is that if any of your machines are ever used off your local network (e.g. one of them is a laptop and you take it to a cafe), that machine will be trying to resolve network names with the FQDN you chose, on the public internet. If someone else owns that domain on the 'net, then those requests are going to end up on their doorstep.
Thanks to a DNS client feature in Windows called 'DNS devolution', even if the exact target DNS name doesn't exist on that remote network, the request will get re-sent with just the base domain name e.g. if you try and resolve mypc.domainname.com and it fails, the machine will then go out and just request domainname.com, then finally just com.
Long story short, either buy an externally recognised domain name (it's cheap!), or go with the not-fully-supported-but-still-acceptable .lan or .local suffixes.
It really isn't a good idea to use any random thing for your DNS domain, simply because new top-levels are coming into existence all the time. That said, its safer if you chose a longer one. The list of assigned names can be found here:
http://www.iana.org/domains/root/db/
If your domain ever shows up in that list, you'll have to redo your DNS setup on something else. Otherwise, anything legitimately in that domain won't be reachable from your network.
Just go and buy a real domain.
Making up your own domain for local use introduces a chance of name collisions. For the sake of 10 bucks or so each year it's really not worth it.
You don't have to delegate it (i.e. publish NS records) so that it's visible to the rest of the world, just keep it internal.
you might find dnsmasq a very handy tool. Its dead easy to set up, and can do your LAN dhcp / dns. Its great for small networks and esp if you want to avoid the headache of bind configuration.