cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3785
Views
5
Helpful
8
Replies

Cisco 2911/2951 DNS cache

roncro
Level 3
Level 3

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

8 Replies 8

balaji.bandi
Hall of Fame
Hall of Fame

i do not believe any option available on router, is this router act as DNS Server ? you can play with ttl settings.

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

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

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.

 

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"

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 *"

Hello Georg,

 

I don't have a need to clear the DNS cache that often.  Just once in a rare while.

 

thanks,

 

Ron

Hello,

 

you can change that value to anything you want.

 

Once a week would be:

 

event timer watchdog time 604800

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

Review Cisco Networking for a $25 gift card