[OT] resolv.conf and dhclient
Damian Gerow
dgerow at afflictions.org
Mon Jun 5 13:41:04 UTC 2006
I've recently run into a situation similar to the original posters, and...
Thus spake Karol Kwiatkowski (freebsd at orchid.homeunix.org) [05/06/06 08:55]:
: > What is the best approach to keep dhclient from overwriting
: > /etc/resolv.conf every time it gets a new lease on an IP address? This
: > has been a frustrating search as Google has turned up next to nothing on
: > the issue other than a hack into a script file which should be
: > overwritten when world is rebuilt.
:
: If I'm getting your question right - isn't 'supersede' option in
: dhclient.conf(5) what you want? Something like:
Unfortunately, supersede doesn't cut it (for me).
I have two interfaces, one wired and one wireless. Both addresses are
negotiated via DHCP. However, I do /not/ want to use the DNS servers
provided via the wireless connection.
Short of statically mapping my DNS servers into place (something I'd really
rather avoid), there is nothing I can do. Even if I coax the wired
interface into negotiating its address second, as the lease times on the two
links are different, I will be flip-flopping betwixt the two sets of DNS
servers for the duration of the connection.
I've often wondered why dhclient.conf doesn't have an 'ignore' directive.
There's a 'require' in there; it doesn't seem like much of a stretch to
'ignore' something.
- Damian
More information about the freebsd-stable
mailing list