To configure a router as a DNS server:
R1(config)#ip dns server
Add host entries:
R1(config)#ip host R1 192.168.0.1
R1(config)#ip host PC1 192.168.0.101
R1(config)#ip host PC2 192.168.0.102
R1(config)#ip host PC3 192.168.0.103
Configure an external DNS server that R1 can use if requested record is not in local host table on router:
R1(config)#ip name-server 8.8.8.8
R1(config)#ip domain lookup
^Enabled by default, this enables the router to do DNS lookups
R1#show hosts
^ Displays configured hosts and those learned through look-ups of external DNS
Flags:
perm = Configured on router
temp = Cached in local router due to external lookup
To configure a router as a DNS client:
R1(config)#ip name-server 8.8.8.8
R1(config)#ip domain lookup
To configure the default domain name of a router:
R1(config)#ip domain name yourname.com
[These are my notes from Jeremy's excellent CCNA course which can be viewed here.]