Traditional ARM network config plagues embedded developers and O&M engineers with errors (manual /etc/network/interfaces edits), service restarts for mode switches, and tedious batch device debugging. ARMxy solves this by deeply integrating Arch Linux-recommended systemd-networkd.
Case Details
For embedded developers and device operation and maintenance engineers, network configuration on ARM devices is often an "efficiency bottleneck": manually writing /etc/network/interfaces configurations is error-prone, switching network modes requires restarting services, deploying batch devices needs debugging parameters one by one, and manual intervention is required to recover after network disconnection... One of the core advantages of the ARMxy series is the deep integration of systemd-networkd, recommended officially by Arch Linux, upgrading network management from "manual debugging" to a "automated, customizable, and highly reliable" professional solution. This article will break down its core technical details and implementation methods from four dimensions: underlying logic of technical selection, full-scenario practical configuration, debugging and troubleshooting skills, and advanced function expansion, providing directly reusable solutions for technical personnel.
The core demands of network management for embedded devices are "stability, efficiency, low consumption, and easy batch management". The deep integration of systemd-networkd (officially recommended by Arch Linux) into ARMxy offers the following core advantages:
- Lightweight and Efficient: Built-in modules have no additional dependencies, with size < 2MB and running memory < 5MB, adapting to the hardware constraints of ARMxy.
- Industrial-Grade Compatibility: Natively supports static IP, DHCPv4/v6, WiFi, bridging, VLAN, Bonding and other functions, covering multi-scenario needs.
ARMxy has pre-integrated and optimized this tool, which can be used immediately after booting, eliminating manual adaptation costs.
Configuration file path: /etc/systemd/network/eth1.network
[Match] Name=eth1 [Network] DHCP=yes DNS=223.5.5.5 8.8.8.8 |
Configure WiFi password:
| /usr/demo/wifi/wifi_setup.sh -i [WiFi Name] -p [Password] |
Network configuration file (/etc/systemd/network/wlan0.network):
[Match] Name=wlan0 [Network] DHCP=yes DNS=223.5.5.5 8.8.8.8 |
Configuration file path: /etc/systemd/network/eth1.network
[Match]
Name=eth1
[Network]
Address=192.168.1.100/24 # Static IP + subnet mask Gateway=192.168.1.1 # Gateway DNS=223.5.5.5 119.29.29.29 StaticRoutes=192.168.2.0/24 via 192.168.1.2 (Optional static route) [Link] MTUBytes=1480 # Adapt to industrial switches |
Activation command is the same as above. Verification: ip addr show eth1, ip route show
Create a bridge device (/etc/systemd/network/10-br0.netdev):
[NetDev] Name=br0 Kind=bridge |
Bridge network configuration (/etc/systemd/network/20-br0.network):
[Match] Name=br0 [Network] DHCP=yes |
Add physical NIC to bridging (modify eth1 configuration):
[Match] Name=eth1 [Network] Bridge=br0 |
Create a VLAN device (/etc/systemd/network/10-eth1-vlan10.netdev):
[NetDev] Name=eth1.10 Kind=vlan [VLAN] Id=10 # VLAN ID |
VLAN network configuration (/etc/systemd/network/20-eth1-vlan10.network):
[Match] Name=eth1.10 [Network] Address=192.168.10.100/24 Gateway=192.168.10.1 |
-
Scenario Description
When ARMxy needs to act as a LAN gateway to automatically assign IPs to other devices (such as sensors, industrial control screens), the DHCP Server function integrated with systemd-networkd can be used without additional installation of the dhcpd service.
-
Configuration Steps
Prerequisite: ARMxy needs to be configured with a static IP (taking eth1 as an example, the static IP is 192.168.1.1/24 as the DHCP Server gateway). Refer to "(II) Industrial Scenario: Static IP Configuration" to modify the eth1 configuration file and ensure the static IP takes effect.
Write the DHCP Server configuration file (path: /etc/systemd/network/eth1.network, add DHCP Server rules based on the original static IP configuration):
[Network]
Address=192.168.1.1/24 # ARMxy static IP (DHCP gateway)
Gateway=192.168.0.1 # Upper-layer gateway (e.g., IP of the router connecting to the external network)
DHCPServer=yes
[DHCPServer]
PoolOffset=10 # Address pool start offset (allocation starts from 192.168.1.10)
PoolSize=90 # Address pool capacity (90 available IPs in total)
DefaultLeaseTimeSec=86400 # Default lease time (1 day)
MaxLeaseTimeSec=604800 # Maximum lease time (7 days)
DNS=223.5.5.5 8.8.8.8 # DNS server assigned to clients
Gateway=192.168.1.1 # Gateway assigned to clients (i.e., static IP of ARMxy)
Broadcast=192.168.1.255 # LAN broadcast address
|
- Verification Method
Check DHCP Server status: networkctl status eth1. If "DHCPServer: yes" is displayed, the DHCP Server is enabled.
Client test: Connect other devices (such as a computer) to the same LAN as ARMxy's eth1, set to automatically obtain IP via DHCP, and check if an IP in the range of 192.168.1.10-192.168.1.100 can be obtained.
- Service status: systemctl status systemd-networkd
- Interface status: networkctl list
- Log viewing: journalctl -u systemd-networkd --since "10min ago"
- Configuration verification: networkctl cat [NIC Name]