NetworkConfiguration / dhcpcd

DHCP / IPv4LL / IPv6RA / DHCPv6 client.
https://roy.marples.name/projects/dhcpcd
BSD 2-Clause "Simplified" License
344 stars 111 forks source link

Can't access Vendor-specific information (opt 17 ipv6) in the hookup script. #53

Closed dburtnja closed 3 years ago

dburtnja commented 3 years ago

Hi,

DHCPv6 server in Advertise message sending the 17 option to dhcpcd client. It could be seen on the Wireshark screenshot: image

But when I'm printing all available options in hookup script. Only Enterprise ID (_new_dhcp6_vivso_enterprisenumber) is available. image

Do you know how can I get Vendor-specific option data?

B/R Denys

rsmarples commented 3 years ago

You need to add instructions to dhcpcd.conf on how to decode it - dhcpcd has no idea about per enterprise options. The dhcpcd.conf man page should have instructions for that.

dburtnja commented 3 years ago

Hi, thanks for the quick reply! As I learned from man dhcpcd.conf there is a possibility to request custom options, but I need to request existing one.

>dhcpcd -V
...
00017 vivso                                  embed
...

I've tried to overwrite the existing one (option 17) with command in dhcpcd.conf file

...
define6 17 encap vendor_encap
...

but it's not working. dhcpcd client doesn't request the 17 option from DHCP server. image It is requesting it when I add option vivso into config file and remove define6 17 encap vendor_encap, but only part of it available in the hookup script (enterprise id).

I'm using:

dhcpcd 6.11.5
Copyright (c) 2006-2016 Roy Marples
Compiled in features: INET IPv4LL INET6 DHCPv6 AUTH

Do you have time to help me to solve my problem?

B/R Denys

dburtnja commented 3 years ago

Oh, sorry, I've changed the instruction from define6 17 encap vendor_encap to define6 17 request encap vendor_encap and now it is requesting it. My mistake!

But it can't be parsed, I will try to use another type.

dburtnja commented 3 years ago

Hi, the solution define6 17 request binhex vendor_specific_info.

B/R Denys