Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 01-15-2018, 04:54 AM   #1
Registered: Sep 2005
Distribution: debian, linux from scratch
Posts: 190

Rep: Reputation: 51
Understanding dns and dhcp interaction on disconnect

Dear all,

I am working with a set of computers that share the same hostname.
Regulary, I am testing multiple of these computers on the same network on after another.

I sometimes notice that I cannot connect to the newly connected computer, because the local DNS record seems to point to the computer that was previously connected.

This let me to wonder what kind of caching exists for dns records.
Do name servers have a cache or are they always up-to-date?
I know my linux host has a cache. Is its time configurable or related to the TTL of a dns record?

Also could it happen that a DHCP lease would expire, while a dns cache still points to this IP?
I also had some difficulty finding the default DHCP lease time.
Could somebody also point me to a good source for that?

I hope you can give me some insight in these interactions.
It will surely help me a lot to know what is actually going on instead of just waiting for some cache somewhere.

Best wishes,
Old 01-16-2018, 08:20 AM   #2
Registered: Aug 2002
Posts: 25,475

Rep: Reputation: 5836Reputation: 5836Reputation: 5836Reputation: 5836Reputation: 5836Reputation: 5836Reputation: 5836Reputation: 5836Reputation: 5836Reputation: 5836Reputation: 5836
I don't claim to be an expert but most of the answers depend on what LOCAL DNS and DHCP server you are running and how they are configured.

The DNS can cache information as well as the client. While the DNS cache uses TTL the arp cache has its own timeout value. I run dnsmasq which sets local TTL at 64 and I believe the default arp cache is 60 seconds.

When the computer shuts down the DHCP server should release the address but will not reuse it until the lease expires or if necessary due to running out of unused addresses. Default lease times for SOHO routers are typically in days.
1 members found this post helpful.


cache, dhcp, dns, lease, ttl

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I perform maintenance on a master DNS/DHCP (BIND9/ISC-DHCP) Ubuntu server? Sniperm4n Linux - Server 2 09-09-2013 02:19 PM
Baffling DNS from a DHCP server problem. Appears to be ignoring dhcp.conf royce2020 Linux - Networking 1 02-16-2010 01:40 PM
help understanding dhcp dvdljns Linux - Networking 21 11-07-2009 10:55 PM
How do I manually disconnect/reconnect DHCP DSL internet connection? chaz_bro1972 Linux - Networking 34 06-06-2008 02:17 AM
Understanding DHCP Host Name Woodsman Slackware 9 09-26-2006 10:24 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:32 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration