Article ID: 3331, created on Nov 30, 2007, last review on May 11, 2014
In the particular case, when an IP address was not being attached to the network interface on VPS server please check the following things:
1) Make sure "network" service has not been turned off on system boot (it should be turned on on 2,3,4,5 runlevels):
[root@webxl /]# chkconfig --list | grep network
network 0:off 1:off 2:on 3:on 4:on 5:on 6:off
You may turn it on by such command: "chkconfig --level 2345 network on"
2) Check whether in "ifcfg-eth0" file ONBOOT option is set to 'yes':
[root@webxl /]# cat /etc/sysconfig/networking/ifcfg-eth0 | grep ONBOOT
3) Then, please try to run "/etc/init.d/network start" and if during this you notice something like below:
error: unknown error 1 setting key 'net.ipv4.ip_forward'
error: unknown error 1 setting key 'net.ipv4.conf.default.rp_filter'
error: unknown error 1 setting key
error: unknown error 1 setting key 'kernel.sysrq'
error: unknown error 1 setting key 'kernel.core_uses_pid'
Please open /etc/init.d/network and comment a line [action $"Setting network parameters: " sysctl -e -p /etc/sysctl.conf] in this file by placing # at its beginning. After that, run
"/etc/init.d/network restart" ones again.
4. Check if an IP address has been bound to your interface (run "ifconfig") and whether defaultroute was set properly ("route | grep default")