Everyone that has used the Cisco IOS command line knows this problem. When you mistype a command, the router tries to resolve the “hostname” and you have to wait for 24 very long seconds:
Router#conft Translating "conft"...domain server (255.255.255.255) (255.255.255.255) Translating "conft"...domain server (255.255.255.255) % Unknown command or computer name, or unable to find computer address Router#
Until recently I used the “no ip domain-lookup” configuration entry to counter this. This disables DNS-lookups altogether, which might not always be what you want. I recently found the proper solution to fix this:
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#line con 0
Router(config-line)#transport preferred none
Router(config-line)#^Z
Router#conft
^
% Invalid input detected at '^' marker.
Router#
You need to apply this to all the lines you want (probably all vty’s as well). This will prevent the router from guessing that an unknown command is a hostname you want to telnet to. You can still telnet (or ssh) to a hostname (DNS still works), but you need to specify the ‘telnet’ command.
Leave a Reply