My OpenBSD box is behind a ADSL router. It also acts as caching resolving nameserver server for the network. All network clients have the IP address of this box in "/etc/resolv.conf".
Another instance, actually Bernstein's
tinydns runs an authoritative nameserver for my local domain 'utp.xnet'.
Code:
$ dig +norecurse hercules.utp.xnet @192.168.222.11
; <<>> DiG 9.4.2-P2 <<>> +norecurse hercules.utp.xnet @192.168.222.11
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 63605
;; flags: qr aa; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1
;; QUESTION SECTION:
;hercules.utp.xnet. IN A
;; ANSWER SECTION:
hercules.utp.xnet. 604800 IN A 192.168.222.20
;; AUTHORITY SECTION:
utp.xnet. 259200 IN NS ns1.utp.xnet.
;; ADDITIONAL SECTION:
ns1.utp.xnet. 259200 IN A 192.168.222.11
;; Query time: 1 msec
;; SERVER: 192.168.222.11#53(192.168.222.11)
;; WHEN: Sun Feb 27 23:12:05 2011
;; MSG SIZE rcvd: 85
And it also acts as DHCP server