Jump to content

What is the right method to configure servers with static IP addresses?


Recommended Posts

Posted

Usually, when I configure SBC devices (in particular headless as the OPI Zero), what I do is to disable NetworkManager (even uninstalling it) and to provide a basic standard configuration on /etc/network/interfaces.  However, I am noticing that the NetworkManager it is becoming more and more interleaved on the standard Linux configuration (as it is happening with systemd).  In fact, my thought is that NetworkManager it is more a desktop thing than a server one.

 

My question is:

 

What is the right method to configure static servers, having unmovable IP addresses, routes and these types of things, with current and future Armbian releases?  If it is necessary to live with NetworkManager, then I must work it correctly for not having it destroying my intentions with the machines; but if the right way is to discard it, could be nice to have a "standard" method to do so.

 

Thanks

 

Posted
47 minutes ago, malvcr said:

What is the right method to configure static servers


The same way as "20 years ago" - by defining configuration in /etc/network/interfaces

 

If you don't put your network settings there, Network manager takes over. 

Posted

Understood ... in fact, several times and with different machines, even disabling the NetworkManager, it recovers itself (I really don't know why; could be a hidden dependency in some place) ... my only trustworthy solution has been to erase it completely (purge).  So ... no NM around, not even program files neither configuration, just /etc/network/interfaces and a clear easy life.

 

Could be NM an "optional" feature instead of the standard one?

 

In fact, when having small machines with not so small tasks (enough for them but without a lot of extra margin), having useless services running has no sense.

 

Another option could be to have a "canonical" option without any of these services around, more suited to IoT environments.  What do you think? ... right now I will configure a basic OPIZ without NM; the easiest method is to open the image and to edit /etc/network/interfaces before the first boot ... then to purge NM  :-) ... 

Posted
3 hours ago, malvcr said:

 

Could be NM an "optional" feature instead of the standard one?

problem, support for "how do I configure my wifi' would probably float the forum.. :P  I barely use static IP's but actually 'sudo nmtui' works mostly quite well, you could even set it as a one-liner from command line (there's a tutorial for using dispatcher on NM I wrote weeks ago, but still hidden cause not enough time to properly finish it - or a bit more honest, not enough motivation.. :P).

You may have a look into:

https://github.com/armbian/build/blob/99a34c7be1e342247a981f99c7930ee73c144f3e/packages/bsp/common/usr/lib/armbian/armbian-firstrun-config#L102-L131

and in arch's wiki: https://wiki.archlinux.org/index.php/NetworkManager

 

dispatcher scripts are actually really mighty even in server like scenarios (e.g. depending on which network I connect my notebook, different shares get automatically mounted and unmounted if it loses connection. Some of my SBCs try to connect via wifi as a fallback in case ETH connection drops, so I can easy connect them from wired network and they're still in my network.)

For bionic there's a yaml file where you can define which renderer you use (e.g. NM or networkD :ph34r::P - side-note, for the R2 my current setup is that NM ignores wired interfaces and networkD controls them - was the easiest way to bridge all interfaces). Don't forget to restart NM when you do such changes (systemctl restart NetworkManager).

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines