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.
We have a Linux 5.4 version running on HP DL380. I assigned the IP address to the eth0 interface using the menu Settings --> Networks --> interface. Then I rebooted the machine and used "ifconfig -a" to check the IP, but it didn't show any IP assigned to eth0.
do check *onboot* should be *yes* in configuration file.
Sorry, this is bad advice, and doesn't address the OP's question, and is incorrect to boot. The option is STARTMODE, and it should be set to 'onboot'.
Also, the OP asked how to assign a static address, not how to make sure the interface is active on boot. acid_kewpie posted the correct solution, which is to use the system configuration tool, or edit the file. In the file, the OP needs to set the IPADDR and NETMASK parameters, along these lines:
Then you didn't enter and/or save the values correctly.
You SHOULD go through the system-network configuration tool, and make sure you set a static address, and that everything is set correctly. If not, edit /etc/sysconfig/network-scripts/ifcfg-eth0 as you were told above, and put the values in as shown.
The line you quoted is a command that sets is temporarily...both myself and acid_kewpie gave you the answer, neither of which involve running ifconfig. Follow the instructions given.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.