LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 12-19-2012, 04:18 AM   #1
newbie16
LQ Newbie
 
Registered: May 2012
Posts: 12

Rep: Reputation: Disabled
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?
 
Old 12-19-2012, 04:25 AM   #2
newbie16
LQ Newbie
 
Registered: May 2012
Posts: 12

Original Poster
Rep: Reputation: Disabled
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.
 
Old 12-19-2012, 08:34 AM   #3
robertjinx
Member
 
Registered: Oct 2007
Location: Prague, CZ
Distribution: RedHat / CentOS / Ubuntu / SUSE / Debian
Posts: 561

Rep: Reputation: 58
Try "ifconfig eth0 down" and then "ifconfig eth0 up".
 
Old 12-19-2012, 07:04 PM   #4
newbie16
LQ Newbie
 
Registered: May 2012
Posts: 12

Original Poster
Rep: Reputation: Disabled
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?
 
Old 12-19-2012, 07:46 PM   #5
John VV
Guru
 
Registered: Aug 2005
Posts: 12,804

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
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
 
Old 12-24-2012, 12:36 AM   #6
solarisguy
LQ Newbie
 
Registered: Aug 2010
Location: Seattle
Distribution: CentOS, RHEL, Oracle Enterprise Linux, Solaris, BSD
Posts: 28

Rep: Reputation: 8
Quote:
Originally Posted by newbie16 View Post
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
 
  


Reply

Tags
centos5, netwoking


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] firewall accepting rules from public h/w mac addres not from dyanmic ip mac hw addres sanjay87 Linux - Server 2 03-06-2012 05:04 AM
How to change MAC addres via C code. Ayalaskin Programming 4 04-13-2010 10:15 AM
Can't change MAC addres - ndiswrapper bjeuk Linux - Wireless Networking 8 02-03-2010 05:15 PM
there is no fixed IP addres suguname Linux - Networking 2 03-05-2005 12:52 AM


All times are GMT -5. The time now is 11:46 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration