TS-4900 Network configuration example: Difference between revisions

From embeddedTS Manuals
(Created page with "Our default yocto image uses systemd which stores its network files in "/etc/systemd/network/". The simplest network config would look like this: In /etc/systemd/network/eth...")
 
No edit summary
Line 1: Line 1:
Our default yocto image uses systemd which stores its network files in "/etc/systemd/network/".  The simplest network config would look like this:
Our default yocto image uses systemd which stores its network files in "/etc/systemd/network/".  The simplest network config would look like this:


In /etc/systemd/network/eth.network
In /etc/systemd/network/50-eth.network
<source lang=ini>
<source lang=ini>
[Match]
[Match]
Line 9: Line 9:
DHCP=yes
DHCP=yes
</source>
</source>
For a static configuration you would create a config file for that specific interface.
/etc/systemd/network/10-static-eth0.network
<source lang=ini>
[Match]
Name=eth0
[Network]
Address=192.168.0.50/24
Gateway=192.168.0.1
DNS=192.168.0.1
</source>
For more information on what options are available to configure the network, see the [http://www.freedesktop.org/software/systemd/man/systemd.network.html systemd network documentation].

Revision as of 17:27, 30 July 2014

Our default yocto image uses systemd which stores its network files in "/etc/systemd/network/". The simplest network config would look like this:

In /etc/systemd/network/50-eth.network

[Match]
Name=eth*

[Network]
DHCP=yes

For a static configuration you would create a config file for that specific interface. /etc/systemd/network/10-static-eth0.network

[Match]
Name=eth0

[Network]
Address=192.168.0.50/24
Gateway=192.168.0.1
DNS=192.168.0.1

For more information on what options are available to configure the network, see the systemd network documentation.