You are not logged in.
Pages: 1
I am trying to setup the static ip using systemd-networkd as in https://wiki.archlinux.org/title/Systemd-networkd . I created a file /etc/systemd/network/20-wired.network
[Match]
Name=enp0s25
[Network]
Address=192.168.2.7/24
Gateway=192.168.2.1
DNS=192.168.3.1But after
systemctl restart systemd-networkd.serviceit seems that the systemd does not read this file. The enp0s25 setup is not changed. It did not get the ip address. What is the problem? Thanks.
Last edited by XiaoaiX (2021-05-15 03:58:04)
Offline
Do you see something interesting in "journalctl -eb" at the end after the service restart? The "systemctl status systemd-networkd" command will also show a few lines from the journal.
There's a command "networkctl" that might be interesting to look into. You can run "networkctl reconfigure enp0s25". If you check the journal, you'll see it prints the config file names it looks at.
Offline
It looks like mine (which works), except my DNS specification is in the same subnet. Are you sure yours shouldn't have
DNS=192.168.2.1Offline
Output of...
find /etc/systemd -type l -exec test -f {} \; -print | awk -F'/' '{ printf ("%-40s | %s\n", $(NF-0), $(NF-1)) }' | sort -fOffline
Pages: 1