Networking¶
Armbian uses Netplan.io to describe networking configurations. This is the same on minimal IOT, server CLI and desktop images, Debian or Ubuntu based. However, backends are different.
Minimal images with networkd¶
Minimal images are using systemd-networkd
, which has smaller footprint. systemd-networkd
is a system daemon that manages network configurations. It detects and configures network devices as they appear; it can also create virtual network devices. This service can be especially useful to set up complex network configurations. It also works fine on simple connections.
Default Armbian configuration¶
Preinstalled configuration will run DHCP on all ethernet devices in order to help you connecting to the device and configure it appropriate.
/etc/netplan/armbian-default.yaml
Text Only | |
---|---|
1 2 3 4 5 6 7 8 9 |
|
Configuration examples¶
Set fixed IP address¶
/etc/netplan/armbian-default.yaml
Text Only | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 |
|
Connect to wireless hotspot¶
It is recommended to make a separate config file for wireless network.
Generate a file:
Text Only | |
---|---|
1 |
|
with content:
Text Only | |
---|---|
1 2 3 4 5 6 7 8 9 10 |
|
Replace SSID
with the name of your hot-spot and wlan0
with a device used on your system.
Applying configuration¶
Once you are done with configuring your network its time to test syntax and apply it.
1. Fix configurations permissions¶
Text Only | |
---|---|
1 |
|
2. Test if syntax is correct¶
Text Only | |
---|---|
1 |
|
3. Apply configuration¶
Text Only | |
---|---|
1 |
|
CLI and desktop images with NetworkManager¶
Cerver CLI and desktop images are using Network Manager. You can use the same methods as for minimal images.
Set fixed IP address¶
/etc/netplan/armbian-default.yaml
Text Only | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 |
|
But you can also use CLI / GUI tools
Text Only | |
---|---|
1 |
|
Replace SSID
with the name of your hot-spot
Text Only | |
---|---|
1 |
|
Replace eth0
with the name of your network device.
Automatic configuration at first run¶
It is possible to store first run preset network settings to the file /root/.not_logged_in_yet
which is read and executed at first login.
Mount live image before first run and use this example:
Text Only | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
|
If you want to use first run automatic configuration at build time, check this.
- Copy
cp extensions/preset-firstrun.sh userpatches/extensions/
- Edit
userpatches/extensions/preset-firstrun.sh
according to your situation - Build with additional parameter
ENABLE_EXTENSIONS=preset-firstrun
Note: this method also adds new user, sets passwords, …