Red Hat Bugzilla – Bug 556001
dhclient sets wrong interface when the correct one is disconnected
Last modified: 2010-01-20 10:41:55 EST
Description of problem: In short: eth2:BOOTPROTO=dhcp, eth3:BOOTPROTO=static,192.168.3.1. When both have their cable connected, everything works fine, but when eth2 is disconnected, dhclient sets eth3 to ip from dhcp server. Version-Release number of selected component (if applicable): dhclient-4.1.0p1-13.fc12.x86_64 How reproducible: always Steps to Reproduce: 1.use network service only (not NM), set eth2:BOOTPROTO=dhcp, eth3:BOOTPROTO=static ip=192.168.3.1 2.unplug cable from eth2 3.reboot Actual results: dhclient sets eth3 to ip from dhcp server after some time. When booting, eth3 has ip 192.168.3.1 for a while, but it reassigned later to ip from dhcp. Expected results: eth3 is not altered Additional info: doing service network restart fixes eth3's ip. I have 4 NICs. eth0 are eth1 disabled (blacklisted kernel module). eth2 is connected to ISP: DEVICE=eth2, BOOTPROTO=dhcp, TYPE=Ethernet, HWADDR=00:30:4f:71:98:f2, NM_CONTROLLED=no, ONBOOT=yes, USERCTL=no, PEERDNS=yes, IPV6INIT=no. eth3 is connected to LAN: DEVICE=eth3, BOOTPROTO=static, NETMASK=255.255.255.0, TYPE=Ethernet, HWADDR=00:30:4f:71:99:1d, IPADDR=192.168.3.1, NM_CONTROLLED=no, IPV6INIT=no, ONBOOT=yes, USERCTL=no. On eth3 there is also my own dhcp server (sysconfig:DHCPDARGS="eth1 eth3"). in chkconfig network is on, NetworkManager is off boot.log: ... ip6tables: ipv6 is disabled. iptables: Applying firewall rules: [ OK ] iptables: Loading additional modules: nf_conntrack_netbios_[ OK ] Bringing up loopback interface: [ OK ] Bringing up interface eth0: Device eth0 does not seem to be present, delaying initialization. [FAILED] Bringing up interface eth1: Device eth1 does not seem to be present, delaying initialization. [FAILED] Bringing up interface eth2: Determining IP information for eth2... failed; no link present. Check cable? [FAILED] Bringing up interface eth3: [ OK ] ... eth0: Device eth0 does not seem to be present, delaying initialization.-- makes no problem, because this line is present also when eth2 has cable plugged in and everything works /var/log/messages: Jan 16 12:53:46 thegate dhcpd: Internet Systems Consortium DHCP Server 4.1.0p1 Jan 16 12:53:46 thegate dhcpd: Copyright 2004-2009 Internet Systems Consortium. Jan 16 12:53:46 thegate dhcpd: All rights reserved. Jan 16 12:53:46 thegate dhcpd: For info, please visit http://www.isc.org/sw/dhcp/ Jan 16 12:53:46 thegate dhcpd: Not searching LDAP since ldap-server, ldap-port and ldap-base-dn were not specified in the config file Jan 16 12:53:46 thegate dhcpd: Wrote 0 deleted host decls to leases file. Jan 16 12:53:46 thegate dhcpd: Wrote 0 new dynamic host decls to leases file. Jan 16 12:53:46 thegate dhcpd: Wrote 1 leases to leases file. Jan 16 12:53:46 thegate dhcpd: Listening on LPF/eth3/00:30:4f:71:99:1d/192.168.3.0/24 Jan 16 12:53:46 thegate dhcpd: Sending on LPF/eth3/00:30:4f:71:99:1d/192.168.3.0/24 Jan 16 12:53:46 thegate dhcpd: Jan 16 12:53:46 thegate dhcpd: No subnet declaration for eth1 (no IPv4 addresses). Jan 16 12:53:46 thegate dhcpd: ** Ignoring requests on eth1. If this is not what Jan 16 12:53:46 thegate dhcpd: you want, please write a subnet declaration Jan 16 12:53:46 thegate dhcpd: in your dhcpd.conf file for the network segment Jan 16 12:53:46 thegate dhcpd: to which interface eth1 is attached. ** Jan 16 12:53:46 thegate dhcpd: Jan 16 12:53:46 thegate dhcpd: Sending on Socket/fallback/fallback-net Jan 16 12:53:50 thegate dhclient: DHCPREQUEST on eth3 to 255.255.255.255 port 67 Jan 16 12:53:50 thegate dhcpd: DHCPREQUEST for 192.168.3.100 from 00:30:4f:71:99:1d via eth3 Jan 16 12:53:50 thegate dhcpd: DHCPACK on 192.168.3.100 to 00:30:4f:71:99:1d via eth3 Jan 16 12:53:50 thegate dhclient: DHCPACK from 192.168.3.1 Jan 16 12:53:51 thegate NET[1471]: /sbin/dhclient-script : updated /etc/resolv.conf Jan 16 12:53:52 thegate dhclient: bound to 192.168.3.100 -- renewal in 35754 seconds. -- no other dhcp/dhclient messages in log, only kernel, named, acpid, xinetd, abrtd a smartd which are not related
Thanks for the report. Can you show the output of 'ps aux | grep dhclient' with and without the cable connected ?
when cable is connected dhclient eth2 /sbin/dhclient -1 -q -lf /var/lib/dhclient/dhclient-eth2.leases -pf /var/run/dhclient-eth2.pid eth2 with cable not connected only dhclient eth3 all have ppid 1
I'm closing this as worksforme. I was not able to reproduce it. I have F-12 machine in VirtualBox (there's option to choose whether the network cable is connected or not) with eth0 and eth1 disabled, eth2 is bridged adapter and gets ip from companys dhcp server, eth3 is attached to internal network. eth2 and eth3 are configured like yours. On eth3 is dhcp server running for 192.168.3.0 subnet. network is on, NetworkManager is off. If I unplug the cable from eth2 and boot I get almost the same output from booting as you. But there's no dhclient running. So I really don't know where's the problem. If there's some bug it's probably in initscripts (ifup-eth runs dhclient), so I'm adding Bill Nottingham on CC.