Description of problem: The PEERDNS=no option in /etc/sysconfig/network-scripts/ethX should leave /etc/resolv.conf untouched when the network interface is (re)started. Version-Release number of selected component (if applicable): RHEL 4.4 How reproducible: Steps to Reproduce: 1. type PEERDNS=no in /etc/sysconfig/network-scripts/ethX 2. shut down the network interface 3. start the network interface Actual results: /etc/resolv.conf is updated with info from dhclient Expected results: /etc/resolv.conf should have been left untouched. Additional info: I checked and ifup recognizes the PEERDNS=no option if [ "${PEERDNS}" = "no" ]; then # Do not update/replace resolv.conf. PUMPARGS="${PUMPARGS} -d" DHCPCDARGS="${DHCPCDARGS} -R" [root@skrot ~]# cat /etc/resolv.conf search intern.lan nameserver 127.0.0.1 nameserver 62.179.100.29 nameserver 62.179.100.30 nameserver 212.83.64.138 [root@skrot ~]# ifdown eth1 [root@skrot ~]# ifup eth1 Determining IP information for eth1... done. [root@skrot ~]# cat /etc/resolv.conf search upc.no nameserver 62.179.100.29 nameserver 62.179.100.30 nameserver 212.83.64.138 [root@skrot ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth1 # 3Com Corporation 3c905 100BaseTX [Boomerang] DEVICE=eth1 ONBOOT=yes BOOTPROTO=dhcp PEERDNS=no TYPE=Ethernet [root@skrot ~]# rpm -q dhclient dhclient-3.0.1-58.EL4
The problem is not only related to ifup, each time dhclient renews the dhcp lease /etc/resolv.conf is updated. I have another Fedora 5 machine with the same setup in /etc/sysconfig/network-scripts/ethX and it works as expected on that machine.
This can be fixed by adding: [ "${PEERDNS}" = "no" ] && return To the make_resolv_conf() function in /sbin/dhclient-script.
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux maintenance release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Update release for currently deployed products. This request is not yet committed for inclusion in an Update release.
from /sbin/dhclient-script: make_resolv_conf() { if [ "${PEERDNS}" == "no" ]; then return fi ... skip ... and I can't reproduce it. This is with 4.7 GA/dhclient-3.0.1-62.EL4