Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
06-10-2003, 09:30 AM
|
#1
|
Senior Member
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130
Rep:
|
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)
|
|
|
06-10-2003, 09:39 AM
|
#2
|
Senior Member
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130
Original Poster
Rep:
|
what file need to be modify to change the ip address ? thx
|
|
|
06-10-2003, 10:53 AM
|
#3
|
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
|
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 11:00 AM.
|
|
|
06-12-2003, 09:35 AM
|
#4
|
Member
Registered: Aug 2001
Location: Buffalo, NY
Distribution: Red Hat
Posts: 83
Rep:
|
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!
|
|
|
06-12-2003, 10:54 AM
|
#5
|
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
|
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
|
|
|
06-12-2003, 01:18 PM
|
#6
|
LQ Guru
Registered: Jan 2001
Posts: 24,149
|
Moved: more suitable in the Networking forum.
|
|
|
All times are GMT -5. The time now is 09:24 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|