How to disable Automatic DNS Lookup In Cisco Devices

Enjoyed this article? Share via
Disable DNS Lookup on Cisco Device

Normally, when we working on Cisco Routers, Switches or Firewall, and we give a wrong command to the console of the Router than we have to wait for some time to get it working again. This is due to DNS lookup. Cisco devices are preconfigured with an automatic DNS lookup. In this article, we will discuss how we can disable this automatic DNS lookup.

What is the automatic DNS Lookup?

DNS (Domain Name System), simply a system which is used to translate a domain to a particular IP address. In Cisco devices, this lookup feature is by default enabled. So, whenever someone types the wrong command in Cisco devices console, then that command by default starting looking for an IP address of that command. However, no such domain name present in the global DNS server. That’s why it takes some time to resolve the unknown DNS query. This DNS lookup process looks like below image.


How to disable DNS lookup?

Now, we will discuss how we can stop unnecessary domain lookup. In order to disable DNS lookup, you have to type below command in the global configuration of the Cisco device.

no ip domain-lookup
This command helps you to prevent automatic DNS lookup in Cisco devices.


Other DNS related useful command for Cisco IOS

Cisco provides you a facility to store small numbers of DNS query in the device storage itself. It helps administrators to execute ping or traceroute related query just using a domain name, which is easy to remember. Below, global configuration mode command can be used to make a DNS entry in the Cisco router for a particular host.

ip host [host-name] [ip_address]
where host-name is the domain name of the host and ip_address is the address of the machine. For example, this command looks like :
ip host

Now, if you want to ping address, you just have to type ping, and your router itself convert this domain name into IP address as per stored into DNS record.

Must Read :  IPSec Tunnel Between Cisco Routers | Site to Site VPN Between Cisco Routers


In this article, we discussed DNS lookup. We also discussed some method that can be used to disable DNS lookup in Cisco devices. However, whenever there is a need to enable DNS lookup for a particular host, we can!

Did you find this article helpful! Please leave a comment in comment box.

Enjoyed this article? Share via

Leave a Reply

Your email address will not be published. Required fields are marked *