Bug 140443 - /etc/resolv.conf not updated during dhcp configuration
Summary: /etc/resolv.conf not updated during dhcp configuration
Alias: None
Product: Fedora
Classification: Fedora
Component: dhcp (Show other bugs)
(Show other bugs)
Version: 3
Hardware: athlon Linux
Target Milestone: ---
Assignee: Jason Vas Dias
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2004-11-22 21:51 UTC by Will McCammon
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-11-23 14:18:05 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
/etc/sysconfig/network-scripts/ifcfg-eth0 (164 bytes, text/plain)
2004-11-23 13:46 UTC, Will McCammon
no flags Details

Description Will McCammon 2004-11-22 21:51:18 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5)
Gecko/20041111 Firefox/1.0

Description of problem:
/etc/resolv.conf is not updated during device startup and subsequent
dhcp configuration.  the user must edit /etc/resolv.conf and add the
ip address for the local dns server for every new network connected. 
this problem is more likely to affect laptop users who roam between

Version-Release number of selected component (if applicable):
3.0.1 release 11

How reproducible:

Steps to Reproduce:
1. configure eth0 to startup on boot
2. reboot on different network
3. note that eth0 starts up successfully
4. ping www.example.com fails because dns is not configured for the
new network
5. check /etc/resolv.conf.  indeed the file has not been updated.
6. note multiple instances of dhclient running

Actual Results:  /etc/resolv.conf was not updated by
/sbin/dhclient-script.  dns lookup failed because dns entries in
/etc/resolv.conf are not pertinent or current to the local area network.

Expected Results:  /sbin/dhclient-script should generate a new
/etc/resolv.conf upon network device startup and dhcp configuration. 
dns lookup should resolve successfully after updating /etc/resolv.conf
for the local area network.

Additional info:

possibly related - dhclient is running multiple instances.  see below:

[will@mary ~]$ ps auxww|grep dhclient
root      1406  0.0  0.1  2788 1028 ?        S<s  16:16   0:00
/sbin/dhclient -1 -q -cf /etc/dhclient-eth0.conf -lf
/var/lib/dhcp/dhclient-eth0.leases -pf /var/run/dhclient-eth0.pid eth0
root      1766  0.0  0.1  3788 1032 ?        S<s  16:16   0:00
/sbin/dhclient -1 -q -cf /etc/dhclient-eth0.conf -lf
/var/lib/dhcp/dhclient-eth0.leases -pf /var/run/dhclient-eth0.pid eth0
root      2320  0.0  0.1  2640 1024 ?        Ss   16:16   0:00
/sbin/dhclient -1 -q -cf /etc/dhclient-eth0.conf -lf
/var/lib/dhcp/dhclient-eth0.leases -pf /var/run/dhclient-eth0.pid eth0
root      2616  0.0  0.1  3096 1020 ?        Ss   16:16   0:00
/sbin/dhclient -1 -q -cf /etc/dhclient-eth0.conf -lf
/var/lib/dhcp/dhclient-eth0.leases -pf /var/run/dhclient-eth0.pid eth0
will      4337  0.0  0.0  5120  652 pts/1    R+   16:41   0:00 grep

i upgraded the distribution in question from fc2 to fc3 recently.  i
did not edit /etc/resolv.conf after the changeover.  therefore, the
contents therein have not changed regardless of the local area network
address or dns.

edit /etc/resolv.conf manually for every new network.

Comment 1 Jason Vas Dias 2004-11-22 23:10:44 UTC
I am not able to reproduce this problem.

Please supply further information:

1. Please append your /etc/sysconfig/network-scripts/ifcfg-eth0
   file to this bug. Is the PEERDNS variable set in ifcfg-eth0 ?

2. Are multiple dhclient instances run every time after rebooting ?

3. Do you use 'system-config-network' (neat) and  have network
   profiles defined ? If so, there should be only one alias for 
   eth0 - try moving the /etc/sysconfig/networking/profiles/
   directory and rebooting - does the problem still occur?

4. Do you use NetworkManager ? If so, disable it, and the 
   problem should go away.

5. Is your DHCP server supplying a DNS server ? You can check
   this by doing the following:
   # ifconfig eth0 down
   # pkill dhclient
   # ifconfig eth0 up
   # dhclient eth0 | tee /tmp/dhclient.out
   Please append the /tmp/dhclient.out file to this bug.


Comment 2 Will McCammon 2004-11-23 13:46:53 UTC
Created attachment 107297 [details]

Comment 3 Will McCammon 2004-11-23 14:07:43 UTC
thanks for your prompt reply.  answers to your questions below:

1. created ifcfg-eth0 attachment

2 [details]. yes. multiple instances of dhclient startup on every boot.

3. yes. i have multiple network profiles defined:

[will@mary default]$ pwd
[will@mary default]$ ls -l
total 28
-rw-r--r--  2 root root 119 Nov 22 14:55 hosts
-rw-r--r--  3 root root 164 Nov 22 14:55 ifcfg-eth0
-rw-r--r--  3 root root 310 Nov 22 14:55 ifcfg-eth1
-rw-r--r--  3 root root 142 Nov 22 14:55 ifcfg-Home
-rw-------  3 root root   5 Nov 22 14:55 keys-eth1
-rw-------  3 root root  19 Nov 22 14:55 keys-Home
-rw-r--r--  1 root root   0 Nov 22 14:55 network
-rw-r--r--  2 root root 141 Nov 22 14:55 resolv.conf

- eth0 is the hardwire 10/100BaseT ethernet device in question
- eth1 is a profile for my wireless card which btw, locks up the
machine when i insert it into the pcmcia slot.  see bug #
- Home is a profile that i setup after i filed this bug in order to
test ipsec... which doesn't seem to work either.  i'll file a bug on
this one later.

i haven't tried moving /etc/sysconfig/networking/profiles yet.  i'll
have to reboot and report back.

4. i'm not using networkmanager.
5. here's the output from those commands:

[will@mary network-scripts]$ cat /etc/resolv.conf
; generated by /sbin/dhclient-script
search mccammonenterprises.com
[will@mary network-scripts]$ sudo ifdown eth0
[will@mary network-scripts]$ sudo pkill dhclient
[will@mary network-scripts]$ sudo ifconfig eth0 up
[will@mary network-scripts]$ sudo dhclient eth0 | tee /tmp/dhclient.out
Internet Systems Consortium DHCP Client V3.0.1
Copyright 2004 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/products/DHCP

sit0: unknown hardware address type 776
sit0: unknown hardware address type 776
Listening on LPF/eth0/08:00:1f:b1:02:40
Sending on   LPF/eth0/08:00:1f:b1:02:40
Sending on   Socket/fallback
DHCPREQUEST on eth0 to port 67
bound to -- renewal in 10116 seconds.
[will@mary default]$ cat /etc/resolv.conf
; generated by /sbin/dhclient-script
search mccammonenterprises.com
-- snip --

/tmp/dhclient.out is empty:

[will@mary network-scripts]$ ls -l /tmp/dhclient.out
-rw-rw-r--  1 will will 0 Nov 23 08:58 /tmp/dhclient.out

Comment 4 Will McCammon 2004-11-23 14:17:27 UTC
mea culpa.  sorry.  problem solved.  i did not have PEERDNS set as you
indicated.  new ifcfg-eth0 below:

[will@mary network-scripts]$ more ifcfg-eth0
# Realtek|RTL-8139/8139C/8139C+

Note You need to log in before you can comment on or make changes to this bug.