[CentOS] Lingering dhclient issue

Wed Sep 13 22:29:36 UTC 2006
Justin Randall <jrandall at comwave.net>

> 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).

Unless this device is going to be switching from DCHP to static
frequently, wouldn't simply killing the dhclient process be sufficient?


If not, you could always simply write a shell function for ifconfig (if
you're using bash, ksh or sh) that checks for an associated dhclient
process when and interface is "down"'d and kills the associated dhclient
process.

Hope this helps,

Justin.

-----Original Message-----
From: Alfred von Campe [mailto:alfred at 110.net] 
Sent: Wednesday, September 13, 2006 2:06 PM
To: CentOS mailing list
Subject: [CentOS] Lingering dhclient issue

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
_______________________________________________
CentOS mailing list
CentOS at centos.org
http://lists.centos.org/mailman/listinfo/centos