Continuing our glossary of DNS tips & tricks, we’re covering the letters D, E, and F this time.
DNS ALERTOur popular DNS & BIND Week, DNS Fundamentals and DNS Advanced courses are all registered to run June 20th to June 24th, in Reston, Virginia, USA. Still want to join in? All info on our training page!
D is for “dig”
Dig is the Swiss army knife of network tools. It's got so much functionality, it’d be next to impossible to cover it all, but here’s a taste:
- find your IP address using: dig @ns3.google.com +short o-o.myaddr.l.google.com txt
- relatedly, you can make an alias in your .bashrc file: alias myip='dig o-o.myaddr.l.google.com -t txt +short @ns3.google.com'
- you can use dig +trace <domain-name> to follow all delegation from the root down.
And if dig isn't available, you can use one with a web interface (sometimes called a DNS Looking Glass), such as https://dns.bortzmeyer.org/[URL]/[TYPE] (for example https://dns.bortzmeyer.org/menandmice.com/AAAA).
Remember, friends don’t let friends use nslookup.
E is for “error-free config files”
To err is to be human. Sometimes a typo sneaks into your configuration files. (Unless you’re using Men & Mice, in which case validation is automatic.)
A quick way to make sure everything’s in order is to run named-checkconf -z to test all zones inside the named.conf file. (Note that the command checks the validity of the master zones, and not the configuration file itself. To check the file itself use named-checkconf <path to named.conf>.)
F is for “FQDN”
FQDN stands for ‘Fully Qualified Domain Name’ and you need it for a number of things. It’s the human-readable address that the DNS resolver translates into its corresponding IP address.
The FQDN is made up of three or more parts (called labels):
- root (the trailing dot at the end)
- TLD (such as .com, .net, etc.)
- domain (such as menandmice)
- host (such as www, info, etc.)
Each label is a string between 1 and 63 characters (letters, numbers, and dashes), and the total length of the FQDN is capped at 255 characters.
To find the FQDN of your machine:
- on Windows: Start > Programs > Administrative Tools > Active Directory Domains and Trusts (or echo %COMPUTERNAME%.%USERDNSDOMAIN% in the command line)
- on Linux & MacOS: hostname -f (on Linux you can also use hostname --fqdn)
Want to learn more?
This series is bite-sized (almost fitting a DNS query) — but it’s just the tip of the iceberg. A lot more is said (and done) in our DNS training program:
- If you’re new to DNS, we offer the DNS & BIND Fundamentals (DNSB-F) course. It’s part of the DNS & BIND Week (DNSB-W) and serves as a shorter introduction to the world of DNS and BIND.
- If you’re already familiar with the basics, the full five-day DNS & BIND Week (DNSB-W) course takes you deeper into DNS, including a heavy emphasis on security, stopping just short of DNSSEC (for which we offer a separate course).
- And if you're looking for even more, we offer the DNS & BIND Advanced (DNSB-A) program, getting into the deep end of things.