If domain lookup is enabled (default) the router treats each every command as a hostname, attempts to make a telnet connection to that which, in turn, attempts to resolve a Hostname to IP address by querying the DNS server.
Here is a typical sample.
R2#xyz
Translating "xyz"...domain server (255.255.255.255)
Translating "xyz"...domain server (255.255.255.255) (255.255.255.255)
Translating "xyz"...domain server (255.255.255.255)
% Unknown command or computer name, or unable to find computer address
This waste of time can be avoided with one of the following solutions:
Solution1:Disable domain lookup:
I mean, do routers really need to do name lookups ? In certain cases, the answer is yes (syslog to a hostname for failover etc) but mostly, no. So you can disable it.
R2(config)#no ip domain lookup
Solution2: Disable outbound Telnet session
For cases where name lookup is needed you can stop the router from initiating connection without typing the telnet keyword:
R2(config)#ip domain lookup
R2(config-line)#line con 0
R2(config-line)#transport preferred none
This is a pretty clever trick that I only discovered recently. Not sure why disabling the session transport on the console works, but it does.
Solution 3: Reduce the connection timeout values for TCP connections
By default IOS opens a TCP connection with a 30 seconds timeout. That’s a long time and that’s why its takes so long for the connections to fail. You can reduce the global TCP settings for connection timeout.
R2(config)#ip tcp synwait-time 5
I talk about the details on this command in this post from a while back as there are some caveats: IOS: Setting the TCP Timeout on IOS
Competency Warning
It should be noted that the domain lookup command is related to other commands, notably the DHCP interface. Where you are configuring a DHCP interface (such as a DSL network interface), and your are trying to put the DNS discovered from the ISP interface into your DHCP server (for your home network say), then the domain lookup is needed. Effectively, you are disabling the onboard DNS software process by removing domain lookup.
Similar things happens when you say “no ip bootp server” which diables the DHCP as well, since they both run the same software thread.
You would test everything I say before you use it ? Wouldn’t you ? You really really should.
