From which file did get the init process information to configure my eth0 interface
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.
From which file did get the init process information to configure my eth0 interface
hi kind ppl
i'm using a redhat linux as OS,connected to a LAN.
before i had a *.*.*.69 net address.
now i want to use *.*.*.53.because somebody else is using the 1st address.
at the boot time when init configure my eth0 interface(netaddr *.*.*.69),sends the gratuitous ARP,and got an ICMP message saying that an other host is using this address,so configuration fails.
my solutions:
1/ configuring manually the eth0 interfae after the
the system is up.(ridiculous)
2/ writing a script file.
your welcome help:
which file the init process read from while configuring eth0? i searched in the rc.d directory and its subdirectories but i did not found
Redhat stores IP info in /etc/sysconfig/network-scripts in files named icfg-<interface> where the first one is usually ifcfg-eth0 (first ethernet NIC). You can edit these files with the correct information and so long as you don't have DHCP enabled the address will be the same after every boot.
You can test the change by typing "service network restart" then running ifconfig against the NIC to see if it is OK rather than doing a full reboot.
Whenever I need to find a file containing some verbage, I usually try the following.
1. Go to the lowest level directory that you think contains the data. In this case, I'd suggest "/etc" for you.
2. type
Code:
find . -print |xargs grep "your text here"
In your case, I'd suggest either "route" or perhaps the bogus IP within the quotes. Of course, you can skip step 1 and put the directory in in place of the ".". The word "xargs" is mandatory for this to work.
well, instead of using xargs for such a silly task, i'd suggest you use -R (for recursive)
Thanks for letting me know. I just got back into Linux/Unix after being away for about 10 years. I don't remember grep having that function back then. Of course, it could have, but you weren't there to correct 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.