openSUSE: Force to get DNS server from DHCP

1

1

I recently reinstalled my system with a opensuse 13.1 and of course nothing works as it was before... So I have a Wifi at home, which worked perfectly. Connecting to the Wifi at work works concerning IP addresses but does not update the DNS information in /etc/resolve.conf, which I had changed at home to include some openDNS servers.

dhcpcd worked perfectly on my old installation does not exist anymore and the replacement dhclient does not change the /etc/resove.conf anymore.

So in the end my question is: How can I force my computer to get a DNS configuration from the DHCP server?

Thanks!

freeone

Posted 2014-05-12T15:37:54.987

Reputation: 13

Answers

3

It happened to me just now after an update in Tumbleweed. To fix it you delete /etc/resolv.conf and reboot. Next login you will resolve from DHCP. Looks like files take precedence over DNS.

-EDIT-

Just to expand the answer.

/etc/resolv.conf

This file was not present before the update in my system. It was created right after the update and it was empty.

If I add nameserver 8.8.8.8 to it, or even nameserver 192.168.100.1, DNS works again.

This file is read by the NetworkManager. I'm not sure if Wicked also uses it.

The DNS search order seems to be affected by the lines inside /etc/nsswitch.conf.

Jon Mod

Posted 2014-05-12T15:37:54.987

Reputation: 31

This has been bugging me for a couple weeks. Now to figure out the screen flickering issue I'm having. >_< – Jonathan Landrum – 2016-09-26T19:22:33.713

@JonathanLandrum I'm also having this screen flickering problem. I'm guessing it is related to XFCE, more specifically because some customization I've installed. I'm moving to the last version of Leap to see if it persists. – Jon Mod – 2016-09-27T22:20:09.080

0

Your /etc/dhcp/dhclient.conf file should contain the following line:

request subnet-mask, broadcast-address, time-offset, routers,
    domain-name, domain-name-servers, domain-search, host-name,
    dhcp6.name-servers, dhcp6.domain-search,
    netbios-name-servers, netbios-scope, interface-mtu,
    rfc3442-classless-static-routes, ntp-servers,
    dhcp6.fqdn, dhcp6.sntp-servers;

I think this is self-explanatory.

MariusMatutiae

Posted 2014-05-12T15:37:54.987

Reputation: 41 321

1I tried it and it does not seem to change the behaviour. Opensuse seems to be using netconfig but I could not find out, how I can update the configuration. Right now the computer is connected to the Wifi as far as the NetworkManager shows me but does again not propagate DNS server address. I tried netconfig update -f but it did not work. Any ideas? – freeone – 2014-05-13T15:03:52.313