LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-10-2003, 08:30 AM   #1
ust
Senior Member
 
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130

Rep: Reputation: 31
Change IP address


I modify the file " /etc/sysconfig/network-scripts/ifcfg-eth0" to add the ip address to the entry "IPADDR" , and reboot the linux server , but i run ifconfig , it still show my ip is 127.0.0.1 , why will this happen , what is wrong in my setting ? thx ( RH8)
 
Old 06-10-2003, 08:39 AM   #2
ust
Senior Member
 
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130

Original Poster
Rep: Reputation: 31
what file need to be modify to change the ip address ? thx
 
Old 06-10-2003, 09:53 AM   #3
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
well first of all you don't need to reboot to change your IP adress, simply enter
[root@hostname root]# /etc/init.d/network restart
as root of course, should be adequate, the os is designed to not need alot of rebooting, in fact the only reasons i can think of for rebooting are upgrading the kernel, the hardware, or crashing, but , i digress...
as for 127.0.0.1, are you looking under the ifconfig entry for eth0 or lo, 127.0.0.1 is NEVER going to change, it's the generic localhost ip for interface lo, also try pinging the ip you think your machine is and see what happens

Last edited by frieza; 06-10-2003 at 10:00 AM.
 
Old 06-12-2003, 08:35 AM   #4
cliffyman
Member
 
Registered: Aug 2001
Location: Buffalo, NY
Distribution: Red Hat
Posts: 83

Rep: Reputation: 15
Changing IP on Red Hat

I know Red Hat has the tool /usr/sbin/netconfig which is useful for changing an IP address, but I've read that this doesn't "change the IP address everywhere it needs to." Is this true? I'm familiar with the /etc/sysconfig/network... files, but if I want to make sure my IP is changed everywhere, what file(s) or program(s) do I need to look into?

Thanks!
 
Old 06-12-2003, 09:54 AM   #5
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
as far as i know simply edit
/etc/sysconfig/network-scripts/ifcfg-eth0
with your new ip addr, and then run
/etc/init.d/network restart
that worked for me
 
Old 06-12-2003, 12:18 PM   #6
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Moved: more suitable in the Networking forum.
 
  


Reply



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
Change Ip address luisator Linux - Newbie 3 06-02-2005 04:03 AM
won't change ip address xushi Solaris / OpenSolaris 4 05-14-2005 03:11 AM
Change IP address lvran Linux - Networking 2 10-16-2003 01:19 AM
How do you change the IP Address? Diablotrickster Slackware 4 08-28-2003 07:31 PM
cannot change ip address ??? aherrys Linux - Networking 0 07-06-2003 03:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:59 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration