Comment 3 for bug 1769486

Revision history for this message
Ryan Harper (raharper) wrote : Re: [Bug 1769486] Re: Not honoring DHCPOFFER

I think you want to include the following in your netplan configuration:

dhcp-identifier: mac

Like this:

network:
  version: 2
  renderer: networkd
  ethernets:
    enp0s3:
      dhcp4: yes
      dhcp-identifier: mac

This should send the MAC address instead of a DHCP ClientID which is different.

More details here:
https://bugs.launchpad.net/netplan/+bug/1738998

On Wed, May 16, 2018 at 7:20 PM, Weikai Zhang
<email address hidden> wrote:
> 1) contents of /etc/netplan/*.yaml
>
> root@ubuntu2:~# cat /etc/netplan/*
> # This file describes the network interfaces available on your system
> # For more information, see netplan(5).
> network:
> version: 2
> renderer: networkd
> ethernets:
> enp0s3:
> dhcp4: yes
>
>
> 2) output from networkctl status --all
> Server 1
>
> ● 1: lo
> Link File: /lib/systemd/network/99-default.link
> Network File: n/a
> Type: loopback
> State: carrier (unmanaged)
> Address: 127.0.0.1
> ::1
>
> ● 2: enp0s3
> Link File: /lib/systemd/network/99-default.link
> Network File: /run/systemd/network/10-netplan-enp0s3.network
> Type: ether
> State: routable (configured)
> Path: pci-0000:00:03.0
> Driver: e1000
> Vendor: Intel Corporation
> Model: 82540EM Gigabit Ethernet Controller (PRO/1000 MT Desktop Adapter)
> HW Address: 08:00:27:2b:63:29 (PCS Systemtechnik GmbH)
> Address: 192.168.22.67
> fd7c:42eb:6fab::4a6
> fd7c:42eb:6fab:0:a00:27ff:fe2b:6329
> fe80::a00:27ff:fe2b:6329
> Gateway: 192.168.16.1
> DNS: 192.168.16.1
> fd7c:42eb:6fab::1
> Search Domains: wlan
>
>
> Sever 2
> ● 1: lo
> Link File: /lib/systemd/network/99-default.link
> Network File: n/a
> Type: loopback
> State: carrier (unmanaged)
> Address: 127.0.0.1
> ::1
>
> ● 2: enp0s3
> Link File: /lib/systemd/network/99-default.link
> Network File: /run/systemd/network/10-netplan-enp0s3.network
> Type: ether
> State: routable (configured)
> Path: pci-0000:00:03.0
> Driver: e1000
> Vendor: Intel Corporation
> Model: 82540EM Gigabit Ethernet Controller (PRO/1000 MT Desktop Adapter)
> HW Address: 08:00:27:67:16:ea (PCS Systemtechnik GmbH)
> Address: 192.168.22.67
> fd7c:42eb:6fab::4a6
> fd7c:42eb:6fab:0:a00:27ff:fe67:16ea
> fe80::a00:27ff:fe67:16ea
> Gateway: 192.168.16.1
> DNS: 192.168.16.1
> fd7c:42eb:6fab::1
> Search Domains: wlan
>
>
> 3) output from journalctl -b -u systemd-networkd.service
> Server 1
> -- Logs begin at Fri 2018-04-27 17:13:44 EDT, end at Wed 2018-05-16 19:59:17 EDT. --
> May 16 19:58:31 ubuntu systemd[1]: Starting Network Service...
> May 16 19:58:31 ubuntu systemd-networkd[450]: Enumeration completed
> May 16 19:58:31 ubuntu systemd[1]: Started Network Service.
> May 16 19:58:31 ubuntu systemd-networkd[450]: lo: Link is not managed by us
> May 16 19:58:31 ubuntu systemd-networkd[450]: enp0s3: IPv6 successfully enabled
> May 16 19:58:31 ubuntu systemd-networkd[450]: enp0s3: Gained carrier
> May 16 19:58:31 ubuntu systemd-networkd[450]: enp0s3: DHCPv4 address 192.168.22.67/20 via 192.168.16.1
> May 16 19:58:31 ubuntu systemd-networkd[450]: Not connected to system bus, not setting hostname.
> May 16 19:58:32 ubuntu systemd-networkd[450]: enp0s3: Gained IPv6LL
> May 16 19:58:32 ubuntu systemd-networkd[450]: enp0s3: Configured
> May 16 19:58:33 ubuntu systemd-networkd[450]: enp0s3: DHCPv6 address fd7c:42eb:6fab::4a6/128 timeout preferred -1 valid -1
>
>
> Server 2
> -- Logs begin at Fri 2018-04-27 17:13:44 EDT, end at Wed 2018-05-16 19:51:37 EDT. --
> May 16 19:50:23 ubuntu2 systemd[1]: Starting Network Service...
> May 16 19:50:24 ubuntu2 systemd-networkd[451]: Enumeration completed
> May 16 19:50:24 ubuntu2 systemd[1]: Started Network Service.
> May 16 19:50:24 ubuntu2 systemd-networkd[451]: lo: Link is not managed by us
> May 16 19:50:24 ubuntu2 systemd-networkd[451]: enp0s3: IPv6 successfully enabled
> May 16 19:50:24 ubuntu2 systemd-networkd[451]: enp0s3: Gained carrier
> May 16 19:50:24 ubuntu2 systemd-networkd[451]: enp0s3: DHCPv4 address 192.168.22.67/20 via 192.168.16.1
> May 16 19:50:24 ubuntu2 systemd-networkd[451]: Not connected to system bus, not setting hostname.
> May 16 19:50:25 ubuntu2 systemd-networkd[451]: enp0s3: Gained IPv6LL
> May 16 19:50:25 ubuntu2 systemd-networkd[451]: enp0s3: Configured
> May 16 19:50:26 ubuntu2 systemd-networkd[451]: enp0s3: DHCPv6 address fd7c:42eb:6fab::4a6/128 timeout preferred -1 valid -1
>
> 4) In your ifupdown scenario, please include your /etc/network/interfaces contents
> auto enp0s3
> iface enp0s3 inet dhcp
>
> 5) In your ifupdown secnario, please include /var/lib/dhcp/*.leases contents
> lease {
> interface "enp0s3";
> fixed-address 192.168.22.68;
> filename "pxelinux.0";
> server-name "openwrt";
> option subnet-mask 255.255.240.0;
> option routers 192.168.16.1;
> option dhcp-lease-time 21600;
> option dhcp-message-type 5;
> option domain-name-servers 192.168.16.1;
> option dhcp-server-identifier 192.168.16.1;
> option dhcp-renewal-time 10800;
> option broadcast-address 192.168.31.255;
> option dhcp-rebinding-time 18900;
> option host-name "ubuntu";
> option domain-name "wlan";
> renew 4 2018/05/17 03:06:39;
> rebind 4 2018/05/17 05:33:39;
> expire 4 2018/05/17 06:18:39;
> }
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1769486
>
> Title:
> Not honoring DHCPOFFER
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/netplan/+bug/1769486/+subscriptions