I've got a Ubuntu 10.04 laptop, and recently it's had some odd networking problems. It's on the home wireless router, supplied by the phone company, and has no problem talking to anything on the wireless LAN, whether by IP number or /etc/hosts name. It's set to use the wireless connection with DHCP, and there really isn't much I can screw up after that for network entries.

Right now, I can reach outside the LAN by IP number, but that doesn't do well for web surfing. When I do a nslookup, I'm getting non-authoritative answers, so I suspect I'm hitting a cache somewhere (probably the router). Any attempt to get outside the LAN with a domain name fails quietly, like a "can't find" using Firefox.

The only things that might have changed since it did work right are 10.04 updates (and there's been quite a few of them) and a couple of lines added to /etc/hosts, to address fixed IPs on the LAN (in the 192.168.0.* range). The lines are in the same format as others, and it's nothing I haven't done before with no ill effects.

1 Answer
1

On Ubuntu 10.04, you can configure the networking so it gets only your machine's IP via DHCP, but lets you set everything else statically. In System > Network Connections, go into your wireless card's setup and select "Automatic (DHCP) addresses only" from the Method drop-down. Below, you will then be able to give static DNS server addresses.

This feature is common on lots of OSes, though there is no agreement on what to call the feature or where to put it. The Arch Linux info in the comment below is one possibility. OS X and Windows can do it, too.

If your system truly has no such feature, you can can temporarily overwrite /etc/resolv.conf to try out a different set of DNS servers. Such changes will persist until the next DHCP lease renewal.

Regardless, the way to debug a problem like this is to try using a public DNS service instead of your phone company's. I like to use Google's public DNS servers, since their addresses are easy to remember:

8.8.8.8
8.8.4.4

Another popular public DNS service is OpenDNS, whose servers are:

208.67.222.222
208.67.220.220

If that works, you can just keep using these servers, since they likely have advantages over the generic DNS services provided by your ISP. Or, you can then start from a position of being able to blame the phone company's DNS in some way and attack the problem from that direction.

If this change doesn't help, you've exonerated the phone company's DNS servers, so you know the problem is inside the house.

doesn't ubuntu have a way of saying add this by dhcp but keep this other stuff static. Arch has resolv.conf.head and resolv.conf.tail that you can add which will insert those settings before and after the dhcp generated settings respectively.
–
xenoterracide♦Sep 4 '10 at 17:52