dhcpcd-discuss

Re: DHCPv6 and OPTION_USER_CLASS

Mattieu Baptiste

Mon Apr 23 16:42:59 2018

Hi Roy,

On Sat, Apr 21, 2018 at 11:49 AM, Roy Marples <roy@xxxxxxxxxxxx> wrote:
>> Thanks, with that setting, the auth option is now sent.
>> But it seems to generate other things in the value field. dhcpcd sends
>> this as the authentication value:
>> 00:00:00:de:84:97:45:46:59:f3:a6:66:74:69:2f:XX:XX:XX:XX:XX:XX:XX
>>
>> Whereas my ISP seems to require that the value only contain the string
>> configured: "fti/xxxxxxx":
>> 00:00:00:00:00:00:00:00:00:00:00:66:74:69:2f:XX:XX:XX:XX:XX:XX:XX
>>
>> Is there a way to only send that?
>
>
> Without looking at it in wireshark, this would be the RDM and Replay
> Detection fields?
>
> It must be used, and the Replay Detection field must increase monotonically.
> To do otherwise is an RFC violaiton.
>
> Before I add this to dhcpcd, can you test it please?
> Edit src/auth.c, find the function get_next_rdm_monotonic and just return 0;
> at the top of it.

Yes, you're right. It doesn't make a difference.
Now, I can't see a reason why the server doesn't reply...
The three important options my ISP requires are precisely the same
between a request sent by the official modem and a request sent by
dhcpcd.
There are minor differences on other options, but I don't see what
would be the reason it fails.
What comes to mind...
- with dibbler, we need to set the "auth" option twice; otherwise it
doesn't work. Maybe the server doesn't like the options order in the
packet?
- the official modem and dibbler both requests the "auth" option in
the "option request" option, whereas dhcpcd don't. Maybe I need to
send that?
I'm a bit desperate on what's the problem of my ISP's crappy DHCP server...

Here is the dhcpcd.conf configuration:
ipv6only
duid
authprotocol token
authtoken 0 "" 0 fti/xxxxxxx
userclass FSVDSL_livebox.Internet.softathome.livebox3
vendclass 1038 sagem
persistent
option rapid_commit
noipv6rs
option interface_mtu
allowinterfaces vlan832
interface vlan832
        ia_pd 1 vlan832/0

Here are the Wireshark dumps of the three requests from dhcpcd, my
ISP's modem and dibbler:

dhcpcd - KO
DHCPv6
    Message type: Solicit (1)
    Transaction ID: 0x23df58
    Client Identifier
        Option: Client Identifier (1)
        Length: 14
        Value: 000100012256be0d000db9338e8d
        DUID: 000100012256be0d000db9338e8d
        DUID Type: link-layer address plus time (1)
        Hardware type: Ethernet (1)
        DUID Time: Apr  4, 2018 00:34:53.000000000 Paris, Madrid (heure d’été)
        Link-layer address: 00:0d:b9:33:8e:8d
    Elapsed time
        Option: Elapsed time (8)
        Length: 2
        Value: 006b
        Elapsed time: 1070ms
    User Class
        Option: User Class (15)
        Length: 45
        Value: 002b46535644534c5f6c697665626f782e496e7465726e65742e736f66746174686f6d652e6c697665626f7833
    Vendor Class
        Option: Vendor Class (16)
        Length: 11
        Value: 0000040e0005736167656d
        Enterprise ID: SAGEMCOM SAS  (1038)
        vendor-class-data: sagem
    Identity Association for Prefix Delegation
        Option: Identity Association for Prefix Delegation (25)
        Length: 12
        Value: 000000010000000000000000
        IAID: 00000001
        T1: 0
        T2: 0
    Option Request
        Option: Option Request (6)
        Length: 6
        Value: 005200530043
        Requested Option code: SOL_MAX_RT (82)
        Requested Option code: INF_MAX_RT (83)
        Requested Option code: Prefix Exclude (67)
    Authentication
        Option: Authentication (11)
        Length: 22
        Value: 00000000000000000000006674692fXXXXXXXXXXXXXX
        Protocol: 0
        Algorithm: 0
        RDM: 0
        Replay Detection: 0000000000000000
        Authentication Information: 6674692fXXXXXXXXXXXXXX

