I've been having some fairly major problems with my DNS for the last two years or so. I previously solved them by simply connecting my Ubuntu machine to an ethernet port, which worked fine, but I have moved house and can't do this at my new address.
For those who live in the UK, by internet is provided by BT. A few years ago, Ubuntu would connect to the BT Home Hub (then v2, now v3) but when I tried to load any pages in Chrome, I would be met by: 'The server at www.example.co.uk can't be found because the DNS look-up failed'.
I looked around for a solution to this error, and simply switched my DNS to Google's ( 22.214.171.124 ) in /etc/resolv.conf. This worked fine on wired ethernet.
Since I moved house, my laptop connects to the wireless and displays the same DNS message. I changed the DNS settings to point to Google, which works fine for a few minutes and then fails.
I thought that /etc/resolv.conf might be getting overwritten, but this is not the case.
The problem was then (and still can be) fixed (for five more minutes) by simply restarting the network again:
sudo /etc/init.d/networking restart
I have toyed with the idea of writing a cron job to simply restart my network interfaces every few minutes, but this is messy and inefficient and I would rather have a proper solution.
Does anyone have any ideas about the situation?