Page MenuHomeVyOS Platform

Allow free-form setting of DHCPv6 server options
Closed, ResolvedPublicFEATURE REQUEST

Description

In set service dhcp-server I can specify global-parameters free-form according to the format of dhcpd.conf. Further, I can specify parameters at the shared-network-name or subnet level. This is important for adding custom DHCP options.

In DHCPv6 I do not have this ability through set service dhcpv6-server.

This feature request is to add the same capability for free-form parameters/options entry as is available in the DHCP server.

Details

Difficulty level
Unknown (require assessment)
Version
-
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible
Issue type
Feature (new functionality)

Event Timeline

It was a lot of issues with it in openvpn.
So we decide to avoid to use raw options
Let us know which options do you need?

In dhcpdv6.conf I have added the following to support Cisco VoIP phone provisioning over IPv6:

(global section)

option space ciscovoip code width 2 length width 2;
option vsio.ciscovoip code 9 = encapsulate ciscovoip;
option ciscovoip.tftp-servers code 1 = array of ip6-address;

And then in shared-network declaration,

option ciscovoip.tftp-servers (ipv6 address);

Proposed CLI:

set service dhcpv6-server global-parameters cisco-voip width 2 
set service dhcpv6-server global-parameters cisco-voip length-width 2 
set service dhcpv6-server global-parameters cisco-voip tftp-servers 
set service dhcpv6-server shared-network-name Lan-v6-02 subnet 2001:db8:23::/64 cisco-voip tftp-server xx:xx:xx

PR https://github.com/vyos/vyos-1x/pull/1293

set service dhcpv6-server global-parameters cisco-voip length-width '2'
set service dhcpv6-server global-parameters cisco-voip tftp-servers
set service dhcpv6-server global-parameters cisco-voip width '2'
set service dhcpv6-server global-parameters name-server '2001:db8:23::8888'
set service dhcpv6-server global-parameters name-server '2001:db8:23::8008'
set service dhcpv6-server shared-network-name Lan-v6-02 subnet 2001:db8:23::/64 address-range start 2001:db8:23::199 stop '2001:db8:23::fffd'
set service dhcpv6-server shared-network-name Lan-v6-02 subnet 2001:db8:23::/64 cisco-voip tftp-server '2001:db8:23::1001'
set service dhcpv6-server shared-network-name Lan-v6-02 subnet 2001:db8:23::/64 cisco-voip tftp-server '2001:db8:23::1002'
set service dhcpv6-server shared-network-name Lan-v6-02 subnet 2001:db8:23::/64 name-server '2001:db8::ffff'

dhcpdv6 configuration:

log-facility local7;

option dhcp6.name-servers 2001:db8:23::8888, 2001:db8:23::8008;
option space ciscovoip code width 2 length width 2;
option vsio.ciscovoip code 9 = encapsulate ciscovoip;
option ciscovoip.tftp-servers code 1 = array of ip6-address;

# Shared network configration(s)
shared-network Lan-v6-02 {
    subnet6 2001:db8:23::/64 {
        range6 2001:db8:23::199 2001:db8:23::fffd;
        option dhcp6.name-servers 2001:db8::ffff;
        option ciscovoip.tftp-servers 2001:db8:23::1001, 2001:db8:23::1002;
    }
    on commit {
        set shared-networkname = "Lan-v6-02";
    }
}
[e

@billsimon

Not a super expert in ISC DHCPd but it feels like the vendor specific options are hardcoded

option space ciscovoip code width 2 length width 2;
option vsio.ciscovoip code 9 = encapsulate ciscovoip;
option ciscovoip.tftp-servers code 1 = array of ip6-address;

As VSIO (Vendor-specific Information Option) has fixed values for the vendors (9 = Cisco) we should name it:

option space cisco;
option cisco.tftp-servers code 1 = array of ip6-address;
option vsio.cisco code 9 = encapsulate cisco;

I am not 100% sure if we should add code width 2 length width 2 or if it can be left blank.

set service dhcpv6-server shared-network-name Lan-v6-02 subnet 2001:db8:23::/64 cisco-voip tftp-server '2001:db8:23::1001'

I am also not expert; I used the options as described by documentation, but do not understand DHCPD in depth.

If you like I will look into this further so that the solution on VyOS will be accurate.

Confirmed working using the following CLI options with IPv6 only Cisco 7961G Phone:

set service dhcpv6-server shared-network-name NET1 subnet 2001:db8::/64 address-range start 2001:db8::100 stop '2001:db8::199'
set service dhcpv6-server shared-network-name NET1 subnet 2001:db8::/64 domain-search 'vyos.net'
set service dhcpv6-server shared-network-name NET1 subnet 2001:db8::/64 name-server '2001:db8::ffff'
set service dhcpv6-server shared-network-name NET1 subnet 2001:db8::/64 name-server '2001:db8::ffaa'
set service dhcpv6-server shared-network-name NET1 subnet 2001:db8::/64 vendor-option cisco tftp-server '2001:db8::d'
set service router-advert interface eth0.201 managed-flag
set service router-advert interface eth0.201 prefix 2001:db8::/64
c-po changed the task status from Open to Needs testing.Apr 22 2022, 8:06 PM
c-po claimed this task.
c-po triaged this task as Wishlist priority.

Thank you, team, for such a quick response to my request. I have not even had the chance to test it yet but trust that this will work perfectly. Again, many thanks!