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