resolver doesn't see resolv.conf changes

Lyndon Nerenberg lyndon at orthanc.ca
Thu Apr 6 22:03:40 UTC 2006


> Is the resolver supposed to periodically check for updates to the
> resolv.conf, or are the applications somehow caching the IP of the DNS
> server?

No, resolv.conf is only read once when the resolver routines initialize.

The solution is to run a local caching nameserver instance.  You should do 
this anyway, for performance reasons. Add 'named_enable="YES"' to 
/etc/rc.conf, and modify your /etc/dhclient.conf as follows:

interface "ath0" {
 	supersede domain-name "orthanc.ca";
 	supersede domain-name-servers 127.0.0.1;
}

interface "bge0" {
 	supersede domain-name "orthanc.ca";
 	supersede domain-name-servers 127.0.0.1;
}

Change the domain string to something more appropriate, and adjust the 
interface names to match your laptop. You'll need to start named and 
restart the dhclient instances (in that order) for the changes to take 
effect.

--lyndon


More information about the freebsd-stable mailing list