router as dns server…

dns is so commonplace for clients that one barely gives it a thought… one of the niceties (or extra effort) for the ccie lab is that you can get hit by the self sufficience of IOS, and have to prove it live…

Primary

ip domain name ozlan.com
ip host Client1.ozlan.com 192.168.123.3
ip host Client2.ozlan.com 192.168.34.4
ip name-server 192.168.123.1

ip dns server
ip dns primary ozlan.com soa Primary.ozlan.com oz@ozlan.com

Client1

ip domain name ozlan.com
ip name-server 192.168.123.1

remember ip domain-name lookup is on by default…

Client1(config)#do ping Client1

Translating “Client1″…domain server (192.168.123.1) [OK]

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.123.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
Client1(config)#do ping Client2

Translating “Client2″…domain server (192.168.123.1) [OK]

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.34.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/21/24 ms
Client1(config)#do sh hosts
Default domain is ozlan.com
Name/address lookup uses domain service
Name servers are 192.168.123.1

Codes: UN – unknown, EX – expired, OK – OK, ?? – revalidate
temp – temporary, perm – permanent
NA – Not Applicable None – Not defined

Host                      Port  Flags      Age Type   Address(es)
Client2.ozlan.com         None  (temp, OK)  0   IP    192.168.34.4
Client1.ozlan.com         None  (temp, EX)  0   IP    192.168.123.3