Fedora Account System
Red Hat Associate
Red Hat Customer
Description of problem: Currently dhclient generate duid from the interface's hardware address on first run and saves it into leases file. It's not OK in case of PPP connections because ppp interface doesn't have IANA assigned hw address so duid cannot be generated Version-Release number of selected component (if applicable): dhcp-client-4.3.6-18.fc29.x86_64 How reproducible: 100% Steps to Reproduce: 1. create pppoe connection 2. ifup ppp0 3. dhclient -P -6 -d ppp0 Actual results: # dhclient -P -6 -d ppp0 Internet Systems Consortium DHCP Client 4.3.6 Copyright 2004-2017 Internet Systems Consortium. All rights reserved. For info, please visit https://www.isc.org/software/dhcp/ Listening on Socket/ppp0 Sending on Socket/ppp0 xid: warning: no netdev with useable HWADDR found for seed's uniqueness enforcement xid: rand init seed (0x5ad63ddf) built using gethostid Cannot form default DUID from interface ppp0. PRC: Soliciting for leases (INIT). XMT: Forming Solicit, 0 ms elapsed. Failure assembling a DUID. This version of ISC DHCP is based on the release available on ftp.isc.org. Features have been added and other changes have been made to the base software release in order to make it work better with this distribution. Please report issues with this software via: https://bugzilla.redhat.com/ exiting. Expected results: duid generated from arbitrary chosen interface Additional info:
Workaround 1: https://bugzilla.redhat.com/show_bug.cgi?id=626514#c161 Workaround 2: dhclient -P -6 -d <any_ethernet_iface> Ctrl-C dhclient -P -6 -d ppp0
Workaround: killall -9 dhclient 2> /dev/null echo 'default-duid "\000\002\000\001\017\214\227y\000@c\366\002\000";' > /var/lib/dhclient/dhclient6.leases dhclient -6 -P ppp0 &
Thanks. But this will save static constant duid for all machines which is not good. generator suggested by Steven should work better. myhwaddr=`ip add | grep link/ether | cut -f 6 -d \ | tail -n 1 | sed s/:/\\\\\\\\x/g` echo "default-duid \"\\x00\\x03\\x00\\x01\\x$myhwaddr\";" > $LEASEFILE
NetworkManager uses machine-id for duid generation so it's duid-uuid (RFC 6355 section 4). We may want to switch to it. It should bring consistency in distribution but upgrade may be problematic because of duid change. And it's systemd related feature so will be hard to get it merged upstream
Please bear in mind that NM is not everywhere.
(In reply to udo from comment #5) > Please bear in mind that NM is not everywhere. I don't want to bring NM everywhere for sure. I'm thinking about using /etc/machine-id as source of UUID for duid-uuid generarion. /etc/machine-id is everywhere in Fedora nowadays.
https://fedoraproject.org/wiki/User:Landgraf/dhcp_duid-uuid#DHCPv6_switch_to_DUID-UUID
System Wide change template https://fedoraproject.org/wiki/Changes/DUID_UUID
I was thinking we already use DUID-UUID by default: https://bugzilla.redhat.com/show_bug.cgi?id=560361#c60 https://src.fedoraproject.org/rpms/dhcp/blob/master/f/dhcp-duid_uuid.patch or is that DHCPv4 only ?
(In reply to Jiri Popelka from comment #9) > I was thinking we already use DUID-UUID by default: > https://bugzilla.redhat.com/show_bug.cgi?id=560361#c60 > https://src.fedoraproject.org/rpms/dhcp/blob/master/f/dhcp-duid_uuid.patch > > or is that DHCPv4 only ? According to the code it should work for IPv6 too. Checking. Thank you!
The problem was not in DUID generation itself. it works as Jiri mentioned but in seed uniqueness during xid generation in case of interface without hw address. this should be mitigated now by using hw address of "underlying" interface. Closing