Hi,
I have a RH 7.2 box with the latest kernel (2.4.20-18.7). I used this box for trouble shooting network problem. I noticed that somehow when I move the machine from one network to another, and I need to change IP addres on the box, I CANNOT just simply do the following:
change the /etc/sysconfig/network-scripts/ifcfg-eth0 to point to my new IP address, broadcast and network
change the default gateway on /etc/sysconfig/network
go to /etc/init.d and do ./network restart (or even ./network stop and ./network start)
After I have done the above and run ifconfig, my IP address still hasn't changed. I have to reboot the machine before the changes I made on the ifcfg-eth0 and network files take effect. It is worst than winXp though...!!
I even tried ifconfig eth0 down/up but still the old address persist. The only other way I can make the change takes effect without rebooting is if I run ifconfig eth0 down and then issue command:
ifconfig eth0 xxx.xxx.xxx.xxx netmask xxx.xxx.xxx.xxx up
and the machine complains SIOCSIFADDR:FILE EXIST
and then run ifconfig eth0 up
If I do this the ifconfig then will report the correct new address.
I swear that on the old version of RH 7.2 kernel, (the orginal one that came out of the CD) didn't do this. On that one, I could just simply restart my eth0 and the changes I made took effect.
Anybody can shed a light on this and provide an elegant way to change the IP address ?
Thanks