We all know this one. By default, IOS devices have DNS lookup enabled. This can lead to annoying situations when you mistype a command and the device tries to resolve it to an IP address. Example:
R10#show clock
*16:43:00.116 UTC Thu Dec 7 2017
R10#showrun
Translating "showrun"...domain server (255.255.255.255)
(255.255.255.255)
Translating "showrun"...domain server (255.255.255.255)
Translating "showrun"...domain server (255.255.255.255)
Translating "showrun"...domain server (255.255.255.255)
% Bad IP address or host name
Translating "showrun"...domain server (255.255.255.255)
% Unknown command or computer name, or unable to find computer address
R10#show clock
*16:44:02.102 UTC Thu Dec 7 2017
From the system time, you can see R10 took roughly 1 minute to translate the mistyped show run command.
Now let's disable the DNS lookup with the no ip domain-lookup command and run the same test again.
R10(config)#no ip domain-lookup
R10#show clock
*16:45:56.414 UTC Thu Dec 7 2017
R10#showrun
Translating "showrun"
Translating "showrun"
Translating "showrun"
% Bad IP address or host name
% Unknown command or computer name, or unable to find computer address
R10#show clock
*16:46:05.607 UTC Thu Dec 7 2017
R10#show clock
*16:43:00.116 UTC Thu Dec 7 2017
R10#showrun
Translating "showrun"...domain server (255.255.255.255)
(255.255.255.255)
Translating "showrun"...domain server (255.255.255.255)
Translating "showrun"...domain server (255.255.255.255)
Translating "showrun"...domain server (255.255.255.255)
% Bad IP address or host name
Translating "showrun"...domain server (255.255.255.255)
% Unknown command or computer name, or unable to find computer address
R10#show clock
*16:44:02.102 UTC Thu Dec 7 2017
Now let's disable the DNS lookup with the no ip domain-lookup command and run the same test again.
R10(config)#no ip domain-lookup
*16:45:56.414 UTC Thu Dec 7 2017
R10#showrun
Translating "showrun"
Translating "showrun"
Translating "showrun"
% Bad IP address or host name
% Unknown command or computer name, or unable to find computer address
R10#show clock
*16:46:05.607 UTC Thu Dec 7 2017
As you can see, the device instantly returned a response.
Cisco documentation: no ip domain-lookup
Comments
Post a Comment