I have the following files in /etc/systemd/network (filename followed by content) on a Ubuntu 20.04 server:
File: /etc/systemd/network/10-debug.conf
[Service]
Environment=SYSTEMD_LOG_LEVEL=debug
File: /etc/systemd/network/20-static.network
[Match]
MACAddress=00:1e:67:d6:33:25
[Network]
Address=192.168.1.73/24
Gateway=192.168.1.91
DNS=8.8.8.8
DNS=8.8.4.4
I ran the following commands:
systemctl daemon-reload
systemctl status systemd-networkd
systemctl enable systemd-networkd
systemctl restart systemd-networkd
However, it always sets to IP address of 192.168.1.98. I read man systemd.networkd and found some other .network files in /lib/systemd/network. I renamed them to end with .nt instead of .network and rebooted. Yet, I do not get the desired IP address. Yes there were also files in /run/systemd/network. I removed them but as I understand they are created after boot.
WHat options do I have to set static IP? I absolutely do not need dhcp on the system.