0

I have a linux client that when i restart it doesnt answer my ping requests on its DNS name, but it does on its IP. Say that i have a hostname of "Linux" with ip "192.168.1.100" .. My router is working as a DNS gateway, which another client (my pc) is set to use. Same goes for the Linux Client..

When the Linux client is online, i can ping it using both the IP and DNS from my PC.. If i then restart the linux client, and continue to ping its ip address and dns from my pc, i will ofcourse stop getting responses while its restarting, however i will begin getting responses when its back up, but only from the IP address, not from the DNS.. Why is this? The short time the linux machine has been offline shouldnt change any DNS records should it?

I will continue to not get replies from its DNS name for a longer time, unless i do a ipconfig /flushdns on my pc, then i immediately begin getting replies from DNS ping requests. However i do not understand why the flushing is neccesary as the linux clients ip hasn't changed.

Is there a way to fix this ? Is it something i have to configure on the linux device somehow ?

2
  • the linux client is definitely using a static IP? On your pc, what is the output from nslookup for the host before you flush dns? and after?
    – pete
    Mar 17, 2016 at 23:10
  • Which DNS? ISC Bind? What is handing out IP's? ISC dhcpd? It makes a lot of difference to how the release/renew takes place. There is no reason that you shouldn't have an IP for Linux as soon as dhcpcd is run, but depending on your setup the old IP can be cached on the client and unless you are broadcasting the change, the old record is likely still held by its peers. Mar 18, 2016 at 6:41

2 Answers 2

2

This is probably caused by your DHCP daemon that issues dynamic DNS updates. When shutting down the Linux box it probably releases its DHCP lease, causing the DHCP server to delete the DNS record for it.

Your windows client then receives a negative DNS response while the Linux box is rebooting.

When the Linux box returns, it acquires a new DHCP lease, the DHCP daemon adds a new DNS record, but the Windows client still has its negative response cached.

Possible solutions would be lowering the default/negative cache TTL of your DNS, raising the TTL of the dynamic DNS resources created by the DHCP daemon, or ditching DHCP in favor of static IPs and DNS records.

0

Also you might want to check the alphabetical order of the enabled services at startup in /etc/rc.d/rc3.d (everything beginning with an 'S'). If you have a lot of services starting up and some are taking a while then you can move / rename the one that starts bind (named) to a lower number (but not too low) and it should start sooner. Also you might check what is it /etc/resolv.conf. You might get better lookups going directly to Google's lookup (ip 8.8.8.8 and 8.8.4.4) service.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .