Background:
Hardware: Thinkpad X301
In the installation of Ubuntu 18.04.1 Server (64-bit) the installation was stuck at the network setup portion of the installation. The network setup timed out and no IP address seemed to be assigned to the ethernet interface (enp0s25 in this case).
I instead downloaded the alternate installer and the installation went smoothly and dhcp was autoconfigured (which also works flawlessly in the 16.04 server installation). However after the installation 18.04 hangs at the "Waiting for network to be configured" message. After 2 minutes it continues and lets me access the terminal.
Configuration
Output of ifconfig after boot
enp0s25: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::222:68ff:fe0c:bf44 prefixlen 64 scopeid 0x20<link>
ether 00:22:68:0c:bf:44 txqueuelen 1000 (Ethernet)
RX packets 225 bytes 59069 (59.0 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 20 bytes 3686 (3.6 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 20 memory 0xf0600000-f0620000
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 528 bytes 32112 (32.1 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 528 bytes 32112 (32.1 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Output of ip addr show after boot
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp0s25: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 00:22:68:0c:bf:44 brd ff:ff:ff:ff:ff:ff
inet6 fe80::222:68ff:fe0c:bf44/64 scope link
valid_lft forever preferred_lft forever
3: wls1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 00:21:6a:1d:ee:fe brd ff:ff:ff:ff:ff:ff
01-netcfg.yaml
network:
version: 2
renderer: networkd
ethernets:
enp0s25:
dhcp4: true
Temporary solution
Tried using sudo ip addr add 192.168.0.107 dev enp0s25
- IP is assigned to the interface but no internet
Then i tried sudo dhclient -v enp0s25
- Which assigns an IP and internet works
Output after sudo dhclient -v enp0s25
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp0s25: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 00:22:68:0c:bf:44 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.107/24 brd 192.168.0.255 scope global enp0s25
valid_lft forever preferred_lft forever
inet6 fe80::222:68ff:fe0c:bf44/64 scope link
valid_lft forever preferred_lft forever
3: wls1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 00:21:6a:1d:ee:fe brd ff:ff:ff:ff:ff:ff
In summary - The question
What needs to be changed in order for ubuntu to obtain a dynamic IP address on boot by itself?
sudo tcpdump -i enp0s25 -s 1500 -w dhcp-packet-capture.pcap port 67 or port 68
followed by 'sudo netplan apply') and submit this as a bug report against the systemd package in Ubuntu.