1

Is it possible to pass a DHCP option 77 and/or DHCPv6 option 15 in netplan using the networkd backend. Currently networkd supports passing DHCP option 77 and I believe there is work on adding the ability to pass custom DHCPv6 options, however I don't know how to setup netplan to support these configuration options.

I use Ubuntu and in the past I have always called dhclient manually from ifupdown. This gives me the most control over the DHCP workflow. I would have something like this in /etc/network/interfaces:

auto eth0
iface eth0 inet6 manual
    post-up dhclient -6 -1 -cf /etc/dhcp/dhclient.$IFACE.conf $IFACE
    pre-down dhclient -r -6 -cf /etc/dhcp/dhclient.$IFACE.conf $IFACE
iface eth0 inet manual
    post-up dhclient -i -1 -cf /etc/dhcp/dhclient.$IFACE.conf $IFACE
    pre-down dhclient -r -i -cf /etc/dhcp/dhclient.$IFACE.conf $IFACE

This allows me to have a configuration files with specific DHCP settings for each interface and in the dhcp configuration file I could specify DHCP options to send to the server:

option         dhcp6.user-class code 15 = text;

timeout        60;
retry          300;
select-timeout 5;
reboot         10;
initial-delay  1;

interface "eth0" {
    send       dhcp6.user-class "cmp cloud mgmt";
    send       user-class "cmp cloud mgmt";
    send       fqdn.fqdn "bllcloudcmp01-mgmt.harmonywave.cloud.";
    send       fqdn.server-update on;
    request    subnet-mask, broadcast-address, time-offset, routers,
        domain-name, domain-name-servers, domain-search, host-name,
        dhcp6.name-servers, dhcp6.domain-search, dhcp6.fqdn, dhcp6.sntp-servers,
        netbios-name-servers, netbios-scope, interface-mtu, ntp-servers;
}

Since option 77 is defined by default in dhclient all I had to do was define option 15 in the dhcp6 user space and I could pass both.

Anybody know how to translate the above ifupdown configuration into netplan?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.