Hi,
I would like to use systemd-networkd.service instead of using networking.service.
I disabled networking.service by “systemctl disable networking.service”, and enabled systemd-networkd.service by
“systemctl enable systemd-networkd.service”.
I removed /etc/network/interfaces and /etc/network/interfaces.d/*
Then I created /etc/systemd/network/20-eth0.network of permission 644 with the following contents:
[Match]
Name=eth0
[Network]
DHCP=yes
Then I reboot system.
eth0 got an dhcp IPv4 address. And I can initially ping it from my laptop. However, after about 1 minute, ping failed. I then restart systemd-networkd.service, but this time, eth0 didn’t get any DHCP IPv4 address.
I also tried put “DHCP=ipv4” in network file, but it still failed.
Why it initially works, but after 1 minute, it lose network connection?
Regards,
Shuo