Use of “no dns lookup” vs “transport preferred none” on Cisco IOS

I was just having a discussion on one of Orhan Ergun’s posts on LinkedIn about “no dns lookup” vs “transport preferred none” in a #Cisco #IOS configuration. I thought it deserved a wider distribution, so here I am.

Lots of folks disable name lookups on Cisco IOS boxen to prevent the device from attempting to resolve mistyped commands as host names. Unfortunately, this disables name lookup for •all• functions on the device, which can break a few important things.

Rather than disabling name lookups entirely, I recommend turning off the device’s default behaviour for mistyped commands, which is to treat them as host names and to connect to them via telnet or rlogin, which can include a name lookup.

Configuring “transport preferred none” on the con and vty lines will give the device no transport protocol to use for such connections and it won’t bother to try, eliminating the name lookup problem with mistyped commands while preserving lookups for other functions.