Bug 55173
| Summary: | hostname set by dhcp can't be resolved | ||
|---|---|---|---|
| Product: | [Retired] Red Hat Linux | Reporter: | John <jsk29> |
| Component: | dhcpcd | Assignee: | Elliot Lee <sopwith> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 7.2 | CC: | gina, netdragon |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2004-06-28 17:05:06 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
John
2001-10-26 16:29:39 UTC
I am having exactly the same problem, and everything worked fine with redhat 7.0 and 7.1, so its a bit weird. I would be glad to know of the proper fix. For the time being i am just setting hostname manually. In the file /etc/sysconfig/network-scripts/ifup, I commented out the line:
DHCPCDARGS="${DHCPCDARGS} -H".
This stops dhcpcd from setting the hostname. The initscripts then use some other
method to set the hostname, which I assume was what happened before redhat 7.2.
In my case this fix works perfectly.
One of the scripts involved by "/etc/init.d/network start" rewrites /etc/resolv.conf setting "domain" and "search" and "nameserver". If your ISP dhcpd did it wrong (e.g. mine sets my IP to resolve as "xxxxx.abo.wanadoo.fr" but sets my "domain" (and "search") as "wanadoo.fr". So several services such as "lpd", "gdm", "fetchmail"(?) will not start. The fix could be not to rewrite the "search" parameter at least: Most sysadmins do know what to search! I do believe this is fixed in the latest initscripts/dhcpcd - please try them out of rawhide (may need to rebuild). I am having the same problem with Redhat v7.2. I have been on two separate cable ISPs, and both ISPs had the same problem (Roadrunner and Cox). I also get that error on Gnome startup, and can't ping my hostname. I could fix the problem (temporarily) by going into the "Network configuration wizard" and removing some of the entries on the DNS tab and rebooting. It doesn't seem to work anymore, though. My domain name is: ipXXX-XXX-XXX-XXX.ri.ri.cox.net My hostname changes on occasion and so does my ip, so I can't add that to /etc/hosts without having to change it each time. where the XXX represents numbers. I also have problems with X server saying unknown host on startup and proftpd saying it can't find the domain name for a particular ip. Here is a thread where some talking has gone on about the issue: http://www.linuxquestions.org/questions/showthread.php?s=&threadid=16880&perpage=15&pagenumber=1 It also contains some information about my setup (my name is netdemon on it and my posts start on the second page). Unfortunately, no one could help me there. From what I found from searching the web, this problem is very widespread for people without routers on many distributions: http://groups.google.com/groups?hl=en&lr=&ie=UTF8&oe=UTF8&th=528bc591343e9697&rnum=2 http://groups.google.com/groups?hl=en&lr=&ie=UTF8&oe=UTF8&th=dbb9dd9b45e036cb&rnum=5 http://groups.google.com/groups?hl=en&lr=&ie=UTF8&oe=UTF8&th=5699ac1655b14d87&rnum=15 http://groups.google.com/groups?hl=en&lr=&ie=UTF8&oe=UTF8&th=b8ccd642000ecc8d&rnum=19 http://pub14.ezboard.com/fnutzboardfrm17.showMessage?topicID=43.topic&index=2 http://www.geocrawler.com/mail/msg.php3?msg_id=4896730&list=263 No one was able to help me in irc.openprojects.org #redhat. Please come up with a solution. This is really aggravating :-( mwalton: What you did seemed to solve my problem. Do you think that the command "dhcpcd -H" has a bug? I don't really understand dhcp that well, so I wouldn't know the answer to that question.I have seen this happen to people on even BSD, so I assume that it is a problem with certain ISPs that might be somewhat new due to changes in the way the ISPs operate (or maybe a regression in the code). sopwith: If the problem seems to be the dhcpcd utilities on all Unix systems, what do you mean by initscripts/dhcpcd? I might be wrong (which I problably am), but the problem seems to appear in /sbin/dhcpcd -H I'm on 7.2 here, and connected to comcast.net
1:06am {21} pcp01487252pcs:/var/log># cat
/etc/sysconfig/networking/devices/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=dhcp
DHCP_HOSTNAME=cn2473162-a
both originally and currently, setting the DHCP_HOSTNAME in this file caused me
to have the correct hostname .. originally it was cn2473162-a, but currently
comcast changed how its dhcp works, and now no longer needs the client-id set,
other than that it does need to have *something* there (could be a random string
of chars like ahsjdgajgd)
currently I get :
12:55am {20} pcp01487252pcs:/var/log># hostname
pcp01487252pcs
and that varies over time ultimately since I am on dynamic IP.
I also have echo "1" > /proc/sys/net/ipv4/ip_dynaddr
set in /etc/rc.d/rc.local
I can't think of anything else I changed. nothing in /etc/hosts gets changed by
this. my /etc/resolv.conf looks like this:
domain limstn01.de.comcast.net
nameserver 68.82.0.6
nameserver 68.82.0.5
search limstn01.de.comcast.net
I can't recall whether I set that manually or whether the system configured that
on its own at boot time. it just works. the problem may be with your cable
providers. not sure. This worked on an old 486 DX-2/66 with ancient ISA RealTek
8019a card, and currently with ne2k-pci-driver and 8139too-driver using PCI
cards in the new Duron 1.1Ghz box.
|