<div dir="ltr">Hello Sir<div><br></div><div>I am working on a project for fetching various different categories of information from dhcp server.</div><div>DHCP Server: ISC DHCP Server 4.4.1</div><div>Client: dhcpcd 9.4.0, Compiled in features: INET ARP ARPing IPv4LL INET6 DHCPv6 AUTH</div><div>Build environment: Yocto</div><div><br></div><div>At this point when I am writing this mail, the basic working looks good.</div><div><br></div><div>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.</div><div><br></div><div><p class="MsoNormal">#<u></u><u></u></p><p class="MsoNormal"># DHCP Server Configuration file.<u></u><u></u></p><p class="MsoNormal"># see /usr/share/doc/dhcp*/dhcpd.conf.sample<u></u><u></u></p><p class="MsoNormal">#<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">authoritative;<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">option space
Vendor-ONAS-INFO code width 1 length width 1 hash size 5;<u></u><u></u></p><p class="MsoNormal">option
Vendor-ONAS-INFO.ipadd code 1 = ip-address;<u></u><u></u></p><p class="MsoNormal">option Vendor-ONAS-INFO.port code 9 = unsigned integer 16;<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">subnet 192.168.2.0 netmask 255.255.255.0 {<u></u><u></u></p><p class="MsoNormal"> range 192.168.2.35 192.168.2.52;<u></u><u></u></p><p class="MsoNormal"> option routers 192.168.2.56;<u></u><u></u></p><p class="MsoNormal"> option subnet-mask 255.255.255.0;<u></u><u></u></p><p class="MsoNormal"> option domain-name-servers 8.8.8.8;<u></u><u></u></p><p class="MsoNormal"> default-lease-time 100;<u></u><u></u></p><p class="MsoNormal"> max-lease-time 100;<u></u><u></u></p><p class="MsoNormal"> option host-name "OR-SERVER";<u></u><u></u></p><p class="MsoNormal"> option ntp-servers 138.12.56.111;<u></u><u></u></p><p class="MsoNormal"> option vendor-class-identifier "Vendor-ONAS";<u></u><u></u></p><p class="MsoNormal"> vendor-option-space Vendor-ONAS-INFO;</p><p class="MsoNormal"><u></u></p><p class="MsoNormal"> option Vendor-ONAS-INFO.ipadd 192.168.71.50;</p><p class="MsoNormal"><u></u></p><p class="MsoNormal"> option Vendor-ONAS-INFO.port 11372;<u></u><u></u></p><p class="MsoNormal">}</p></div><div><br></div><div>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).</div><div>When I am performing ifdown and ifup for eth0 I am getting one leased IP from the dhcp server.</div><div><br></div><div>#Use the hardware address of the interface for the Client ID</div><div>clientid</div><div>allowinterfaces eth0</div><div>denyinterfaces eth1</div><div><br></div><div>option ntp_servers</div><div>option dhcp_server_identifier</div><div>option dhcp_client_identifier (**Not getting this output)</div><div><br></div><div>My problem / Query:</div><div>1) What option to give in dhcpcd.conf to fetch the vendor options that i have declared in dhcpd.conf at the server side. </div><div>2) Do I need to enable any thing on any side (client or server).</div><div><br></div><div>I did not see much documentation for dhcpcd client for vendor options.</div><div>I did saw the dhcpcd.conf man page for vendor information but it shows:</div><div><dt style="color:rgb(0,0,0);font-family:sans-serif;font-size:medium"><span class="gmail-command" style="font-weight:bold">vendor</span> <span class="gmail-option-args" style="font-style:italic;text-decoration-line:underline">code</span> ,<span class="gmail-option-args" style="font-style:italic;text-decoration-line:underline">value</span></dt><dd style="color:rgb(0,0,0);font-family:sans-serif;font-size:medium">Add an encapsulated vendor option. <span class="gmail-option" style="font-weight:bold;text-decoration-line:underline">code</span> should be between 1 and 254 inclusive. To add a raw vendor string, omit <span class="gmail-option" style="font-weight:bold;text-decoration-line:underline">code</span> but keep the comma. Examples.<span class="gmail-display-literal" style="font-family:monospace;white-space:pre;display:block"> </span>Set the vendor option 01 with an IP address.<span class="gmail-display-literal-indent" style="font-family:monospace;padding-left:4em;white-space:pre;display:block">vendor 01,192.168.0.2</span>Set the vendor option 02 with a hex code.<span class="gmail-display-literal-indent" style="font-family:monospace;padding-left:4em;white-space:pre;display:block">vendor 02,01:02:03:04:05</span>Set the vendor option 03 with an IP address as a string.<span class="gmail-display-literal-indent" style="font-family:monospace;padding-left:4em;white-space:pre;display:block">vendor 03,\"192.168.0.2\"</span>Set un-encapsulated vendor option to hello world.<span class="gmail-display-literal-indent" style="font-family:monospace;padding-left:4em;white-space:pre;display:block">vendor ,"hello world"</span></dd></div><div><br></div><div>But I don't need to add any vendor option I have to fetch it from the server.</div><div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>Please suggest how can I fetch the vendor options using dhcpcd client.</div><div><br></div><div>Thanks</div><div>Rje</div></div>