The OS is ubuntu 18.04.5.
There is a network interface named ‘enp4s0’ on my device. I use netplan to setup static ip for the interface, but the interface gets no ip and seems no error in system log.
the netplan configuration is very simple:
network
version: 2
renderer: networkd
ethernets:
enp4s0:
dhcp4: no
dhcp6: no
addresses: [192.168.200.45/24]
In /var/log/syslog, networkd said only:
systemd-networkd[3350]: enp4s0: IPv6 successfully enabled
I think it’s not netplan’s issue, it generates .network file in /run/systemd/network/
[Match]
Name=enp4s0
[Network]
LinkLocalAddressing=ipv6
Address=192.168.200.45/24
systemd-networkd doesn’t set the static ip on the interface.
I don’t know is there any matter with the installation of the OS. I installed OS on VirtualBox VM first, then converted the vdi file to the raw format and used ‘dd’ command to dump the image to a physical machine’s SSD to run. Of course the network interface count and name in VM are different from the both in physical machine, but I think it doesn’t matter, the system can recognize the all network interfaces in physical machine. It is supposed if we add new network interfaces on the physical machine?
I also tried running netplan with same configuration on another machine whose OS is installed manually, it was OK.
I can’t figure out the reason, maybe I miss something I don’t know.
Could any one help me, thanks.