I l@ve RuBoard Previous Section Next Section

1.11 Finding Out Which Version of BIND You're Running

1.11.1 Problem

You aren't sure which version of BIND you're running, or which version is installed on your host.

1.11.2 Solution

Start the name server and look for version information in its syslogoutput. You don't even need a named.conffile for named to read:

# /usr/sbin/named
Feb 25 17:17:33 bigmo named[54307]: starting BIND 9.2.0
Feb 25 17:17:33 bigmo named[54307]: using 1 CPU
Feb 25 17:17:33 bigmo named[54307]: loading configuration from '/etc/named.conf'
Feb 25 17:17:33 bigmo named[54307]: none:0: open: /etc/named.conf: file not found
Feb 25 17:17:33 bigmo named[54307]: loading configuration: file not found
Feb 25 17:17:33 bigmo named[54307]: exiting (due to fatal error)

Even though the name server doesn't start, you can still find the information you need in the output: This name server is running BIND 9.2.0.

Newer BIND name servers will also print their version if you execute them with the -v option:

$ /usr/sbin/named -v
BIND 9.2.0

If you go this route, however, make absolutely sure that the binary you're checking is the one that's running, and that you haven't recently upgraded to a new version of BIND without restarting the daemon.

1.11.3 Discussion

If you don't find the output you're looking for in the syslogoutput, check syslog.confto make sure that you're checking the right file: namedusually logs to the syslog facility daemon.

If the name server is already running, you can send it a query for a TXT record attached to the pseudo-domain name version.bindin the CHAOSNET class:

$ dig version.bind. txt chaos

; <<>> DiG 9.2.0 <<>> version.bind. txt chaos
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 40457
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;version.bind.                  CH      TXT

;; ANSWER SECTION:
version.bind.           0       CH      TXT     "9.2.0"

;; Query time: 2 msec
;; SERVER: 192.168.0.1#53(192.168.0.1)
;; WHEN: Mon Feb 25 17:23:53 2002
;; MSG SIZE  rcvd: 48

The version appears in after the string "TXT" on the line immediately below the comment ";; ANSWER SECTION:".

Note that it's easy to change the version returned in the TXT record, so if the name server you're checking with dig isn't yours, don't take the version as gospel.

1.11.4 See Also

Instructions on changing the version string a name server returns in Section 7.2.

    I l@ve RuBoard Previous Section Next Section