Linux - NetworkingThis 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.
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.
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)
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233
Rep:
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
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?
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233
Rep:
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.