LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   From which file did get the init process information to configure my eth0 interface (https://www.linuxquestions.org/questions/linux-networking-3/from-which-file-did-get-the-init-process-information-to-configure-my-eth0-interface-511291/)

adilturbo 12-17-2006 04:00 AM

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

many thanks

MensaWater 12-17-2006 07:16 AM

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.

adilturbo 12-17-2006 10:40 AM

hi again

i'm not using DHCP protocol .thank you so much for help.
thanks

Quakeboy02 12-17-2006 03:06 PM

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.

Sertys 12-17-2006 08:15 PM

well, instead of using xargs for such a silly task, i'd suggest you use -R (for recursive)

cd etc ; grep -R "Quakeboy02 just likes typing more and more" *

Quakeboy02 12-17-2006 09:26 PM

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.

adilturbo 12-18-2006 02:58 AM

hi nice folks

i thank you all so much for informations

thanks


All times are GMT -5. The time now is 04:42 AM.