Livebox (official modem) - OK
DHCPv6
    Message type: Solicit (1)
    Transaction ID: 0xaae9a2
    Client Identifier
        Option: Client Identifier (1)
        Length: 10
        Value: 000300012c3996xxyyzz
        DUID: 000300012c3996xxyyzz
        DUID Type: link-layer address (3)
        Hardware type: Ethernet (1)
        Link-layer address: 2c:39:96:xx:yy:zz
    Option Request
        Option: Option Request (6)
        Length: 4
        Value: 000b0017
        Requested Option code: Authentication (11)
        Requested Option code: DNS recursive name server (23)
    Elapsed time
        Option: Elapsed time (8)
        Length: 2
        Value: 04bb
        Elapsed time: 12110 ms
    Authentication
        Option: Authentication (11)
        Length: 22
        Value: 00000000000000000000006674692fXXXXXXXXXXXXXX
        Protocol: 0
        Algorithm: 0
        RDM: 0
        Replay Detection: 0000000000000000
        Authentication Information: 6674692fXXXXXXXXXXXXXX
    User Class
        Option: User Class (15)
        Length: 45
        Value: 002b46535644534c5f6c697665626f782e496e7465726e65742e736f66746174686f6d652e6c697665626f7833
    Vendor Class
        Option: Vendor Class (16)
        Length: 11
        Value: 0000040e0005736167656d
        Enterprise ID: SAGEMCOM SAS  (1038)
        vendor-class-data: sagem
    Identity Association for Prefix Delegation
        Option: Identity Association for Prefix Delegation (25)
        Length: 12
        Value: 96395f2a00000e1000001518
        IAID: 96395f2a
        T1: 3600
        T2: 5400

dibbler - OK
DHCPv6
    Message type: Solicit (1)
    Transaction ID: 0x5f6584
    Client Identifier
        Option: Client Identifier (1)
        Length: 14
        Value: 0001000620f64d7a000db9338e8c
        DUID: 0001000620f64d7a000db9338e8c
        DUID Type: link-layer address plus time (1)
        Hardware type: IEEE 802 (6)
        DUID Time: Jul 10, 2017 16:36:42.000000000 Paris, Madrid (heure d’été)
        Link-layer address: 00:0d:b9:33:8e:8c
    Identity Association for Prefix Delegation
        Option: Identity Association for Prefix Delegation (25)
        Length: 12
        Value: 00000001ffffffffffffffff
        IAID: 00000001
        T1: infinity
        T2: infinity
    Elapsed time
        Option: Elapsed time (8)
        Length: 2
        Value: 0000
        Elapsed time: 0ms
    Vendor Class
        Option: Vendor Class (16)
        Length: 11
        Value: 0000040e0005736167656d
        Enterprise ID: SAGEMCOM SAS  (1038)
        vendor-class-data: sagem
    User Class
        Option: User Class (15)
        Length: 45
        Value: 002b46535644534c5f6c697665626f782e496e7465726e65742e736f66746174686f6d652e6c697665626f7833
    Authentication
        Option: Authentication (11)
        Length: 22
        Value: 00000000000000000000006674692fXXXXXXXXXXXXXX
        Protocol: 0
        Algorithm: 0
        RDM: 0
        Replay Detection: 0000000000000000
        Authentication Information: 6674692fXXXXXXXXXXXXXX
    Authentication
        Option: Authentication (11)
        Length: 22
        Value: 00000000000000000000006674692fXXXXXXXXXXXXXX
        Protocol: 0
        Algorithm: 0
        RDM: 0
        Replay Detection: 0000000000000000
        Authentication Information: 6674692fXXXXXXXXXXXXXX
    Option Request
        Option: Option Request (6)
        Length: 6
        Value: 0010000f000b
        Requested Option code: Vendor Class (16)
        Requested Option code: User Class (15)
        Requested Option code: Authentication (11)



-- 
Mattieu Baptiste
"/earth is 102% full ... please delete anyone you can."

Follow-Ups:
Re: DHCPv6 and OPTION_USER_CLASSRoy Marples
References:
DHCPv6 and OPTION_USER_CLASSMattieu Baptiste
Re: DHCPv6 and OPTION_USER_CLASSRoy Marples
Re: DHCPv6 and OPTION_USER_CLASSMattieu Baptiste
Re: DHCPv6 and OPTION_USER_CLASSRoy Marples
Re: DHCPv6 and OPTION_USER_CLASSMattieu Baptiste
Re: DHCPv6 and OPTION_USER_CLASSRoy Marples
Re: DHCPv6 and OPTION_USER_CLASSMattieu Baptiste
Re: DHCPv6 and OPTION_USER_CLASSRoy Marples
Archive administrator: postmaster@marples.name