Re: Assign IP address at boot time


jchludzinski
 

Create the file /etc/systemd/network/eth0.conf:

[Match]
Name=eth0
[Network]
Address=<ip>
Gateway=<ip>
DNS=<ip>

That didn't work BUT editing /lib/systemd/network/80-wired.network
[Match]
Name=en* eth*
KernelCommandLine=!nfsroot

[Match]
Name=eth0
[Network]
Address=192.168.0.101/24
#Gateway=<ip>
#DNS=<ip>

[Network]
DHCP=no

[DHCP]
#RouteMetric=10
#ClientIdentifier=mac
... did work, after:
root@arria10:~# systemctl restart systemd-networkd

Join yocto@lists.yoctoproject.org to automatically receive all group messages.