Things look quiet here. But I've been doing a lot of blogging at
dan.langille.org because I prefer WordPress now.
Not all my posts there are FreeBSD related.
I am in the midst of migrating The FreeBSD Diary over to WordPress
(and you can read about that here).
Once the migration is completed, I'll move the FreeBSD posts into the
new FreeBSD Diary website.
resolv.conf is being modified, and not by me (a DHCP problem)29 July 1998
This problem occurred because DHCP overwrites the contents of resolv.conf. and I
didn't know that. But you have quite a bit of control over what DHCP puts into that
file. Details are below.
29 July 1998
After my reboot as a result of my floppy disk mount exploits,
I found that the contents of resolv.conf had been modified.
What is dhcp?
DHCP (Dynamic Host Configuration Protocol ) is defined in RFCs 2131 and 2132 and
provides a client with a complete set of TCP/IP configuration values. In short, it
allows a client to obtain, among other things, an IP number, the name of the domain, and a
list of name servers.
I recommend you read the following book: TCP/IP Network
Administration by Craig Hunt and published by O'Reilly, ISBN
1-56592-322-7. This book is also known as the crab book (you'll know
why when you see the cover).
The problem
As mentioned above, I noticed a minor but very irritating problem. Whenever the
name was rebooted, the contents of resolv.conf would change and manual
modification was needed in order for the system to resolve names again.
domain www.example.org
nameserver 10.0.0.1 # my min-dns server
nameserver 11.22.33.44
nameserver 11.22.33.45
31 July 1998
It turns out that DHCP client will rewrite the contents of resolv.conf with the
information it obtains from the DHCP server. Well, that's not good enough.
The prepend command I used gave syntax errors. And my ed1 link
died. So I issued:
ifconfig ed1 inet 10.0.0.1 255.255.255.0
After several attempts. No luck.
prepend domain-name "www.example.org";
Neah. Still doesn't work.
Checking the documentation....
The example provided by man dhclient.conf shows the prepend statement
within the interface "ep0" {...} statement. I found this didn't
work for me and no effect on the contents of /etc/resolv.conf. My next
attempt involved moving the prepend command to be above the interface
command.
Ahuh!
Now I'm getting the following /etc/resolv.conf file:
For some reason the domain-name request is being prepended to the search
statement. Very weird. I'd like to remove the request statement altogether.
There is something in the manual about that. I'll check that again....
I tried removing the domain-name option from the interface
statement. That seemed to have nil effect.