Skip to content

Network Interface Configuration

This page explains how to configure the network interfaces on Engicam-based systems using systemd-networkd or ConnMan, depending on the distribution and image configuration.


systemd-networkd is a lightweight and deterministic network manager included in most Yocto-based images. Configuration is file-based and persistent across reboots.


Set a Fixed IP

Create a new network configuration file for the eth0 interface:

vi /etc/systemd/network/20-eth0.network

Sample configuration:

[Match]
# You can also use wildcards (e.g. Name=eth*)
Name=eth0

[Network]
#DHCP=v4 # Uncomment this line if you prefer DHCP
# Static IP example:
# 192.168.2.62 netmask 255.255.255.0
Address=192.168.2.62/24
IPv4LLRoute=true
Gateway=192.168.2.1
DNS=8.8.8.8

Explanation of key fields

  • Name=eth0 Selects the network interface to configure.
  • Address=192.168.2.62/24 Sets the static IPv4 address (CIDR notation).
  • Gateway=192.168.2.1 Default route for outgoing traffic.
  • DNS=8.8.8.8 Optional DNS server definition.
  • DHCP=v4 Un-comment to enable automatic IPv4 configuration instead of static IP.

Enable the network management service:

systemctl enable systemd-networkd.service

Then reboot the board to apply the configuration.


Define DNS Server

DNS can be specified either: - inside the .network interface file (as shown above), or - globally in /etc/systemd/resolved.conf.

Edit the resolver configuration:

vi /etc/systemd/resolved.conf

Example:

[Resolve]
DNS=8.8.8.8 8.8.4.4 2001:4860:4860::8888 2001:4860:4860::8844

Replace /etc/resolv.conf with a symlink pointing to the systemd-managed resolver:

mv /etc/resolv.conf /etc/resolv.conf.save
ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf

Enable the DNS resolver:

systemctl enable systemd-resolved.service

After reboot, systemd will handle DNS resolution consistently across the system.

ConnMan (Connection Manager) is a lightweight, user-friendly network manager often used in graphical or embedded environments. It provides dynamic management of wired, Wi-Fi and cellular interfaces.


Verify ConnMan Availability

First, ensure the ConnMan command-line tool is installed:

connmanctl --version

If the command is available, you can proceed with configuration.


Configuring Wired Interfaces

List the wired interfaces recognized by ConnMan:

connmanctl services

Example output:

*AR Wired                                ethernet_d6df1c33e1eb_cable

ConnMan names wired interfaces as:

ethernet_<mac_address>_cable

Important

Only interfaces with an active Ethernet link (cable plugged in) are displayed.


Set a Static IP

Use connmanctl config to manually assign an IP configuration:

connmanctl config <service> --ipv4 manual <ip> <netmask> <gateway>
connmanctl config <service> --nameservers <dns-addresses>

Example:

connmanctl config ethernet_d6df1c33e1eb_cable --ipv4 manual 192.168.2.12 255.255.255.0 192.168.2.1
connmanctl config ethernet_d6df1c33e1eb_cable --nameservers 8.8.8.8 2.2.2.2

Explanation of the parameters

  • <service>: the ConnMan service name (e.g. ethernet_d6df1c33e1eb_cable)
  • --ipv4 manual: switches from DHCP to static configuration
  • <ip> <netmask> <gateway>: network parameters
  • --nameservers: optional DNS server list

Configuration is applied immediately and persists across reboots.