Custom DNS not persistent on reboot


#1

Network is setup as DHCP. My expectation is that if I set a custom DNS on the interface, it persists on reboot. E.g. DHCP for the IP address, but retain my custom DNS entries. Agree?


#2

Possibly related to https://dev.haiku-os.org/ticket/6915


#3

Hm, that ticket is not only 8 years old, it seems to be using “DNS” interchangeably with “IP”, while our correspondent here clearly perceives a distinction.

But I sure have no idea, so I’m just going to suggest that it might help to know for sure, what “set a custom DNS” means. Put something in system/settings/network/hosts? Maybe the network router host has a local DNS service?


#4

It’s not the reboot that replaces your custom DNS servers’ IP addresses. It happens any time DHCP is used to update the settings. All custom settings are currently overwritten.

https://dev.haiku-os.org/ticket/6351


#5

By “Custom DNS”, I meant simply that I was overriding the DHCP assigned DNS from my router. E.g. my router assigns itself as DNS (10.0.2.1), and I replaced those with 8.8.8.8 and 8.8.4.4. I did this using by right clicking the network icon and going to network preferences and then changing DNS settings. My expectation is that there would be to permanently override that through GUI. Maybe I’m missed something.


#6

That’s indeed a feature currently missing in our DHCP client code: we don’t keep custom value saved in resolv.conf before (re)writing it after DHCP negociation. And we don’t keep it either if the DHCP server don’t push it again in its DHCP lease renew response.


#7

That strikes me as more of a bug than just a missing feature, but perhaps it’s a fine point - I don’t know how important it would be to anyone.


#8

You’re right, of course:
https://dev.haiku-os.org/ticket/6351