#6351: DHCP settings of different cards are mixed up
----------------------------------+----------------------------
Reporter: pulkomandy | Owner: nobody
Type: enhancement | Status: new
Priority: normal | Milestone:
Component: Network & Internet | Version: R1/Development
Resolution: | Keywords: dhcp, dns
Blocked By: | Blocking:
Has a Patch: 0 | Platform: All
----------------------------------+----------------------------
Comment (by IIsi50MHz):
On other OSes, I like being able to set DNS server IP addresses, as
overrides to DHCP. Haiku's Network preflet appears to allow this, and in
fact does save them to resolv.conf in whatever order your specify, but
once DHCP runs, it deletes them.
Being able to specify that you _do_ or _do_not_ want (for example) to use
Google's DNS servers at 8.8.8.8 and 8.8.4.4 is a desirable thing, as the
DNS servers provided via DHCP maybe be slow, buggy, or less trusted.
Looking at:
DNSTools::GetDNSServers(BObjectList<BString>* serverList) in
haiku/src/preferences/mail/DNSQuery.cpp
I see a TODO about wanting a function to retrieve the DNS list instead of
reading resolv.conf directly. I can see where it is just looking for the
nameservers in the file.
At first thought, it seems this and haiku/src/add-
ons/network_settings/dnsclient/DNSSettingsView.cpp could be a place to
start for allowing DNS server overrides. Possibly, resolv.conf and its
accessors could support a flag to force user-added entries to remain in
the list.
However, then a conceivable enhancement would be to store DNS servers per-
interface and per-wifi-access-point, instead of (or in addition to)
globally. It is conceivable, for instance, that:
1. A user might have an ISP-provided router at home that:
a. Tries to make itself the default DNS server.
b. Is terrible at its job as a DNS server (while remaining functions
work; ISP will not replace it)
2. While connected to that network, the user wants to specify different
DNS servers.
3. While connected to other networks, other DNS servers configure by DHCP
might be acceptable to the user.
A global override of DNS servers might be a good start, as it resolve the
original problem scenario. It could however, in rare(?) circumstances
possibly cause a user to need to enter the Network preflet and adjust
settings if they connect to a network where either certain DNS servers are
mandated or the user-specified overrides are not reachable.
To account for this, the DHCP-provided DNS servers could be tried after
any user-added DNS servers. This could make name-resolution noticeably
slower. To mitigate this, perhaps for the duration of an established link,
if user-provided nameservers are unreachable (after n attempts?), they
could be soft-flagged to be skipped.
Of course, the next thing somebody might ask for is a way to blacklist
nameservers, even if they are provided by DHCP...
--
Ticket URL: <https://dev.haiku-os.org/ticket/6351#comment:6>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.