Issues in using User Class Option

Jain, Saurabh Saurabh.Jain at landisgyr.com
Thu Dec 14 09:33:29 UTC 2017


Below are the configuration I have made in dhcp.conf


log-facility local7;
Option space Test code width 2 length width 2 hash size 17;
option Test.ADDR code 1 = array of ip6-address;
option Test.ADDR ::1;


class "Testclass" {

match if option dhcp6.vendor-opts = 00:00:20:00;

option dhcp6.vendor-opts  00:00:20:00:
00:01:00:0c:
48:65:6c:6c:6f:20:77:6f:72:6c:64:21;

vendor-option-space Test;
option Test.ADDR ::3;
}


In the client solicit packet,  I have included Vendor specific information (17), with enterprise id as 8192, option request (15) with requested option code 17, and user class option (15) with data as "Testclass".


Logs from the DHCPv6 server:


Copyright 2004-2016 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
class match: (eq (option dhcp6.vendor-opt 00:00:20:00)
exec: supersede option server.ddns-hostname
exec: supersede option server.ddns-domainname
exec: supersede option server.ddns-rev-domainname
exec: supersede option dhcp6.rapid-commit
exec: supersede option server.default-lease-time
exec: supersede option server.max-lease-time
exec: supersede option server.log-facility
exec: supersede option Test.ADDR
Config file: /etc/dhcp/dhcpd.conf
Database file: /var/lib/dhcp/dhcpd6.leases
PID file: /var/run/dhcpd6.pid
data: const = b8
Wrote 0 class decls to leases file.
Wrote 0 NA, 0 TA, 0 PD leases to lease file.
Bound to *:547
Listening on Socket/5/tap0/fd00::/64
Sending on   Socket/5/tap0/fd00::/64
exec: supersede option server.ddns-hostname
exec: supersede option server.ddns-domainname
exec: supersede option server.ddns-rev-domainname
exec: supersede option dhcp6.rapid-commit
exec: supersede option server.default-lease-time
exec: supersede option server.max-lease-time
exec: supersede option server.log-facility
exec: supersede option Test.ADDR
Server starting service.
Solicit message from fe80::daf6:c8ff:feb0:8f15 port 546, transaction ID 0x336E00
checking against class Testsubclass...
data: option dhcp6.vendor-opts = NULL
data: const = 00:00:20:00
bool: equal = false
bool: check (default) returns false
exec: evaluate: succeeded
exec: supersede option server.ddns-hostname
exec: supersede option server.ddns-domainname
exec: supersede option server.ddns-rev-domainname
exec: supersede option dhcp6.rapid-commit
exec: supersede option server.default-lease-time
exec: supersede option server.max-lease-time
exec: supersede option server.log-facility
exec: supersede option Test.ADDR
Picking pool address fd00::ff76:9e7f
exec: supersede option server.ddns-hostname
exec: supersede option server.ddns-domainname
exec: supersede option server.ddns-rev-domainname
exec: supersede option dhcp6.rapid-commit
exec: supersede option server.default-lease-time
exec: supersede option server.max-lease-time
exec: supersede option server.log-facility
exec: supersede option Test.ADDR
data: const = ff:ff:ff:ff
Reply NA: address fd00::ff76:9e7f to client with duid 00:03:00:06:00:1c:64:04:80:77:13:1c iaid = -2139679972 valid for 4294967295 seconds
data: const = ""
Sending Reply to fe80::daf6:c8ff:feb0:8f15 port 546


Even when I change condition from "match if option dhcp6.vendor-opts = 00:00:20:00;" to  "match if option dhcp6.vendor-opts = 84;", server does not send back any data.

Regards,
Saurabh Jain


From: dhcp-users [mailto:dhcp-users-bounces at lists.isc.org] On Behalf Of Bill Shirley
Sent: Wednesday, December 13, 2017 9:17 PM
To: dhcp-users at lists.isc.org
Subject: Re: Issues in using User Class Option

"vendor-classes" is just a name like "Other_mobile".

Did you put a 'match' in "Test-Class"?

http://www.ipamworldwide.com/ipam/isc-dhcpv6-options.html

Bill
On 12/13/2017 5:17 AM, Jain, Saurabh wrote:
Thanks for your response.

The sample mentioned in manual also indicates use of

class "vendor-classes" {
    match option vendor-class-identifier;
}

However,  when I look out options in DHCPv6 rfc 3315 and also other links I don't find a way to send vendor-class-identifier in solicit packets. In DHCPv4 it is option number 60 but no direct mapping in DHCPv6.  How do I send vendor-class-identifier in DHCPv6 ?

Space issue in line option Test. ADDR::1; was a typo error in mail.

Also is "vendor-classes" in https://www.isc.org/wp-content/uploads/2017/08/dhcp43options.html#VENDOR ENCAPSULATED OPTIONS is a keyword or just a sample name used for example?

Regards,
Saurabh Jain


From: dhcp-users [mailto:dhcp-users-bounces at lists.isc.org] On Behalf Of Bill Shirley
Sent: Wednesday, December 13, 2017 1:49 AM
To: dhcp-users at lists.isc.org<mailto:dhcp-users at lists.isc.org>
Subject: Re: Issues in using User Class Option

I've never seen a class without a 'match' statement.  Are you sure that's valid?:
# ------------------------------------------------------------------------------
class "Other_mobile" {
    match hardware;
    set member_of = "mobile_device";
}
# ------------------------------------------------------------------------------
subclass "Other_mobile"    1:d8:1d:72:41:3c:81;    # Moms-5S

Also when you're using the option statement, there doesn't appear to be a space between
Test.ADDR and ::1;
Example:
class "vendor-classes" {
    match option vendor-class-identifier;
}
subclass "vendor-classes"    "MSFT 5.0" {    # all Windows 2000 DHCP clients
    vendor-option-space Win2k;
    option Win2k.netbios-over-tcpip        0;    # enable
}

Bill
On 12/12/2017 5:33 AM, Jain, Saurabh wrote:
Hi All,

I am having difficulty in using  User class option. I am doing following configuration in the DHCP configuration file  :

option dhcp6.rapid-commit;

Option space Test code width 2 length width 2 hash size 17;
option Test.ADDR code 1 = array of ip6-address;

option Test. ADDR::1;


class "Test-Class" {
vendor-option-space Test;
option Test. ADDR::3;
}

subclass "Test-Class" "TestsubClass" {
vendor-option-space Test;
option Test. ADDR::2;
}

In the Solicit packet, I am sending the User class option as per section 22.15 of RFC 3315 (DHCPv6). In the user-class-data field I have included the class name as "TestsubClass", but in reply dhcpv6 server is not sending any user class.   I have tested by sending "Test-Class" also in the user-class data field but server is not responding with the user class details.

Can you please let  me know the correct configuration? And what should be the content of solicit request ?

Thanks a lot in advance.

Regards,
Saurabh Jain


P PLEASE CONSIDER OUR ENVIRONMENT BEFORE PRINTING THIS EMAIL.

This e-mail (including any attachments) is confidential and may be legally privileged. If you are not an intended recipient or an authorized representative of an intended recipient, you are prohibited from using, copying or distributing the information in this e-mail or its attachments. If you have received this e-mail in error, please notify the sender immediately by return e-mail and delete all copies of this message and any attachments. Thank you.





_______________________________________________

dhcp-users mailing list

dhcp-users at lists.isc.org<mailto:dhcp-users at lists.isc.org>

https://lists.isc.org/mailman/listinfo/dhcp-users





_______________________________________________

dhcp-users mailing list

dhcp-users at lists.isc.org<mailto:dhcp-users at lists.isc.org>

https://lists.isc.org/mailman/listinfo/dhcp-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20171214/8c771cfb/attachment-0001.html>


More information about the dhcp-users mailing list