How to disable DNS Lookup on Cisco Routers and Switches

This article discusses how we can disable DNS lookup on Cisco Routers and switches, it will effect when DNS lookup is enabled. A Cisco Router will do DNS lookups by default. If you typed wrong command name in Privilege EXEC mode on Cisco Router, the Cisco Router will assume that the name needs to be resolved using a DNS lookup. This will lock the keyboard and create delays while entering configuration commands. If no DNS server is available, a better option is to turn off DNS lookups altogether.

Although this feature is can be useful in some situations, for most of the time, this is a pain, especially if you do not have DNS server configured. The Router becomes irresponsive for about 5-6 seconds trying to resolve the name.

Example: Disable DNS Lookup on Cisco Router

The following is an example.

Cisco-Router#wrong-command
Translating “wrong-command”…domain server (255.255.255.255)
(255.255.255.255)
Translating “wrong-command”…domain server (255.255.255.255)
% Unknown command or computer name, or unable to find computer address
Cisco-Router#

Disable DNS Lookup on Cisco Router

To disable domain look up type the commands as shown bellow.

Cisco-Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Cisco-Router(config)#no ip domain-lookup

Cisco-Router(config)#

Verify DNS Lookup Status On Cisco Router

Now the output is quick and router does not become irresponsive

Cisco-Router#wrong-command

Translating “wrong-command” 
Translating “wrong-command”
% Unknown command or computer name, or unable to find computer address
Cisco-Router#

Share/Bookmark

Filed Under: Cisco General

Tags:

About the Author:

RSSComments (5)

Leave a Reply | Trackback URL

  1. apavy says:

    hi!!!, Thanks for article about “how to disable DNS Lookup on Cisco Routers and Switches”. It is very informative…

  2. Ramesh says:

    You have covered to how to disable DNS lookup on Cisco Router and Switch, But find below steps to configure/enable DNS lookup on Cisco Router or Switch.

    To configure a Cisco router to resolve hostnames by using DNS a domain name and at least one name server need to be specified.

    DNS configuration example:

    Router#configure terminal
    Router(config)#ip domain-lookup
    Router(config)#ip domain-name cisco-faq.com
    Router(config)#ip name-server
    Router(config)#ip name-server

    Thanks

  3. Hill says:

    This is good , but the real reason why you get the message ” Translating “wrong-command”…domain server (255.255.255.255)” is because the preferred transport is set by default to telnet , when you type something at the prompt it tries to resolve to telnet that name or IP address.
    Better solution is under line vty type “transport preferred none” and this fix the translation problem and keeps the ip domain-lookup on your router or catalyst

  4. Scott says:

    Thanks for your information

  5. Navis says:

    I got how to disable DNS lookup on CIsco Routers or Switches,I must spend some time learning more or working out more. Thanks for excellent informative blog.

Leave a Reply




If you want a picture to show with your comment, go get a Gravatar.