LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Save ifconfig settings (https://www.linuxquestions.org/questions/linux-networking-3/save-ifconfig-settings-88785/)

paaisa 09-03-2003 08:05 AM

Save ifconfig settings
 
When I set the IP address of eth0 with ifconfig, evrything goes well, but if I shut down or restart the PC, the eth0 is configured with an old IP address.

Where are stored these informations ?

Bye

mrtwice 09-03-2003 08:22 AM

What distro are you using?

Tirsales 09-03-2003 08:25 AM

Hy,

that's depending of your distribution.
With Debian it is /etc/network/interfaces

Have a look at your /etc-folder if you can find a file named network, ifconfig or interfaces (or a folder by that name).
Look at this file.
If you can find something like
interface eth0
address=...

it should be the right place.

If you use SuSE have a look at yast or yast2, other distributions have other administration-tools. Perhaps you could use this one.

If you can't find the place either mail me your distribution or (better) have a look at your distributions guide or manual.
Or type "man ifconfig" and have a look at the end of the file... There should be something like "files:"

regards

Tirsales

paaisa 09-03-2003 09:00 AM

I have the Red Hat 8.0 distr ...

I'll search for such files

thanks !

mrtwice 09-03-2003 09:06 AM

I believe in RH you can type netconfig as root and it will set that stuff up for you.

paaisa 09-03-2003 09:27 AM

I'll see at home ... this night !

Bye

dhirajb 09-03-2003 10:03 AM

Edit the file "/etc/sysconfig/network-scripts/ifcfg-eth0" and replace the ip address.

dhirajb

mangeshkulkarni 02-28-2007 07:05 AM

Quote:

Originally Posted by dhirajb
Edit the file "/etc/sysconfig/network-scripts/ifcfg-eth0" and replace the ip address.

dhirajb

Mr Dhiraj, If done like this know then system gives error while pinging to local address which is in same network. so this is not proper way
regards
mangeshkulkarni

MartinUK 03-01-2007 08:24 AM

Paaisa

As dhirajb mentioned the settings for the interfaces are kept in the file /etc/sysconfig/network-scripts/ifcfg-<interface-name> which can be manually edited if you feel comfortable doing this. The details of this are shown in:

http://www.redhat.com/docs/manuals/l...nterfaces.html

After you do this you may will need to run ifdown <interface-name> followed by ifup <interface-name> or "service network restart" (restarts all interfaces).

however if you would like to do this from the "recommended" tool you should use:

run system-config-network as root

If you would like to do this using a GUI, it can be done using the steps below:

http://www.redhat.com/docs/manuals/l...rk-config.html

mangeshkulkarni - If you have problems accessing hosts on the same network after this change you probably have some issue other than this file or you have edited the file incorrectly (use the GUI's instead).

Thanks
Martin


All times are GMT -5. The time now is 04:53 PM.