A default command on the router configuration will be ip domain-lookup. If this command has been disabled, then DNS won’t work. Sometimes router administrators disable it because when you mistype a command you have to wait several seconds while the router performs a lookup. You can turn off DNS lookups with the following command:
Router(config)#no ip domain-lookup
Access control lists often block DNS, so this is another possible cause of problems. You can debug DNS on the router with the debug domain command.