Bugzilla – Bug 596163
System does not use the hostname from dhcp server
Last modified: 2016-04-15 11:01:02 UTC
In openSUSE 11.3 Milestone 5 the Machine gets some random hostname. In Milestone 4 the same machine, after the installation got the hostname from the dhcp server.
I can confirm this. Neither the hostname, nor the search domains are set. I'm raising importance to "major", as for some services to work correctly (e.g. kerberos), a correct hostname is necessary.
Do you have NetworkManager running or ifup / sysconfig?
And provide also the output from "dhcpcd-test eth0" please and also "host IP.ADD.RE.SS".
Here is the ouput of "dhcpcd-test eth1": info, eth1: hardware address = 00:0d:61:06:d9:17 info, eth1: broadcasting for a lease debug, eth1: sending DHCP_DISCOVER with xid 0x4f26a5b2 debug, eth1: waiting for 10 seconds debug, eth1: got a packet with xid 0x4f26a5b2 info, eth1: offered 132.180.194.66 from 132.180.194.192 IPADDR='132.180.194.66' NETMASK='255.255.255.0' NETWORK='132.180.194.0' BROADCAST='132.180.194.255' ROUTES='' GATEWAYS='132.180.194.254' DNSDOMAIN='inf.uni-bayreuth.de' DNSSERVERS='132.180.194.192 132.180.17.1 132.180.17.129' NTPSERVERS='132.180.194.192' DHCPSID='132.180.194.192' LEASETIME='6000' RENEWALTIME='3000' REBINDTIME='5250' INTERFACE='eth1' CLASSID='dhcpcd 3.2.3' CLIENTID='01:00:0d:61:06:d9:17' DHCPCHADDR='00:0d:61:06:d9:17' info, eth1: exiting host 132.180.194.66: 66.194.180.132.in-addr.arpa domain name pointer resy-techniker.inf.uni-bayreuth.de. host resy-server: Host resy-server not found: 3(NXDOMAIN) => does not use search path "inf.uni-bayreuth.de" This is while using ifup. With NetworkManager the output of dhcpcd-test is the same, but the domain search path is correctly set in /etc/resolv.conf now: host resy-server: resy-server.inf.uni-bayreuth.de has address 132.180.194.192 Interestingly, if I switch back to if-up again (and call rcnetwork restart), the entries in /etc/resolv.conf are not removed, so it is still working. After I've played around a bit with /etc/resolv.conf, I noticed that rcnetwork restart now prints: ATTENTION: You have modified /etc/resolv.conf. Leaving it untouched... You can find my version in /etc/resolv.conf.netconfig ... Although I hadn't manually modified /etc/resolv.conf when it stopped working, maybe a modification made during factory update was mis-detected as a manual modification? When I delete both /etc/resolv.conf and /etc/resolv.conf.netconfig and restart the network, everything seems to work now. (Not removing NEEDINFO because I'm not the original reporter. @mmaher: Would be nice if you can confirm my findings.)
@marc: i can confirm you information.
(In reply to comment #4) > Although I hadn't manually modified /etc/resolv.conf when it stopped working, > maybe a modification made during factory update was mis-detected as a manual > modification? Hmm... Maybe. But I think, some program modified it (dhcp client started by the initrd / yast2 copied a config from install system / another software?). Do you have the "modified original"? When yes, please reopen and attach. Usually it is visible in the comment what modified it. I'm closing this bug report for now, because it didn't happened during my updates, but please reopen and attach the resolv.conf when it happens again. > When I delete both /etc/resolv.conf and /etc/resolv.conf.netconfig and restart > the network, everything seems to work now. BTW: A "netconfig update -f" or "netconfig update -m dns -f" should fix it too.
NetworkManager writes the resolv.conf directly too instead via netconfig.
Fixed. The request id is 42233.
This is an autogenerated message for OBS integration: This bug (596163) was mentioned in https://build.opensuse.org/request/show/42233 11.3 / NetworkManager