Not honoring DHCPOFFER

Bug #1769486 reported by Weikai Zhang
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Netplan
Incomplete
Undecided
Unassigned

Bug Description

I'm running Bionic in VirtualBox in Bridge networking mode with different MAC address. The LAN is running Openwrt with DNSMASQ DHCP server. For certain reason netplan is not honoring the DHCPOFFER and assign the same IP address to the instances. I have to switch back to ifupdown to address the issue.

Sun May 6 12:28:02 2018 daemon.info dnsmasq-dhcp[1909]: 4184021092 client provides name: ubuntu
Sun May 6 12:28:02 2018 daemon.info dnsmasq-dhcp[1909]: 4184021092 DHCPDISCOVER(br-lan) 08:00:27:23:9f:d1
Sun May 6 12:28:02 2018 daemon.info dnsmasq-dhcp[1909]: 4184021092 tags: vbox, known, br-lan
Sun May 6 12:28:02 2018 daemon.info dnsmasq-dhcp[1909]: 4184021092 DHCPOFFER(br-lan) 192.168.22.108 08:00:27:23:9f:d1

Revision history for this message
Ryan Harper (raharper) wrote :

Hello,

Thank you for taking the time to report this issue.

Can you provide a few more details to help us work this issue?

Please attach the following

1) contents of /etc/netplan/*.yaml
2) output from networkctl status --all
3) output from journalctl -b -u systemd-networkd.service
4) In your ifupdown scenario, please include your /etc/network/interfaces contents
5) In your ifupdown secnario, please include /var/lib/dhcp/*.lease contents

Changed in netplan:
status: New → Incomplete
Revision history for this message
Weikai Zhang (weikai) wrote :
Download full text (4.9 KiB)

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 -...

Read more...

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

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
>...

Read more...

Revision history for this message
Weikai Zhang (weikai) wrote :

Thank you. It's working. Just wondering why Bionic did not make it as a default option.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.