This discussion is archived
3 Replies Latest reply: Nov 12, 2012 5:29 PM by 834586 RSS

OL5U8 - flush dns cache query

834586 Newbie
Currently Being Moderated
Hi All,

I'm running OL5U8 on kernel 2.6.32-300.32.2.el5uek. The resolv.conf file points to two Windows 2008 DNS servers. Is there a way to flush the dns cache on OL5U8, something like ipconfig /flushdns in Windows?

What happen was I added a second nic card on a OL5U8 virtual machine and gave it a static ip address ending in .82. Only to find out there was a reverse pointer in the Windows DNS server with that address. So I changed it to .44 but every time I ping the hostname, its resolving to .82 instead of .44.

I've already added A record and reverse pointer for the hostname to the .44 address. The .82 reverse pointer is still there until I can find out from the team here why its there.

But is there a way to flush the dns cache from my other OL5U8 servers so they stop returning .82 when I ping the server? Dnsmasq and nscd are not being used with both services turned off.

I'll rather not restart the network service if I can avoid it.

Thanks.
  • 1. Re: OL5U8 - flush dns cache query
    834586 Newbie
    Currently Being Moderated
    Took a little while but name resolution has now come good on its own. But would be great if there was a way to expedite the process instead of waiting for it to correct itself over time. Thanks.
  • 2. Re: OL5U8 - flush dns cache query
    Dude! Guru
    Currently Being Moderated
    Caching is performed by your DNS server and web browser. Every DNS record has a TTL value defining it's time to live before it expires. As far as I understand, the Linux DNS resolver does not cache DNS records based on their TTL Value. You can enable DNS caching using the nscd daemon or dnsmasq. By default, both services are not enabled:

    chkconfig --list nscd
    nscd      0:off     1:off     2:off     3:off     4:off     5:off     6:off
    chkconfig --list dnsmasq
    dnsmasq      0:off     1:off     2:off     3:off     4:off     5:off     6:off

    If any of them are enabled, try "service restart nscd" or "service restart dnsmasq" to reset the cache.
  • 3. Re: OL5U8 - flush dns cache query
    834586 Newbie
    Currently Being Moderated
    Thanks Dude. Both nscd and dnsmasq are turned off, stock ol5u8 builds. I guess you are right that the caching was done by the windows DNS server which I suspect may have a TTL of an hour, hence it came good after about that time frame. Thanks again.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points