10-19-2020 07:06 AM
Hello,
I tried looking around, but couldn't find it. On a Cisco router (2911/2951) is there a way to 'drop'/refresh the current DNS cache or just one entry?
thanks,
Ron
10-19-2020 07:10 AM
i do not believe any option available on router, is this router act as DNS Server ? you can play with ttl settings.
10-19-2020 07:22 AM
Hello,
yes it does DNS for some local hosts, and consequently caches DNS lookups. Of course I can change TTLs, but that's not ideal, and of course a reload will get rid of it too, but that's also not ideal.
thanks,
Ron
10-19-2020 07:57 AM
cannot find a direct "clear dns" command
but I suggest to try "no domain lookup" or "no ip domain lookup" and then re-enabling
Note |
DNS lookup and DNS forwarding are configured separately. The domain lookup command enables the resolution of internally generated DNS queries handled using the DNS view. The dns forwarding command enables the forwarding of incoming DNS queries handled using the DNS view. By default, both domain lookup and DNS forwarding are both enabled for a view. If you then configure no domain lookup , DNS forwarding is still enabled. However, if you instead uses the older Cisco IOS command no ip domain lookup to disable domain lookup for the global default view, then DNS forwarding is disabled automatically. This is done for backward compatibility with the functionality of the no ip domain lookup global command. |
10-19-2020 12:57 PM
Hello,
I just tried that but noticed that when I disable domain lookups, it still does that. nless of course it ws cached "somewhere else"
10-19-2020 08:08 AM
Hello,
I wonder if you can use the exec command 'clear host *' in conjunction with an EEM script ? The below applet would run once every 60 minutes:
event manager applet CLEAR_HOST
event timer watchdog time 3600
action 1.0 cli command "enable"
actiion 2.0 cli command "clear host *"
10-19-2020 12:59 PM
Hello Georg,
I don't have a need to clear the DNS cache that often. Just once in a rare while.
thanks,
Ron
10-19-2020 01:40 PM
Hello,
you can change that value to anything you want.
Once a week would be:
event timer watchdog time 604800
10-19-2020 01:49 PM
Hi Georg,
I figured I can change that, but I only need to do that every so many months, if that. This router is behind a dynamic IP and I use dyndns, but somehow it takes a bit before my router makes that change.
Of course that dynamic IP address change just happened while I was switching from one router to another. I just did a quick reload, that works too. (however port forwarding now seems broken, so I'm looking into that.)
thanks,
Ron
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