Skip to content

DHCP mode where complete cliend identifier can be specified #7828

@languitar

Description

@languitar

Submission type

  • Request for enhancement (RFE)

systemd version the issue has been seen with

236

Used distribution

debian testing

In case of bug report: Expected behaviour you didn't see

We have a system that needs to integrate with an existing setup where several things are determined by the DHCP client identifier. Therefore, it is important that this identifier is sent as expected by the backend. dhclient and dhcpcd allow to override the complete Client Identifier with a preconfigured value. However, with systemd-networkd we were unable to achieve the same behavior, because there are always some additional bytes that are added to the (encoded) contents of the DUIDRawData field, which is the closest we could find to the client identifier settings for dhclient and dhcpcd. For dhclient this would be a send dhcp-client-identifier config line.

For the reference, here are outputs of dhcpdump. First, for dhclient sending the client identifier as expected:

      TIME: 2018-01-08 15:23:49.923
        IP: 0.0.0.0 (ac:1f:6b:1:77:e0) > 255.255.255.255 (ff:ff:ff:ff:ff:ff)
        OP: 1 (BOOTPREQUEST)
     HTYPE: 1 (Ethernet)
      HLEN: 6
      HOPS: 0
       XID: 031be42d
      SECS: 0
     FLAGS: 0
    CIADDR: 0.0.0.0
    YIADDR: 0.0.0.0
    SIADDR: 0.0.0.0
    GIADDR: 0.0.0.0
    CHADDR: ac:1f:6b:01:77:e0:00:00:00:00:00:00:00:00:00:00
     SNAME: .
     FNAME: .
    OPTION:  53 (  1) DHCP message type         3 (DHCPREQUEST)
    OPTION:  50 (  4) Request IP address        129.70.142.150
    OPTION:  55 (  7) Parameter Request List      1 (Subnet mask)
    	    	    	    	    	         28 (Broadcast address)
    	    	    	    	    	          2 (Time offset)
    	    	    	    	    	          3 (Routers)
    	    	    	    	    	         15 (Domainname)
    	    	    	    	    	          6 (DNS server)
    	    	    	    	    	         12 (Host name)
    	    	    	    	    	        
    OPTION:  61 ( 17) Client-identifier         62:6f:62:2e:63:69:2e:63:69:74:2d:65:63:2e:6e:65:74

What systemd-networkd sends with DUIDRawData set to 62:6f:62:2e:63:69:2e:63:69:74:2d:65:63:2e:6e:65:74 and DUIDType to link-layer is for instance:

      TIME: 2018-01-08 15:24:14.883
        IP: 0.0.0.0 (ac:1f:6b:1:77:e0) > 255.255.255.255
    (ff:ff:ff:ff:ff:ff)
        OP: 1 (BOOTPREQUEST)
     HTYPE: 1 (Ethernet)
      HLEN: 6
      HOPS: 0
       XID: 546f3f45
      SECS: 1
     FLAGS: 0
    CIADDR: 0.0.0.0
    YIADDR: 0.0.0.0
    SIADDR: 0.0.0.0
    GIADDR: 0.0.0.0
    CHADDR: ac:1f:6b:01:77:e0:00:00:00:00:00:00:00:00:00:00
     SNAME: .
     FNAME: .
    OPTION:  53 (  1) DHCP message type         1 (DHCPDISCOVER)
    OPTION:  61 ( 21) Client-
    identifier         ff:e0:b7:52:15:00:03:62:6f:62:2e:63:69:74:2d:65:63:2e:6e:65:74
    OPTION:  55 (  8) Parameter Request List      1 (Subnet mask)
    	    	    	    	    	          3 (Routers)
    	    	    	    	    	         12 (Host name)
    	    	    	    	    	         15 (Domainname)
    	    	    	    	    	          6 (DNS server)
    	    	    	    	    	         33 (Static route)
    	    	    	    	    	        121 (Classless Static
    Route)
    	    	    	    	    	         42 (NTP servers)
    	    	    	    	    	        
    OPTION:  57 (  2) Maximum DHCP message size 576
    OPTION:  12 (  3) Host name                 bob

There are some bytes added to the client identifier. After reading https://github.com/systemd/systemd/blob/master/src/libsystemd-network/sd-dhcp-client.c#L382, this seems to be the IAID, which is either taken from the config file, or generated. So there seems to be no mode to avoid having this added to the client identifier, which breaks the expected setup.

While this behavior might generally conform to more modern RFC regarding DHCP (3315 and 4361), it seems to break some setups, so I would be glad to have some option to also reproduce this behavior, which seems to be required im some places.

Metadata

Metadata

Assignees

No one assigned

    Labels

    RFE 🎁Request for Enhancement, i.e. a feature requestdhcpnetwork

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions