[CentOS] Lingering dhclient issue

Johnny Hughes mailing-lists at hughesjr.com
Wed Sep 13 21:07:38 UTC 2006


On Wed, 2006-09-13 at 14:06 -0400, Alfred von Campe wrote:
> I recently reconfigured some CentOS 4.3 systems that were using DHCP  
> to use static IP addresses.  At the same time, the systems were moved  
> to a new VLAN.  Here is the approximate sequence of events that took  
> place:
> 
>    1. ifdown eth0
>    2. edit /etc/sysconfig/network-scripts/ifcfg-eth0 with static IP  
> address
>    3. wait for network folks to reconfigure switch
>    4. ifup eth0
> 
> I may have reversed steps 1 and 2 on some of the systems.
> 
> The problem was that the dhclient process didn't go away, and kept  
> renewing the old lease.  Our DHCP server is configured to contact the  
> DNS server and update the entry for each host it serves.  So the DNS  
> entries for these systems were pointing to the old address in the old  
> VLAN.  The eth0 interface itself just kept the static IP address for  
> which it was configured.  It took me a while to figure out what was  
> going on.
> 
> My question is, what could I have done to avoid this (other than  
> killing the dhclient process)?  Is there a better way to reconfigure  
> an interface to use a static address?  I am not interested in  
> solutions that involve using a GUI (i.e., only command line solutions).
> 
> Thanks,
> Alfred
> _______________________________________________

I do:

service network restart

(or: /etc/init.d/network restart)

Not necessarily better, but it should make the dhcp process go away (if
the ifcfg file is correctly edited).

Thanks,
Johnny Hughes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.centos.org/pipermail/centos/attachments/20060913/953e6576/attachment.bin


More information about the CentOS mailing list