LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Change IP Addres on Centos 5.7 (https://www.linuxquestions.org/questions/linux-server-73/change-ip-addres-on-centos-5-7-a-4175442118/)

newbie16 12-19-2012 04:18 AM

Change IP Addres on Centos 5.7
 
I am trying to change the IPaddress and I want to be able to connect to the internet. My current IP address is 192.168.100.128 and I want to change it to 192.168.100.218.

I have tried editing the /etc/sysconfig/network-scripts/ifcfg-eth0 and I entered the
IPADDR=192.168.100.218
NETMASK=255.255.255.0
GATEWAY=192.168.100.1

and I restarted by /etc/init.d/network restart

but when I do /sbin/ifconfig I find that the IP has not changed.

And when I try to change the IP in System->Admin->Network by selcting Statically set the IPaddress, I am not able to ping the internet.

Please tell me what I should do?

newbie16 12-19-2012 04:25 AM

It k, I had not set BOOTPRO to none. Once I changed it I was able to get the new IP as well as connect to the internet.

robertjinx 12-19-2012 08:34 AM

Try "ifconfig eth0 down" and then "ifconfig eth0 up".

newbie16 12-19-2012 07:04 PM

Once I shut down and restarted the system, I find that the connection is lost. I tried

/sbin/ifconfig/eth0 down
/sbin/ifconfig/eth0 up

did network restart

but not able to connect.

any suggestions?

John VV 12-19-2012 07:46 PM

and BE aware !!! that CebtOS 5.7 is and has NOT been supported of some time
it is a DEAD version of CentOS
it has not had any SECURITY updates since it went End of Life on "2011-09-13"
and it will NEVER receive any more updates

basically it is dead

please stay current and install CentOS 5.8 in the old 5 series
or the current CentOS 6.3

solarisguy 12-24-2012 12:36 AM

Quote:

Originally Posted by newbie16 (Post 4853308)
Once I shut down and restarted the system, I find that the connection is lost. I tried

/sbin/ifconfig/eth0 down
/sbin/ifconfig/eth0 up

did network restart

but not able to connect.

any suggestions?

What is your full output from /etc/sysconfig/ifcfg-eth0?

How about
Code:

ifconfig eth0
?

And
Code:

netstat -rn


All times are GMT -5. The time now is 12:04 AM.