Changes

Jump to: navigation, search

How to configure the network interfaces

611 bytes added, 13:58, 6 November 2019
m
{{AppliesToAxelLite}}
{{AppliesToAxelEsatta}}
{{Applies To Bora}}
{{Applies To BoraX}}
{{Applies To BoraLite}}
{{Applies To Diva}}
{{InfoBoxBottom}}
== Introduction ==
One For deploying an Embedded System, one of the most used important configuration is the ''Network Interface configuration''.
Once the Embedded Device is finally configured for stand-alone bootstrap, the network interface has to should be automatically configured for reaching the device remotely via netowrk network connections like ssh, telnet, ftp, htpphttp, etc.
This Application Note briefly describes how it is possible to simply configure the network interfaces on [https://en.wikipedia.org/wiki/UNIX_System_V SystemV] (aka ''SysV'') or [https://www.freedesktop.org/wiki/Software/systemd/ systemd]
=== Resources ===
For further details on network configuration, please refer - for example - to:
* IP address range of the LAN network '''192.168.1.0 - 192.168.1.255'''
* IP address of the gateway '''192.168.1.254'''
* IP address of the PC device '''192.168.1.100'''
== SysV ==
Basically, for network configuration, it should be enough to properly configure the <code>/etc/network/interfaces</code> file.
 
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
Here below an example of configuration file:
<pre>
auto eth0
iface eth0 inet static
address 192.168.1.100
=== loopback network interface ===
The following configuration entry in the '''/etc/network/interfaces''' file brings up the loopback network interface lo upon booting the system (via auto stanza).
<pre>
# The loopback interface
auto lo
iface lo inet loopback
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/eth0.network''' as per te the following paragraphs. 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 ===
=== DNS ===
The DNS key (in the configuration file) is used only if the '''systemd-resolved service ''' is enabled and the '''/etc/resolv.conf''' has a symbolic link to '''/run/systemd/resolve/stub-resolv.conf'''
ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
 
=== loopback network interface ===
systemd contains native implementations of various tasks that need to be executed as part of the boot process.
 
For example, it sets the hostname or configures the loopback network device.
8,154
edits

Navigation menu