Goal: Write a BASH Script that traverses the DNS Tree

Goal: Write a BASH Script that traverses the DNS Tree and validates responses from Name Servers at the same level are providing the same response.

DNSStuff.com provides this service for their paid offerings, however it should be fairly straightforward to script.

Once the BASH script has been written, it would be really cool to have a tool visualize the output in a web browser using some kind of Javascript.

Update: I started writing a set of DNS tools in PHP with calls to dig and they are available at http://dns.winvive.com

BASH Script to query all authoritative COM Name servers for a particular domain

This BASH Script looks up all the authoritative name server for the .COM zone and queries each one to test if an update to “example.com” domain in this case, has been applied to each instance (a through m).

Even though this tests all 13 authoritative .COM name servers, be aware that there may be almost 100 if not more instances distributed globally using BGP Anycast routing.


#!/bin/bash
SERVERS=$(dig com. ns +short)
for f in $SERVERS
do
dig example.com @$f
done

Here is some sample output: (total output is over 300 lines so it might be best to redirect the output to a file)


; <<>> DiG 9.9.1-P3 <<>> example.com @f.gtld-servers.net.
;; global options: +cmd
;; Got answer:
;; ->>HEADER< ;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 2, ADDITIONAL: 5
;; WARNING: recursion requested but not available

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;example.com. IN A

;; AUTHORITY SECTION:
example.com. 172800 IN NS a.iana-servers.net.
example.com. 172800 IN NS b.iana-servers.net.

;; ADDITIONAL SECTION:
a.iana-servers.net. 172800 IN A 199.43.132.53
a.iana-servers.net. 172800 IN AAAA 2001:500:8c::53
b.iana-servers.net. 172800 IN A 199.43.133.53
b.iana-servers.net. 172800 IN AAAA 2001:500:8d::53

;; Query time: 83 msec
;; SERVER: 192.35.51.30#53(192.35.51.30)
;; WHEN: Tue Sep 25 02:50:32 2012
;; MSG SIZE rcvd: 176

Posted in DNS

Study for and write the CCNA

This particular goal has been in and out of my life for a while. I would finally like to take it on and complete this goal to obtain my CCNA.

I am scheduled to write the exam on the 14th of October 2012 which gives me about 2 weeks to fully prepare for it.

Compile Bind from source

In order to run the latest version. Setup a few nodes to be authoritative for a domain as well as a node providing recursive lookups for the local LAN.

Experiment with various options for logging as well as primary master / slave setup.

Compile the Linux Kernel

I have heard that to get additional features that have not yet been included in your particular version of the kernel, the best way to add them would be to compile your own kernel. Not sure what distribution I would use though. Still need to do additional research on that topic.