Broke My DNS

Here’s a quick summary: Was using my corporate 3G wireless card for a business trip over the weekend and a well known issue with AT&T and linux is that the card will connect, but it won’t retrieve the name servers. So my workaround for this was to edit my resolv.conf to include the name servers from OpenDNS which resolved the issue.

Now that I’m back in the office I can’t ping or talk to anything by name internally because my laptop is trying to look them up via OpenDNS. So I went back and cleared out my resolv.conf file to put it back to normal (empty), but now when I log in or reboot it won’t find my internal name servers. It should be pooling them from DHCP, but apparently that’s not happening.

Any ideas?

Hi
Check in YaST -> Network devices and see that the box is checked to get
them via DHCP. Now once you locate the work ones, make a note of them
and then disable the DHCP option.

Now edit your resolv.conf file and add the openDNS ones and you should
then be good to go.

It may even be worthwhile to split the order as well for quicker
lookups depending where you are, eg

  1. work pri dns
  2. openDNS pri dns
  3. work sec dns
  4. openDNS sec dns


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.1 (i586) Kernel 2.6.27.21-0.1-pae
up 14:42, 1 user, load average: 0.10, 0.11, 0.08
ASUS eeePC 1000HE ATOM N280 1.66GHz | GPU Mobile 945GM/GMS/GME

No dice.

Everything in Network Settings is set to the defaults and DHCP. Even if I change it to manage via ifup and have it write the new configs, reboot or logout, change it back to KNetworkManager, etc. it doesn’t fix it.

My /etc/resolv.conf is set back to the default and so is /etc/sysconfig/network/config (aka netconfig).

Statically setting the nameserver IPs is a not an option for me as I’m often connected internally at my client locations and need to pick up their name servers via DHCP as well.

I’m officially lost.

One thing to add as well:

It’s picking up my two domain controllers and getting the IP address via DHCP, just not the DNS entries.

martian source 255.255.255.255 from 192.168.111.202, on dev wlan0
ll header: ff:ff:ff:ff:ff:ff:00:50:56:a8:44:2a:08:00
martian source 255.255.255.255 from 192.168.111.206, on dev wlan0
ll header: ff:ff:ff:ff:ff:ff:00:1c:c4:e1:48:c2:08:00
SFW2-INext-DROP-DEFLT IN=wlan0 OUT= MAC= SRC=192.168.111.33 DST=224.0.0.251 LEN=375 TOS=0x00 PREC=0x00 TTL=255 ID=0 DF PROTO=UDP SPT=5353 DPT=5353 LEN=355

Hi
Nothing strange in your /etc/hosts? Disabled IPV6 system wide? (I rem
out the entries in /etc/hosts as well). All up to date system wide? I
use Gnome, so maybe a KDE user could offer some advice if you advise
the knetwork manager your running. Might also be worthwhile searching
the forum for dhclient.


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.1 (i586) Kernel 2.6.27.21-0.1-pae
up 21:02, 1 user, load average: 0.13, 0.14, 0.07
ASUS eeePC 1000HE ATOM N280 1.66GHz | GPU Mobile 945GM/GMS/GME

Solution time. Apparently netconfig isn’t happy when you mess with the /etc/resolv.conf file instead of using netconfig. Conveniently there’s an /etc/sysconfig/network/config.orig file to save you in case you decide to mess around with your networking. So I did a

cp config.orig config

from within the working directory and then ran a

netconfig update

which in turn rewrote a fresh /etc/resolv.conf file for me and named it resolv.conf.netconfig

I then did a

cp resolv.conf.netconfig resolv.conf

I logged out and back in. Went into Network Settings in Yast and gave control back to NetworkManager since resetting netconfig results in your network being managed via ifup. NetworkManager is finicky for me for some reason and always requires a reboot to take control back. Rebooted the system and now I’m back to grabbing my DNS servers via DHCP.

Hope that helps anybody that encounters a similar issue in the future.

Thanks for sharing this. This has been driving me nuts. I travel like you to a lot of different locations and my resolv.conf always is a challenge to get working. I’ve saved this post so I can continue to refer back to it.

I’m trying to understand why this is even happening. It’s a real pain to get networking to just work when your location changes every week. Especially when you are changing from wired to wireless.:’(