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.
This command helps you to prevent automatic DNS lookup in Cisco devices.
no ip domain-lookup
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.
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 [host-name] [ip_address]
ip host gns3network.com 192.168.1.1
Now, if you want to ping 192.168.1.1 address, you just have to type ping gns3network.com, and your router itself convert this domain name into IP address as per stored into DNS record.
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.