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.
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.
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.