[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dhcp connects but cannot resolve names



On Mon, 4 Feb 2008 13:15:17 +0100, oxy <oxyopes@googlemail.com> wrote:
> me% dhclient ath0
> There is already a pid file /var/run/dhclient.pid with pid 5104
> killed old client process, removed PID file
> Internet Systems Consortium DHCP Client V3.0.4
> Copyright 2004-2006 Internet Systems Consortium.
> All rights reserved.
> For info, please visit http://www.isc.org/sw/dhcp/
> 
> wifi0: unknown hardware address type 801
> wifi0: unknown hardware address type 801
> Listening on LPF/ath0/<hardware address>
> Sending on   LPF/ath0/<hardware address>
> Sending on   Socket/fallback
> DHCPREQUEST on ath0 to 255.255.255.255 port 67
> DHCPACK from 192.168.2.1
> bound to 192.168.2.36 -- renewal in 164964 seconds.
> 
> me%  ifconfig ath0
> ath0      Link encap:Ethernet  HWaddr <hardware address>
>           inet addr:192.168.2.36  Bcast:192.168.2.255  Mask:255.255.255.0

The DHCP server at 192.168.2.1 handed you an address - OK.  It should have also handed the client additional network information such as a default route, name servers, etc.

> me% route add default gw 192.168.2.36

This is incorrect.  The gateway will be a router - you have defined the default gateway to be your own client machine.  I would start over downing the ath0 interface, and going back through your routine, stopping after you get an IP from 'dhclient ath0'.

Assuming the DHCP server is also the gateway router (and the DHCP server is configured properly), you should already have a default gateway route of 192.168.2.1.  What is the output of the command 'route -n'?

> me% nslookup www.yahoo.com
> ;; connection timed out; no servers could be reached

Check the contents of /etc/resolv.conf for 'nameserver [IP_address]' entries.  'cat /etc/resolv.conf'?  Can you ping those IP addresses?

To see what the DHCP server is actually handing the client, 'cat /var/lib/dhcp3/dhclient.ath0.leases', please.

-- 
Kind Regards,
Michael Shuler


Reply to: