Which devices store DNS cache and how to flush?

2

If a computer is running Windows its DNS cache can be flushed with ipconfig /flushdns but am I correct that routers also often store DNS cache? I'm assuming the ipconfig command doesn't flush the router, and that most routers would flush their cache on a power cycle? So does this mean if there's issues with an invalid DNS entry each intermediary router may not to be power cycled?

northerner

Posted 2017-07-29T08:39:54.547

Reputation: 1 085

Invalid cache responses usually have a relatively short timeout and all well-functioning intermediaries will flush the response at the end of that timeout. If the authoratative DNS says a request is invalid, it is, If your Windows device is unable to connect to DNS, it will cache entries as invalid. ipconfig /flushdns will clear these one you fix connectivity. If you change networks, DNS validity may change, and /flushdns will fix this. In either case upstream DNS will not have cached invalid data. – BillThor – 2017-07-29T11:30:15.587

@BillThor this was for a smart TV and no one knew how to flush the dns cache on it. – northerner – 2017-07-30T23:15:41.177

A Smart TV the cache may flush DNS if you reconfigure the network. They usually have continuous power, so you may need to unplug it for several seconds to clear volatile memory. I wouldn't expect a Smart TV to do a query that caches an invalid value very often. – BillThor – 2017-07-31T01:43:20.213

Answers

4

[A]m I correct that routers also often store DNS cache?

Some do but it depends entirely on the router, firmware involved and the current settings if applicable.

I'm assuming the ipconfig command doesn't flush the router[?]

No it does not.

[I'm assuming most] routers would flush their cache on a power cycle?

Again, it depends entirely on the router and firmware involved. That said, it would likely not be unexpected behavior.

So does this mean if there's issues with an invalid DNS entry each intermediary router may [need] to be power cycled?

It could be a possibility, yes, at least if you want them to immediately forget any cache entries (assuming a power cycle would do this).

If they were doing caching, it might also be possible to log into them manually and clear the cache.

Anaksunaman

Posted 2017-07-29T08:39:54.547

Reputation: 9 278

1

Which devices store DNS cache and how to flush?

Almost all DNS servers store DNS cache. Depending on your network requests will usually pass through one or more recursive DNS servers. Normally, they will all cache the data for the time specified by the upstream DNS server.

Most recursive DNS servers will flush their cache when they are restarted. Other than that they usually do not have a method to flush cache. Cached values just time out and get replaced by new values as needed. If the cache size is limited, inactive cached values may be removed from cache before they time out.

Your home router may have a DNS server which may be able to cache DNS values. They are usually configured to use your ISP's DNS servers, which in turn may connect to other recursive servers. Your ISP's DNS servers and other upstream DNS servers are unlikely to be flushed unless they are upgraded or the server is rebooted.

People who maintain DNS tables generally set short timeout values when making changes. This ensures that properly functioning DNS caches clear incorrect values quickly if a mistake is made or a value is being changed. Once the change is verified, the timeout may be increased.

Authoritative DNS servers are almost always configured so that there are redundant servers on different networks to ensure that at least one server is always available.

BillThor

Posted 2017-07-29T08:39:54.547

Reputation: 9 384