Open main menu

DAVE Developer's Wiki β

Changes

no edit summary
The network configuration for systemd are basically found in the <code>/etc/systemd/network/</code> directory.
The most simply way for configuring the network interface is to create/edit the file '''/etc/systemd/network/201-eth0.network''' as per the following paragraphs. In the event that there are another network interface, then this must be create/edit as '''/etc/systemd/network/201-eth1eth0.network'''.For more example and usage hints on systemd, please refer to our [[XELK-AN-008:_How_to_use_systemd_on_an_Embedded_system#Configuring_the_network_interfaces | wiki]] page.
==== Static IP address ====
SBC ORCA ETRA has two one network interfaces, below is shown how to configure them both through a static IP. In the case of SBCX MINI there is only one ethernet interface, consequently going to configure only eth0 interface.
Example for ethernet interface 0.
[Network]
Address=192.168.1.100
Gateway=192.168.1.254
DNS=192.168.1.1
</pre>
 
Example for ethernet interface 1.
<pre>
[Match]
Name=eth1
 
# Prevent the interface loading if the kernel boots from nfs
KernelCommandLine=!nfsroot
 
[Network]
Address=192.168.1.101
Gateway=192.168.1.254
DNS=192.168.1.1
==== Dynamic IP addres (DHCP) ====
SBC ORCA ETRA has two one network interfaces, below is shown how to configure them both through DHCP. In the case of SBCX MINI there is only one ethernet interface, consequently going to configure only eth0 interface.
The network interface is configured - using a proper DHCP server on the network - by using the '''DHCP''' key in the configuration file as the following:
[Match]
Name=eth0
 
# Prevent the interface loading if the kernel boots from nfs
KernelCommandLine=!nfsroot
 
[Network]
DHCP=yes
</pre>
 
In the event that there are another network interface, the configuration file as the following:
 
<pre>
[Match]
Name=eth1
# Prevent the interface loading if the kernel boots from nfs
==== Apply configuration changes ====
After editing the above files, changes are applied after reboot or by restarting <code>systemd-networkd.service</code>:<syntaxhighlight lang="bash">
root@desk-mx8mpmp1:~# systemctl restart systemd-networkd.service
</syntaxhighlight>
dave_user
220
edits