Wednesday, 21 August 2013

Prevent static IP address from resetting to default

Prevent static IP address from resetting to default

I have a CentOS 6 machine configured with a static IP address in
/etc/sysconfig/network-scripts/ifcfg-eth0:
IPADDR=192.168.1.100
If I manually change the address iconfig eth0 10.1.2.3 then unplug the
cable, the address will reset to 192.168.1.100 when it's plugged back in
(you typically have to wait a few seconds before plugging it back in). I
would rather it keep 10.1.2.3.
I haven't observed this behavior in CentOS 5 but it's present in 6.
Is there a way to prevent it from resetting the IP address?

No comments:

Post a Comment