05-09-2019 10:50 AM - edited 05-09-2019 10:52 AM
I am trying to understand the DNS lookup order on the router.
Let's say I have the following config:
ip host aaa.com 1.1.1.1
ip name-server 8.8.8.8
when I try to ping:
#ping aaa.com
Translating "aaa.com"...domain server (8.8.8.8)
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!
Clearly, aaa.com is not 1.1.1.1. I see my config overrides Google's 8.8.8.8. This makes sense. But what bothers me is that it still tries to resolve through 8.8.8.8. If I put in a non-existing DNS server:
no ip name-server 8.8.8.8
ip name-server 25.25.25.25
It clearly still try to resolve
#ping aaa.com
Translating "aaa.com"...domain server (25.25.25.25) <<---- long wait here
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 24/29/36 ms
What can I do to prevent that DNS lookup from happening and slowing down my local DNS resolution?
05-09-2019 11:48 AM
Cisco Router can Act as DNS Server for your Client. But most of FQDN it uses DNS resolution.
my view from FQDN lookup always uses the name server. but i belive local user want to access local server.
they should be like example :
ip host aaa.local 1.1.1.1
if you want to IOS Device act as DNS Server follow below document :
05-10-2019 10:59 AM
What I want to do is use external server for DNS lookup. The IOS router also acts as a DNS server and I want it to resolve some local DNS names. The aaa.com config is just an example to illustrate the problem. I want the IOS DNS server to simply return the static IP without performing another DNS query because it takes time especially when DNS serve is not reachable.
05-10-2019 04:20 PM
Hello
@pingduck wrote:
. I want the IOS DNS server to simply return the static IP without performing another DNS query because it takes time especially when DNS serve is not reachable.
no ip domain-lookup
05-10-2019 12:48 PM - edited 05-10-2019 03:43 PM
(removed due to duplicate)
05-10-2019 11:58 AM
What device and software version are you trying this on? It may depend on platform/software. Trying it on a CSR1000v 3.13.5 I get a different result than you are getting.
ip host aaa.com 1.1.1.1
ip name-server 8.8.8.8
R25#ping aaa.com
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
If i remove "ip host aaa.com 1.1.1.1"....
R25#ping aaa.com
Translating "aaa.com"...domain server (8.8.8.8)
05-10-2019 03:43 PM
Thanks. Looks like it maybe OS specific. I'm running 15.8(3)M0a (Classic IOS, not IOS-XE). Bummer!
05-11-2019 12:17 AM
i was thought the same due to old IOS.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide