Public bug reported:

I have an up-to-date Ubuntu 18.04 (bionic) server installation (with
systemd 237-3ubuntu10) which has following netplan configuration:

```
root@ubuntu:~# cat /etc/netplan/01-netcfg.yaml 
# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
  version: 2
  renderer: networkd
  ethernets:
    all:
      match: {}
      dhcp4: yes
root@ubuntu:~# cat /run/systemd/network/10-netplan-all.network  
[Match]

[Network]
DHCP=ipv4

[DHCP]
UseMTU=true
RouteMetric=100
```

Despite having DHCPv4 configured, no IPv4 address is configured on the
ethernet device:

```
root@ubuntu:~# ip a show ens6
2: ens6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 64000 qdisc fq_codel state UP 
group default qlen 1000
    link/ether 02:01:71:8f:cc:72 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::1:71ff:fe8f:cc72/64 scope link
       valid_lft forever preferred_lft forever
```

The kernel dmesg has no related messages and the journal log also looks
normal:

```
root@ubuntu:~# journalctl -u systemd-networkd
Jul 02 16:36:51 ubuntu systemd[1]: Starting Network Service...
Jul 02 16:36:51 ubuntu systemd-networkd[1790]: ens6: Gained IPv6LL
Jul 02 16:36:51 ubuntu systemd-networkd[1790]: Enumeration completed
Jul 02 16:36:51 ubuntu systemd[1]: Started Network Service.
Jul 02 16:36:51 ubuntu systemd-networkd[1790]: lo: Link is not managed by us
Jul 02 16:36:51 ubuntu systemd-networkd[1790]: lo: Configured
```

Calling dhclient sets up the device correctly:

```
root@ubuntu:~# dhclient ens6
root@ubuntu:~# cat /var/lib/dhcp/dhclient.leases
lease {
  interface "ens6";
  fixed-address 87.106.172.36;
  option subnet-mask 255.255.255.255;
  option dhcp-lease-time 600;
  option routers 87.106.172.1;
  option dhcp-message-type 5;
  option domain-name-servers 46.16.74.70,46.16.72.37;
  option dhcp-server-identifier 87.106.172.1;
  option interface-mtu 64000;
  option host-name "ubuntu-18_04-fkb-2018-07-02";
  renew 1 2018/07/02 16:46:51;
  rebind 1 2018/07/02 16:51:31;
  expire 1 2018/07/02 16:52:46;
}
root@ubuntu:~# ip a show ens6
2: ens6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 64000 qdisc fq_codel state UP 
group default qlen 1000
    link/ether 02:01:71:8f:cc:72 brd ff:ff:ff:ff:ff:ff
    inet 87.106.172.36/32 brd 87.106.172.36 scope global ens6
       valid_lft forever preferred_lft forever
    inet6 fe80::1:71ff:fe8f:cc72/64 scope link 
       valid_lft forever preferred_lft forever
```

** Affects: systemd (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1779721

Title:
  systemd-networkd does not configure DHCPv4

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1779721/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to