Multiple entries of DHCPv6 option with same code

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Multiple entries of DHCPv6 option with same code

jamesko
In RFC7774 MPL Parameters
   One network may have multiple MPL Domains with different
   configurations.  To configure more than one MPL Domain via DHCP,
   there may be more than one MPL Parameter Configuration Option given
   to DHCP clients by a DHCP server.

I have tried to configure multiple entries in the dhcpd6.conf but only the
last entry using option code 104 is output in the packet.

# MPL Default Parameters Option 104
option dhcp6.mpl-default-parameters code 104 = {
    unsigned integer 8,     # flags, 0x80 - proactive
    unsigned integer 8,     # tunit
    unsigned integer 16,    # se_lifetime
    unsigned integer 8,     # dm_k
    unsigned integer 16,    # dm_imin
    unsigned integer 8,     # dm_imax
    unsigned integer 16,    # dm_t_exp
    unsigned integer 8,     # c_k
    unsigned integer 16,    # c_imin
    unsigned integer 8,     # c_imax
    unsigned integer 16     # c_t_exp
};

# MPL Domain Parameters Option 104
option dhcp6.mpl-domain-parameters code 104 = {
    unsigned integer 8,     # flags, 0x80 - proactive
    unsigned integer 8,     # tunit
    unsigned integer 16,    # se_lifetime
    unsigned integer 8,     # dm_k
    unsigned integer 16,    # dm_imin
    unsigned integer 8,     # dm_imax
    unsigned integer 16,    # dm_t_exp
    unsigned integer 8,     # c_k
    unsigned integer 16,    # c_imin
    unsigned integer 8,     # c_imax
    unsigned integer 16,    # c_t_exp
    ip6-address             # MPL Domain
};
option dhcp6.mpl-domain-parameters  0x80 100   18000 4 5    16  3   4 20  
16  2  ff03::153;
option dhcp6.mpl-domain-parameters  0x80 100   18000 2 1200 4   15  3 1800 4  
20 ff03::154;
option dhcp6.mpl-default-parameters 0x80 100   18000 1 1    3   3   1 1    9  
10;

I have also tried to configure this as a vendor-encapsulated-options but it
does not appear in the DHCPv6 packet at all.
option vendor-encapsulated-options
    00:68:00:10:
    80:64:46:50:01:00:01:03:00:03:01:00:01:09:00:0a:
    00:68:00:20:
    80:64:46:50:04:00:05:10:00:03:04:00:14:10:00:02:
    ff:03:00:00:00:00:00:00:00:00:00:00:00:00:01:53:
    00:68:00:20:
    80:64:46:50:02:04:b0:04:00:0f:03:07:08:04:00:14:
    ff:03:00:00:00:00:00:00:00:00:00:00:00:00:01:54;

I am currently running version 4.3.3 but could find no release notes that
indicate support for multiple options with the same code was added or
changed.

Any ideas on how to enable this configuration?

Thanks,
James




--
Sent from: http://isc-dhcp-users.2343191.n4.nabble.com/
_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: Multiple entries of DHCPv6 option with same code

jamesko
Since multiple instances of the same option code doesn't seem possible
through custom options in the .conf file, I've gone on to look at the source
but it's jumping into the deep end to try understand how options are
handled.  Is it something that is even possible in the code?  I see a field
for concat_duplicates in struct universe but it seems to only apply to
encapsulated sub-options rather than "root" options.

I realize ISC-DHCP is being deprecated but if anyone has knowledge of this
bit of option processing in the code they could share it would help me out.

I also briefly looked at the replacement KEA but that bit of code was even
more confusing.  Does anyone know if KEA supports multiple entries for
option codes in DHCPv6?



--
Sent from: http://isc-dhcp-users.2343191.n4.nabble.com/
_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: Multiple entries of DHCPv6 option with same code

jamesko
In reply to this post by jamesko
I came up with a patch to make this work by using the configuration "append"
statement.

Append concatenates the options together which is okay for DHCPv4 but not
for DHCPv6.

How would I go about proposing this change to be added to the source?




--
Sent from: http://isc-dhcp-users.2343191.n4.nabble.com/
_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: Multiple entries of DHCPv6 option with same code

jamesko
Below is a diff of the changes I made to support the append keyword in
dhcpd6.conf so multiple entries of the same option may be included in a
lease reply.  This may not be the most efficient or correct way of handling
it but presented for discussion, review, and integration if possible.

Thanks,
James





--
Sent from: http://isc-dhcp-users.2343191.n4.nabble.com/
_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: Multiple entries of DHCPv6 option with same code

jamesko
Nabble seems to have deleted the raw diff even though it showed up in the
preview.
Here it is as an attachment.

006-dhcpv6-append-options.patch
<http://isc-dhcp-users.2343191.n4.nabble.com/file/t383/006-dhcpv6-append-options.patch>  



--
Sent from: http://isc-dhcp-users.2343191.n4.nabble.com/
_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users