LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 08-01-2003, 06:26 PM   #1
joeycat
LQ Newbie
 
Registered: Aug 2003
Posts: 5

Rep: Reputation: 0
Unhappy Ifconfig Commands


Why is it that when I use ifconfig cmds to set eth0, then reboot, they are all gone.
 
Old 08-01-2003, 08:34 PM   #2
youngstorm
Member
 
Registered: May 2003
Location: USA
Distribution: Fedora 21, RHEL 5,6&7, Windoze 7
Posts: 235

Rep: Reputation: 31
Well, what dist. and version are you using? Maybe I can help.
 
Old 08-02-2003, 10:59 AM   #3
joeycat
LQ Newbie
 
Registered: Aug 2003
Posts: 5

Original Poster
Rep: Reputation: 0
I am using Linux 7.3, all Hardware is on HCL, and if I use DHCP from my Router works fine, but when I select static and then use the ifconfig eth0 xxx.xxx.xxx.xxx netmask xxx.xxx.xxx.xxx
route add default gw xxx.xxx.xxx.xxx
Is their a command that I must use to save this, because when I reboot or shutdown, then all the ip's are gone.
 
Old 08-02-2003, 11:03 AM   #4
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 50
/etc/sysconfig/networking/devices/ifcfg-eth0
 
Old 08-02-2003, 01:48 PM   #5
joeycat
LQ Newbie
 
Registered: Aug 2003
Posts: 5

Original Poster
Rep: Reputation: 0
Ok, so do I have to manually edit the file, to reatin those IP settings, if so then aint the ifconfig commands useless
 
Old 08-02-2003, 04:02 PM   #6
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
Well, ifconfig is far from useless, but you are expecting your hardware to remember settings when the power is off. It ain't gonna do that.

If you want specific settings set every time you boot, you can always add the commands to your /etc/rc.d/rc.local file. rc.local is run at the end of every boot, so saving your ifconfig commands in that file will set your card every time you boot.

An alternative would be to look into the file where the network is originally set up. In Slack that is the /etc/rc.d/rc.inet1 file, but I'm not sure if Red Hat uses the same thing (I'm assuming that by "Linux 7.3", you mean Red Hat 7.3). You could make the changes to the appropriate ifconfig commands there
 
  


Reply



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
connecting /sbin/ifconfig to bash command ifconfig flammable2 Fedora 4 11-12-2005 07:58 AM
ifconfig amounst other commands doesn't work steveman2000 Linux - Newbie 6 10-21-2005 04:15 PM
im in user mode and cant run hdparm and ifconfig commands, but if im root, i can. kublador Linux - Newbie 2 09-12-2003 08:27 AM
IFCONFIG and other network commands :( blyzard Linux - Newbie 19 07-30-2003 01:09 PM
My commands dont work. ifconfig ? slice4e Linux - General 5 05-08-2003 11:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:30 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
Open Source Consulting | Domain Registration