LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices



Reply
 
Search this Thread
Old 09-03-2003, 09:05 AM   #1
paaisa
LQ Newbie
 
Registered: Sep 2003
Posts: 6

Rep: Reputation: 0
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
 
Old 09-03-2003, 09:22 AM   #2
mrtwice
Member
 
Registered: Feb 2002
Distribution: xubuntu 8.10
Posts: 225

Rep: Reputation: 31
What distro are you using?
 
Old 09-03-2003, 09:25 AM   #3
Tirsales
LQ Newbie
 
Registered: Sep 2003
Location: Germany
Distribution: Debian
Posts: 6

Rep: Reputation: 0
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
 
Old 09-03-2003, 10:00 AM   #4
paaisa
LQ Newbie
 
Registered: Sep 2003
Posts: 6

Original Poster
Rep: Reputation: 0
I have the Red Hat 8.0 distr ...

I'll search for such files

thanks !
 
Old 09-03-2003, 10:06 AM   #5
mrtwice
Member
 
Registered: Feb 2002
Distribution: xubuntu 8.10
Posts: 225

Rep: Reputation: 31
I believe in RH you can type netconfig as root and it will set that stuff up for you.
 
Old 09-03-2003, 10:27 AM   #6
paaisa
LQ Newbie
 
Registered: Sep 2003
Posts: 6

Original Poster
Rep: Reputation: 0
I'll see at home ... this night !

Bye
 
Old 09-03-2003, 11:03 AM   #7
dhirajb
LQ Newbie
 
Registered: Sep 2003
Posts: 4

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

dhirajb
 
Old 02-28-2007, 08:05 AM   #8
mangeshkulkarni
LQ Newbie
 
Registered: Feb 2007
Posts: 1

Rep: Reputation: 0
Thumbs down

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
 
Old 03-01-2007, 09:24 AM   #9
MartinUK
LQ Newbie
 
Registered: Jan 2007
Posts: 5

Rep: Reputation: 0
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
alsamixer does not save my settings brandonloserkid Slackware 15 09-09-2007 06:27 PM
How do I save my settings? laverscheval DamnSmallLinux 2 10-08-2004 09:44 PM
changing your NIC settings via ifconfig? bpk Linux - Networking 1 06-11-2004 05:39 PM
WindowMaker don't save settings pawn-o-matic Linux - Software 3 01-03-2004 06:52 AM
Save mixer settings corwax Linux - General 4 12-18-2003 02:59 PM


All times are GMT -5. The time now is 06:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration