resolv.conf vs. Claus - 1:0 (11 Oct 2012)

After upgrading to Ubuntu 12.04, I started seeing pretty funny DNS behavior. For example, I could connect to a wireless network successfully, but still could not connect to external IP addresses because of DNS resolution problems.

After a lot of fiddling, I realized that the problem is probably related to resolvconf and its main configuration file, /etc/resolv.conf. On my system, this file sometimes disappears, and sometimes it loses its previous entries.

So far, I have learned that Ubuntu 12.04 indeed introduced a new approach of handling DNS resolution and in particular the resolv.conf file. If my understanding is correct, whenever the system finds a DHCP server, it is supposed to re-create the /etc/resolv.conf file using DNS information it receives via DHCP.

The discussion at http://askubuntu.com/questions/130452/how-do-i-add-a-dns-server-via-resolv-conf hints at similar problems. But I guess I do not know enough about Ubuntu's networking internals to really understand what is going on, unfortunately frown

The following voodoo script sometimes helps me to resurrect /etc/resolv.conf with sufficient DNS information in it. But it drives me mad that I don't have the slightest clue what I am doing there. If you read this and feel an urge to slap your forehead, feel free to consider me a raving idiot, but do drop me a line to help me educate myself on this issue. Thanks.

#! /bin/bash
pushd /etc
if [[ -r resolv.conf ]]; then
  if [[ ! -L resolv.conf ]]; then
    mv resolv.conf /run/resolvconf
    ln -s /run/resolvconf/resolv.conf
  fi
fi
popd
resolvconf --enable-updates



When asked for a TWiki account, use your own or the default TWikiGuest account.



to top

You are here: Blog > DefinePrivatePublic20121011ResolvConf

r1.1 - 11 Oct 2012 - 18:04 - ClausBrod to top

Blog
This site
RSS

  2017: 12 - 11 - 10
  2016: 10 - 7 - 3
  2015: 11 - 10 - 9 - 4 - 1
  2014: 5
  2013: 9 - 8 - 7 - 6 - 5
  2012: 2 - 10
  2011: 1 - 8 - 9 - 10 - 12
  2010: 11 - 10 - 9 - 4
  2009: 11 - 9 - 8 - 7 -
     6 - 5 - 4 - 3
  2008: 5 - 4 - 3 - 1
  2007: 12 - 8 - 7 - 6 -
     5 - 4 - 3 - 1
  2006: 4 - 3 - 2 - 1
  2005: 12 - 6 - 5 - 4
  2004: 12 - 11 - 10
  C++
  CoCreate Modeling
  COM & .NET
  Java
  Mac
  Lisp
  OpenSource
  Scripting
  Windows
  Stuff
Changes
Index
Search
Maintenance
Impressum
Datenschutzerklärung
Home



Jump:

Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback