Can't change ip address in Centos 6
Trying to change my ip address from 10.0.2.23 to 192.168.105.22 on my centos 6 system.
I run ip link set eth0 down ip addr add 192.168.105.22 dev eth0 ip link set eth0 up service network restart Then I run ifconfig and the ip address is 10.0.2.23 same as before -- no change This should be pretty straight forward. Am I missing something here? |
Quote:
If you want to permanently change you ip you need to edit /etc/sysconfig/network-scripts/ifcfg-eth0: Code:
service network stop |
Quote:
|
The first three commands likely did change the IP number...
but the "service network restart" wiped it out and loaded whatever was in the /etc/sysconfig/network-scripts/ifcfg-eth0" |
You might want to make sure ifcfg-ethX
NM_CONTROLLED=no |
Another thing is you want to change your setting permanently, for this distribution you need to change at ifcfg-ethx
|
All times are GMT -5. The time now is 04:14 AM. |