static leases conflict with /etc/hosts

Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking
Author Message
johnnyNobody999
DD-WRT Guru


Joined: 10 Jan 2014
Posts: 504

PostPosted: Fri Feb 14, 2020 18:20    Post subject: static leases conflict with /etc/hosts Reply with quote
Why doesn't static leases in Services->Static Leases overwrite corresponding entries in the /etc/hosts file? I made changes to my static leases but now I get many of these syslog entries for devices that had their static address changed:

Feb 14 10:13:35 wrt3200acm_master daemon.warn dnsmasq-dhcp[26148]: not giving name <redacted> to the DHCP lease of #.#.aa.x because the name exists in /etc/hosts with address #.#.aa.y

WRT3200ACM firmware r42335
Sponsor
Wildlion
DD-WRT Guru


Joined: 24 May 2016
Posts: 1413

PostPosted: Fri Feb 14, 2020 19:01    Post subject: Reply with quote
Those leases go to the dhcp server, which does not have to use the hosts file. THe hosts file is for the operating system and programs if they choose to use it. Then you have dns that can uses the hosts file as well as its own database.
johnnyNobody999
DD-WRT Guru


Joined: 10 Jan 2014
Posts: 504

PostPosted: Sat Feb 15, 2020 1:01    Post subject: Reply with quote
From what I've found it seems that editing /etc/hosts is not an easy task. The wiki says to create a startup script so that the changes are "permanent".
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum