Ubuntu server 20.04 fails to get IP address from DHCP server (no network connectivity)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
netplan.io (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
subiquity (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Ubuntu 20.04 server amd64, running as virtual machine on FreeNAS-11.3-U3.2.
Network interface was configured with driver VirtIO, and network interface is bridged at FreeNAS.
The issue is that I have DHCP server in my LAN and Ubuntu installer gets IPv4 address and applies updates from internet. Install process is OK. Once installation is finished, reboot is required but Ubuntu will start but no IP address is assigned to enp0s4 interface, so Ubuntu 20.04 server has no network connectivity. I can manually force IP address allocation with command "sudo dhclient enp0s4" and it works but that is just a workaround. IP address should be allocated automatically during server boot...
I have older Ubuntu machines on the same FreeNAS box and those work fine, so I assume there is a bug in Ubuntu 20.04 and DHCP client is broken or not reliable... :-( Some problem in netplan utility??
I tried to install fresh 18.04.4 to my FreeNAS box and I see the same problem, no IP address is assigned during boot. That is strange because old installation of 18.04 from the past works fine.
I tried to install 20.04 to VMware ESXi 6.7 and I see the same problem, no IP address is assigned to the new instance (install is OK, but after restart, no network connectivity, "dhclient ensp0s4" is working fine).
Summary is that I see similar problem on fresh installs of 20.04 and 18.04, FreeNAS or ESXi. I can connect instances with "dhclient enp0s4", so it looks like DHCP server works fine and there is no problem on LAN...
This is in file etc/netplan/ 00-installer- config. yaml (enp0s5 is configured with DHCP4, but real NIC is enp0s4...)
#####
# This is the network config written by 'subiquity'
network:
ethernets:
enp0s5:
dhcp4: true
version: 2
#####
This is visible in output from "sudo journalctl":
... resolved[ 718]: Using system hostname 't2004'. g71af48df- 0ubuntu5 running 'init' at Fri, 05 Jun 2020 02:53:53 +0000. Up 15.84 seconds. +++++++ +++++++ ++++++Net device info+++ +++++++ +++++++ +++++++ ++++ --+---- ---+--- ------- -+----- ------+ ------- +------ ------- ------+ --+---- ---+--- ------- -+----- ------+ ------- +------ ------- ------+ --+---- ---+--- ------- -+----- ------+ ------- +------ ------- ------+ +++++++ +++++Route IPv6 info+++ +++++++ +++++++ ++ -+----- ------- -+----- ----+-- ------- --+---- ---+ -+----- ------- -+----- ----+-- ------- --+---- ---+ -+----- ------- -+----- ----+-- ------- --+---- ---+
Jun 05 02:53:44 t2004 kernel: virtio_net virtio1 enp0s4: renamed from eth0
...
Jun 05 02:53:53 t2004 systemd-
Jun 05 02:53:53 t2004 systemd[1]: Started Network Name Resolution.
Jun 05 02:53:53 t2004 systemd[1]: Reached target Network.
Jun 05 02:53:53 t2004 systemd[1]: Reached target Host and Network Name Lookups.
Jun 05 02:53:54 t2004 cloud-init[727]: Cloud-init v. 20.1-10-
Jun 05 02:53:54 t2004 cloud-init[727]: ci-info: +++++++
Jun 05 02:53:54 t2004 cloud-init[727]: ci-info: +------
Jun 05 02:53:54 t2004 cloud-init[727]: ci-info: | Device | Up | Address | Mask | Scope | Hw-Address |
Jun 05 02:53:54 t2004 cloud-init[727]: ci-info: +------
Jun 05 02:53:54 t2004 cloud-init[727]: ci-info: | enp0s4 | False | . | . | . | 00:a0:98:4f:5d:d5 |
Jun 05 02:53:54 t2004 cloud-init[727]: ci-info: | lo | True | 127.0.0.1 | 255.0.0.0 | host | . |
Jun 05 02:53:54 t2004 cloud-init[727]: ci-info: | lo | True | ::1/128 | . | host | . |
Jun 05 02:53:54 t2004 cloud-init[727]: ci-info: +------
Jun 05 02:53:54 t2004 cloud-init[727]: ci-info: +++++++
Jun 05 02:53:54 t2004 cloud-init[727]: ci-info: +------
Jun 05 02:53:54 t2004 cloud-init[727]: ci-info: | Route | Destination | Gateway | Interface | Flags |
Jun 05 02:53:54 t2004 cloud-init[727]: ci-info: +------
Jun 05 02:53:54 t2004 cloud-init[727]: ci-info: +------
...