Re: Using dhcpcd client to fetch vendor specific options
rajeev Gaur <[email protected]> Mon, 13 Mar 2023 18:53:56 +0530
| Newsgroups | gmane.network.dhcp.isc.dhcp-server |
|---|---|
| Message-ID | <CAKY0Ne8QEkV80gRvZQAWnH5WJMQmyPKMcabK=804S4PCH81hvg@mail.gmail.com> |
Hello Darren and all I searched on the web, I was not able to find any method for setting option 55 or for getting Option 43 items. I checked the github queries that community has posted but nothing for vendor options. I feel that dhcpcd support is comparatively lesser than dhclient. My problem is the project I am working on is using yocto build environment and yocto build environment supports dhcpcd client by default. For dhclient probably there will be requirement for cross-compiling the code and then generate binary for the hardware, still will it work or not. But I don't mind giving it a try. Any suggestions / hints are welcome. Thanks Rje On Sun, Mar 12, 2023 at 1:12 AM rajeev Gaur <[email protected]> wrote: > Hello Darren and All > > Thank you for the response. > Yes you are correct, I need to use dhcp client to fetch vendor options > (option 43) items from DHCP Server. > Ok let me check how can I set option 55 Parameter Request List. But I was > not able to find it in dhcpcd man pages. > Let me search further on net. > > Thanks > Rajeev > > On Sat, Mar 11, 2023 at 10:15 PM Darren Ankney <[email protected]> > wrote: > >> Rje, >> >> If I understand correctly, you are wanting your DHCP client to fetch >> option 43 content from the server. There should be a way, in dhcpcd, >> to modify option 55 (parameter request list) adding the vendor options >> (option 43) to the list of requested parameters. Then the server will >> return the option 43 content. >> >> On Sat, Mar 11, 2023 at 2:29 AM rajeev Gaur <[email protected]> >> wrote: >> > >> > Hello Sir >> > >> > I am working on a project for fetching various different categories of >> information from dhcp server. >> > DHCP Server: ISC DHCP Server 4.4.1 >> > Client: dhcpcd 9.4.0, Compiled in features: INET ARP ARPing IPv4LL >> INET6 DHCPv6 AUTH >> > Build environment: Yocto >> > >> > At this point when I am writing this mail, the basic working looks good. >> > >> > The DHCP server, starts stops restarts well. In logs I can see the >> DISCOVER / OFFER / REQUEST / ACK all working fine. Lease IP is properly >> provided to client. >> > >> > # >> > >> > # DHCP Server Configuration file. >> > >> > # see /usr/share/doc/dhcp*/dhcpd.conf.sample >> > >> > # >> > >> > >> > >> > authoritative; >> > >> > >> > >> > option space Vendor-ONAS-INFO code width 1 length width 1 hash size 5; >> > >> > option Vendor-ONAS-INFO.ipadd code 1 = ip-address; >> > >> > option Vendor-ONAS-INFO.port code 9 = unsigned integer 16; >> > >> > >> > >> > subnet 192.168.2.0 netmask 255.255.255.0 { >> > >> > range 192.168.2.35 192.168.2.52; >> > >> > option routers 192.168.2.56; >> > >> > option subnet-mask 255.255.255.0; >> > >> > option domain-name-servers 8.8.8.8; >> > >> > default-lease-time 100; >> > >> > max-lease-time 100; >> > >> > option host-name "OR-SERVER"; >> > >> > option ntp-servers 138.12.56.111; >> > >> > option vendor-class-identifier "Vendor-ONAS"; >> > >> > vendor-option-space Vendor-ONAS-INFO; >> > >> > option Vendor-ONAS-INFO.ipadd 192.168.71.50; >> > >> > option Vendor-ONAS-INFO.port 11372; >> > >> > } >> > >> > >> > On the client side, dhcpcd, I have kept information to allow and deny >> interfaces, enabled the standard DHCP options for which I am getting values >> ( except for dhcp_client_identifier). >> > When I am performing ifdown and ifup for eth0 I am getting one leased >> IP from the dhcp server. >> > >> > #Use the hardware address of the interface for the Client ID >> > clientid >> > allowinterfaces eth0 >> > denyinterfaces eth1 >> > >> > option ntp_servers >> > option dhcp_server_identifier >> > option dhcp_client_identifier (**Not getting this output) >> > >> > My problem / Query: >> > 1) What option to give in dhcpcd.conf to fetch the vendor options that >> i have declared in dhcpd.conf at the server side. >> > 2) Do I need to enable any thing on any side (client or server). >> > >> > I did not see much documentation for dhcpcd client for vendor options. >> > I did saw the dhcpcd.conf man page for vendor information but it shows: >> > vendor code ,valueAdd an encapsulated vendor option. code should be >> between 1 and 254 inclusive. To add a raw vendor string, omit code but keep >> the comma. Examples. Set the vendor option 01 with an IP address.vendor >> 01,192.168.0.2Set the vendor option 02 with a hex code.vendor >> 02,01:02:03:04:05Set the vendor option 03 with an IP address as a >> string.vendor 03,\"192.168.0.2\"Set un-encapsulated vendor option to hello >> world.vendor ,"hello world" >> > >> > But I don't need to add any vendor option I have to fetch it from the >> server. >> > >> > I also tried giving vendorclassid so that it can fetch the details >> provided for the vendor class identifier in the server, but i don't see any >> output. >> > >> > I have previously worked with dhclient and i was able to fetch >> information using that and I also see it has much more documentation >> online. But i see less documentation for dhcpcd. But this is the only >> recommended client for Yocto build environment. >> > >> > Please suggest how can I fetch the vendor options using dhcpcd client. >> > >> > Thanks >> > Rje >> > -- >> > ISC funds the development of this software with paid support >> subscriptions. Contact us at https://www.isc.org/contact/ for more >> information. >> > >> > dhcp-users mailing list >> > [email protected] >> > https://lists.isc.org/mailman/listinfo/dhcp-users >> -- >> ISC funds the development of this software with paid support >> subscriptions. Contact us at https://www.isc.org/contact/ for more >> information. >> >> dhcp-users mailing list >> [email protected] >> https://lists.isc.org/mailman/listinfo/dhcp-users >> > -- ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information. dhcp-users mailing list [email protected] https://lists.isc.org/mailman/listinfo/dhcp-users