An Introduction to DNS and DNS Tools
This powerful command gathers and returns DNS information in a format the name server can use directly. For this reason, dig is particularly useful in scripts. You will find it easy to query specific name servers with dig, making it a useful tool for narrowing down the source of DNS problems.
Suppose you have just transferred your domain name hosting from old-host.com to new-host.com. A customer sends you an e-mail saying he cannot reach your web site when he is logged into his ISP. You suspect the zone information simply has not had time to propagate. So, you find out what the NS records are for the ISP in question:
dig ns isp-in-question.com ;; ANSWER SECTION: isp-in-question.com. 10H IN NS ns1.hugeupstream.com. isp-in-question.com. 10H IN NS isp-in-question.com. isp-in-question.com. 10H IN NS ns.isp-in-question.com. isp-in-question.com. 10H IN NS ns.goodnameserver.com.
Then you check your company's web site against the ISP's name servers:
dig www.yourcompany.com @ns.isp-in-question.com ;; ANSWER SECTION: www.yourcompany.com. 59m53s IN A 192.168.5.10Wait a minute, that is your old IP address. It appears the DNS information has not fully propagated yet.
Next, you decide to see if old-host.com has removed the old zone information from their name servers. The “any” option will retrieve all the DNS information:
dig any www.yourcompany.com @ns.old-host.com ;; ANSWER SECTION: www.yourcompany.com. 1H IN A 192.168.200.250 ;; AUTHORITY SECTION: yourcompany.com. 1H IN NS webns.new-isp.com. yourcompany.com. 1H IN NS srvns.new-isp.com.
In this case the A record shows your new IP address for your web server, and it shows the new authoritative name servers for your domain name. This is the information you hoped to find.
These are the most useful dig query types: dig any (gathers all DNS information), dig ns (gathers name server information), dig mx (gathers mail exchanger information) and dig a (gathers network address information).
The dig command can also do reverse lookups with output formatted for the zone file:
dig -x 192.168.200.250 ;; ANSWER SECTION: 250.200.168.192.in-addr.arpa. 4h11s IN PTR www.yourcompany.com.
You can use this tool as a single line command, or you can use it interactively, which distinguishes it from the other DNS commands. Once you have started nslookup, type set all to list the default options. As with dig you can choose the server (name server) you want to query, and you can decide the type of DNS information on which to focus.
Just as you can issue commands to nslookup interactively, you can also change the initial defaults by starting a .nslookuprc file. The format of the .nslookup is one command per line:
set type=NS set domain=srvns.new-host.com set timeout=10
The ARPANET (the precursor to the Internet) had a few hundred hosts throughout the 1970s. A single flat file called HOSTS.TXT contained all of the information for every host. System administrators periodically downloaded the file and placed the information into their /etc/hosts file; take a look at your own /etc/hosts to see roughly what that file looked like. However, this system was not scalable. The advent of DNS made the exponential growth of the Internet possible.
Practical Task Scheduling Deployment
July 20, 2016 12:00 pm CDT
One of the best things about the UNIX environment (aside from being stable and efficient) is the vast array of software tools available to help you do your job. Traditionally, a UNIX tool does only one thing, but does that one thing very well. For example, grep is very easy to use and can search vast amounts of data quickly. The find tool can find a particular file or files based on all kinds of criteria. It's pretty easy to string these tools together to build even more powerful tools, such as a tool that finds all of the .log files in the /home directory and searches each one for a particular entry. This erector-set mentality allows UNIX system administrators to seem to always have the right tool for the job.
Cron traditionally has been considered another such a tool for job scheduling, but is it enough? This webinar considers that very question. The first part builds on a previous Geek Guide, Beyond Cron, and briefly describes how to know when it might be time to consider upgrading your job scheduling infrastructure. The second part presents an actual planning and implementation framework.
Join Linux Journal's Mike Diehl and Pat Cameron of Help Systems.
Free to Linux Journal readers.Register Now!
- SUSE LLC's SUSE Manager
- Murat Yener and Onur Dundar's Expert Android Studio (Wrox)
- My +1 Sword of Productivity
- Tech Tip: Really Simple HTTP Server with Python
- Managing Linux Using Puppet
- Non-Linux FOSS: Caffeine!
- Doing for User Space What We Did for Kernel Space
- Rogue Wave Software's Zend Server
- Returning Values from Bash Functions
- Parsing an RSS News Feed with a Bash Script
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide