Monday, August 02, 2004

resolv.conf issues

I had a tough time dealing with network issues for the past couple of
days. I usually like a few different search fields in my resolv.conf so
I can connect to my regular servers without typing the FQDN. So, I
wrote a cron job that runs every minute as root and updates
/etc/resolv.conf, which works so well on my Linux machine.

It worked well on my Mac too .... till I went home and connected to my
wireless network at home. resolv.conf refused to update itself to
whatever network I connected and I had to manually change it to the
Comcast domain and nameserver. Same thing when I returned to office
today, it still had the Comcast information.

Searching on the web didn't get me good leads till I was persistent.
One article mentioned something about /var/run/resolv.conf which made
my error clear. When I connect to a different network, lookupd seems to
update /var/run/resolv.conf and /etc/resolv.conf was just a link to
this file. I broke that link and broke my network preferences. Just
repairing that link solved my problem.

I'll have to think of a more intelligent way to write my cron script
... maybe update /var/run/resolv.conf, but for now I'm all set.

Keywords : DHCP, nameserver, domain, resolv.conf

0 Comments:

Post a Comment

<< Home