dhclient and host resolution

Killermink ! killermink at hotmail.com
Sun Apr 18 02:45:20 PDT 2004

Thats fantastic it works!

I thought it would be something simple...

I tried a

$more  /etc/resolv.conf

But the file did not exist.  So I su'ed and

#echo "nameserver" > /etc/resolv.conf

(this is the correct IP for the Mac)


#ping www.google.com

And it worked immediately!  Thanks very much, I feel pretty stupid with such 
an easy answer, but shouldn't this info be provided by dhclient?  If I move 
to another network, say with a gateway of 10.x.x.x or other, will I have to 
change resolv.conf again?  Is there anyway to get this automatically or is 
it a feature of FreeBSD/dhclient?

Many thanks again!

----Original Message Follows----
From: Olaf Hoyer <ohoyer at ohoyer.de>
To: Killermink! <killermink at hotmail.com>
CC: freebsd-questions at freebsd.org
Subject: Re: dhclient and host resolution
Date: Sun, 18 Apr 2004 11:21:42 +0200 (CEST)

On Sun, 18 Apr 2004, Killermink ! wrote:

 > Hello,
 > I have a Apple PowerBook running Panther and have set it to share my 
 > internet connection over the Ethernet port.  FreeBSD is connected to this
 > and should get all config via DHCP.  When dhclient runs, it successfully
 > gets an IP Address from the Powerbook, and I can ping between machines... 
 > quick look at the leases file also shows that it has the Powerbook as the
 > Gateway and as the DNS server.   However, I can only get to the Internet
 > from the BSD box using IP addresses, trying a url such as www.google.com
 > always fails as it cant resolve the host, plus the response is immediate 
 > if it hasn't tried or waited for a response.

Well, sound like DNS prblems.

What is the content of your /etc/resolv.conf?

then, when there is an entry like:


( being the IP of the MAC), then check if the DNS on your MAC
is working by:
nslookup -

set q=any

Well, then your MAC should resolve some IP and mx data, when not, the
DNS on your MAC is misfunctional.
You also can specify DNS in the /etc/resolv.conf that are on the
outside, or you could run named as caching resolver.

Therefore, populate /etc/hosts with the IP/name of FreeBSD box, run
and then start named.

In /etc/resolv.conf put a :

as first nameserver statement, and FreeBSD will directly resolve...


Olaf Hoyer        ohoyer at gaff.hhhr.ision.net
Fuerchterliche Erlebniss geben zu raten,
ob der, welcher sie erlebt, nicht etwas Fuerchterliches ist.
(Nietzsche, Jenseits von Gut und Boese)
freebsd-questions at freebsd.org mailing list
To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"

It's fast, it's easy and it's free. Get MSN Messenger today! 

More information about the freebsd-questions mailing list