What does DNS lookup have to do with searching for solution for any incorrect command?
The actual cause of this behavior is something often overlooked.
The default option for the line configuration "transport preferred" is telnet. This means that if you enter just "1.2.3.4" at the command line, that's the same as typing "telnet 1.2.3.4". Likewise, typing "google.com" is the same as typing "telnet google.com". So when you enter a string that doesn't match up with any known command (usually a typo like "confgi"), this is the same as typing "telnet confgi" so DNS resolution is attempted on that string ("confgi") for the purpose of telneting to that supposed host. Which won't work -- but you need to wait for the DNS query to timeout (as you most likely don't have a DNS resolver configured -- so it actually broadcasts out a query).
As noted, if DNS resolution is turned off, the router won't even attempt to resolve "confgi" so the command "telnet confgi" will quickly fail, rather than slowly timeout trying to perform DNS resolution.
Turning off DNS lookup will sidestep this issue, but a better fix is to configure "transport preferred none" so that the attempted telnet connection never even occurs. If I want to try connecting to another box, I have no problem actually typing "telnet" or "ssh."
Edit: Separate from this particular discussion, it's worth noting that DNS resolution is generally turned off not only for this reason, but also because several "show" commands (like "sh users") will attempt to resolve IPs to names, and it will try to several DNS queries, slowly failing on each one, as the command's output is generated.
More on reddit.cominternal dns lookup from Splunk cloud
Switch doing domain lookup on known command
Domain Name System Service
What is DNS lookup used for?
What does DNS lookup tell you?
How does DNS work?
Videos
ping -a w.x.y.z
Should resolve the name from the IP address if the reverse lookup zone has been set up properly. If the reverse lookup zone does not have an entry for the record, the -a will just ping without a name.
nslookup <ip>
Does what you're looking for. It will tell you the server you're querying and the result.
For example:
c:\>nslookup 192.168.101.39
Server: dns1.local
Address: 192.168.101.24
Name: enigma.local
Address: 192.168.101.39