Introducing DHCP
Subject:   Host name lookup failure
Date:   2003-04-22 20:17:41
From:   anonymous2
Greetings. Enjoyed the DHCP article.

Running FreeBSD 4.6.

I looked at my /var/db/dhclient.leases file and saw that I have (what looks like) a valid lease. I can ping IP addresses all day and I get a response. But when I try to ping "" or "" I get "ping: cannot resolve host name lookup failure."

I can see in the leases file that the correct domain name server addresses are being picked up but there seems to be a disconnect somewhere. Also, I do NOT have an /etc/resolv.conf file but don't know why I'd need to create one if I'm using DHCP.

Any ideas?



Full Threads Newest First

Showing messages 1 through 1 of 1.

  • Host name lookup failure
    2003-12-15 18:04:31  anonymous2 [View]

    Usually a freebsd machine will create a resolv.conf file from the DHCP option in the DHCP offer:

    option domain-name-servers #.#.#.#, #.#.#.#;

    1) make sure that the dns declaration in the dhcp lease is spelt correctly (i.e. is plural.)

    Also you can test the dns server itself:

    2) this will work if the dns server is working:
    -> dnsquery -n #.#.#.#
    #[replace #.#.#.# with the dns server given]
    #also try dig ( dig(0) )