<div dir="ltr">this page really helped to answer dhcp header questions:  <a href="https://www.iana.org/assignments/bootp-dhcp-parameters/bootp-dhcp-parameters.xhtml">https://www.iana.org/assignments/bootp-dhcp-parameters/bootp-dhcp-parameters.xhtml</a><div><br></div><div>beware of when you are using hex vs decimal...</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Oct 22, 2020 at 12:31 PM Jason Brooks <<a href="mailto:jasonbbrooks@gmail.com">jasonbbrooks@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Oh I forgot to add why having a correct commandline was important: it makes a difference to the dhcp server: the -f option made it work for me.  <div><br></div><div>I had to use dhtest to generate test packets, capture them, then compare them to actual packets arriving on the present dhcp servers.  the -f option eluded me for quite a while.</div><div><br></div><div>--jason</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Oct 22, 2020 at 12:28 PM Jason Brooks <<a href="mailto:jasonbbrooks@gmail.com" target="_blank">jasonbbrooks@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello,<div><br></div><div>you are very welcome!</div><div><br></div><div>As to the dhtest script: I recommend capturing a session with tcpdump and decoding with wireshark and playing with it back-and-forth until you get the headers to match.</div><div><br></div><div>here's a sample commandline I used that succeeded:</div><div><br></div><div>dhtest -f -m 00:50:56:b2:2f:cc -i ens160 -V -c 82,hex,010430313331020B50484E58415A2D41493035 -o "iMG624A" -l 011c030f06</div><div><br></div><div>-f sets bcast flag on the actual dhcp packet </div><div>-m mac address of the pseudo endpoint originally asking for an ip address</div><div>-i is the ethernet port on the linux host to send the packet from</div><div>-V  == verbose</div><div>-c is the encoded option 82 "010430313331020B50484E58415A2D41493035"</div><div>    

01 suboption 1: circuit id</div><div>       04 number of bytes/octets</div><div>          30313331  --> ascii chars: "0131" </div><div>     02 suboption 2:remoteid</div><div>       0B number of bytes/octets (decimal 13)</div><div>           50484E58415A2D41493035   -> ascii chars: "PHNXAZ-AI05"<br></div><div><br></div><div>-o "iMG624A" vendor class identifier string (dhcp option 60)<br></div><div><br></div><div>-l 011c030f06  requested parm list (dhcp option 55 in hex)<br></div><div>  01 subnetmask<br></div><div>  1c broadcast address</div><div>  03 router ip</div><div>  0f  domain name</div><div>  06 dns server<br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Oct 22, 2020 at 10:40 AM Ahiya Zadok <<a href="mailto:ahiya@younity.io" target="_blank">ahiya@younity.io</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div lang="EN-US"><div><p class="MsoNormal">Thank Jason, For this detailed answer!!!</p><p class="MsoNormal">I will try your script.</p><p class="MsoNormal"> </p><p class="MsoNormal">By the way, I did try the dhtest tool as well and even from a single VLAN.</p><p class="MsoNormal">But I always get only "DHCP4_LEASE_ADVERT" messages in the kea log and no IP allocation accrues.</p><p class="MsoNormal">I've started earlier today a thread regarding this issue (subject: address not being allocated).</p><p class="MsoNormal"> </p><p class="MsoNormal">If you have any idea ill be happy to learn.</p><p class="MsoNormal"> </p><p class="MsoNormal">thanks</p><p class="MsoNormal"> </p><div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(225,225,225);padding:3pt 0in 0in"><p class="MsoNormal"><b>From:</b> dhcp-users <<a href="mailto:dhcp-users-bounces@lists.isc.org" target="_blank">dhcp-users-bounces@lists.isc.org</a>> <b>On Behalf Of </b>Jason Brooks<br><b>Sent:</b> Thursday, October 22, 2020 8:24 PM<br><b>To:</b> Users of ISC DHCP <<a href="mailto:dhcp-users@lists.isc.org" target="_blank">dhcp-users@lists.isc.org</a>><br><b>Subject:</b> Re: traffic generator -recommendations</p></div><p class="MsoNormal"> </p><div><p class="MsoNormal">Hello Ahiya,</p><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal">I apologize for the delay in answering you.  The answer is a qualified yes.  </p></div><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal">I am replacing a number of remote dhcp servers with isc's dhcpd configured as an HA pair in local datacenters. But before I alter 100+ shelf managers' relay agent information, I needed to simulate a large number of  dhcp requests, both load-wise, and to see if the dhcp servers handed out the correct ip address ranges based on the criteria.</p></div><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal">I have a number of remote dhcp servers handling a large amount of remote dsl equipment.  Each remote group of dsl equipment  has a set of shelf managers.  the shelf managers forward relay the dhcp requests to their respective dhcp servers.  The relevent dhcp values sent to the dhcp servers are:</p></div><div><p class="MsoNormal">     vendor class identifier (option 60)</p></div><div><p class="MsoNormal">     request parameter list (option 55)</p></div><div><p class="MsoNormal">     Dhcp relay agent info (option 82)</p></div><div><p class="MsoNormal">          circuit id (82, suboption 1)</p></div><div><p class="MsoNormal">          remote id (82, suboption 2)</p></div><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal">I learned this information using tcpdump and wireshark to decode actual packets.  As it happens, the circuit id corresponded to the vlan each dsl device was connected to.</p></div><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal">In order to test, I had a router that would forward requests to both of my dhcp servers, so all my test host needed to do was send dhcp requests via broadcast.</p></div><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal">The dhtest program I referred to earlier is used to construct raw dhcp packets and send them, thus there is no need to build additional interfaces to bind to.</p></div><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal">My test script, <a href="http://rundhctest.pl" target="_blank">rundhctest.pl</a> read in a pre-built CSV file with all of the possible parameters my dhcp servers were to support.  It also read in a list of 100,000 randomly generated mac addresses.  The <a href="http://rundhtest.pl" target="_blank">rundhtest.pl</a> script used perl's Parallel::Forkmanager module to choose the number of children to fork, and the max number of requests to send from each child.</p></div><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal">The CSV file has the following format, and the following headers are important:</p></div><div><p class="MsoNormal">Class;Rid;Cid;Opt82;VCI;Opt55</p></div><div><p class="MsoNormal">     classname as found in the dhcp config files, remoteid, circuit id, encoded optoni82, vendor class identifier, and option 55 requested parms.</p></div><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal">The mac address file is just a list of mac addresses: one per line.</p></div><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal">I will include the <a href="http://dhtest.pl" target="_blank">dhtest.pl</a> script here.</p></div><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal">I hope it helps.</p></div><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal">--jason</p></div><div><p class="MsoNormal"> </p></div></div><p class="MsoNormal"> </p><div><div><p class="MsoNormal">On Tue, Oct 13, 2020 at 10:41 PM Ahiya Zadok <<a href="mailto:ahiya@younity.io" target="_blank">ahiya@younity.io</a>> wrote:</p></div><blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in"><div><div><p class="MsoNormal">Hi Jason</p><p class="MsoNormal"> </p><p class="MsoNormal">Thank you for responding.</p><p class="MsoNormal">So you mean that with parallel processes I could generate requests from several VLANs simultaneously?</p><p class="MsoNormal"> </p><div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(225,225,225);padding:3pt 0in 0in"><p class="MsoNormal"><b>From:</b> dhcp-users <<a href="mailto:dhcp-users-bounces@lists.isc.org" target="_blank">dhcp-users-bounces@lists.isc.org</a>> <b>On Behalf Of </b>Jason Brooks<br><b>Sent:</b> Wednesday, October 14, 2020 3:17 AM<br><b>To:</b> Users of ISC DHCP <<a href="mailto:dhcp-users@lists.isc.org" target="_blank">dhcp-users@lists.isc.org</a>><br><b>Subject:</b> Re: traffic generator -recommendations</p></div><p class="MsoNormal"> </p><div><p class="MsoNormal">Hello,</p><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal">I have used a tool called dhtest, I even pushed a change to their github site.  <a href="https://github.com/saravana815/dhtest" target="_blank">https://github.com/saravana815/dhtest</a></p></div><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal">I generated about 100,000 mac addresses and built a perl script to call an arbitrary number of parallel processes.</p></div><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal">it worked well.</p></div><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal">--jason</p></div></div><p class="MsoNormal"> </p><div><div><p class="MsoNormal">On Tue, Oct 13, 2020 at 4:23 AM ahiya <<a href="mailto:ahiya@younity.io" target="_blank">ahiya@younity.io</a>> wrote:</p></div><blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0in 0in 0in 6pt;margin:5pt 0in 5pt 4.8pt"><p class="MsoNormal">hi AllI'm planning to implement Kea-dhcp4 to serve around 500 subnets with<br>5000 devices, I don't think the requests per sec rate will be high, it<br>MDUs.I'm using FG as a DHCP relay.I’ve performed some functionality tests<br>and it seems to work fine.I wanted to perform some load tests.I've to<br>install Kea-admin on ubuntu 18.04 VM and use the perfdhcp app.but I can't<br>make it quite work. all I see in my DHCP log are "DHCP4_LEASE_ADVERT"<br>messages and no  "DHCP4_LEASE_ALLOC".and all sent packets are dropped<br>according to perfdhcp report.I've tried various clients numbers the lower<br>number of requests and low the rate but it didn't work.any ideas?and dose<br>any one know if perfdhcp support sending from multiple interfaces?thanks in<br>advanceRunning: perfdhcp -l vlan550 -n 20 -p 1 -r 100 -R 30Scenario:<br>basic.***Rate statistics***Rate: 0 4-way exchanges/second, expected rate:<br>100***Statistics for: DISCOVER-OFFER***sent packets: 20received packets:<br>0drops: 20drops ratio: 100 %orphans: 0min delay: inf msavg delay: min delay:<br>n/aavg delay: n/amax delay: n/astd deviation: n/acollected packets:<br>0***Statistics for: REQUEST-ACK***sent packets: 0received packets: 0drops:<br>0drops ratio: -nan %orphans: 0min delay: inf msavg delay: min delay: n/aavg<br>delay: n/amax delay: n/astd deviation: n/acollected packets: 0<br><br><br><br>--<br>Sent from: <a href="http://isc-dhcp-users.2343191.n4.nabble.com/" target="_blank">http://isc-dhcp-users.2343191.n4.nabble.com/</a><br>_______________________________________________<br>ISC funds the development of this software with paid support subscriptions. Contact us at <a href="https://www.isc.org/contact/" target="_blank">https://www.isc.org/contact/</a> for more information.<br><br>dhcp-users mailing list<br><a href="mailto:dhcp-users@lists.isc.org" target="_blank">dhcp-users@lists.isc.org</a><br><a href="https://lists.isc.org/mailman/listinfo/dhcp-users" target="_blank">https://lists.isc.org/mailman/listinfo/dhcp-users</a></p></blockquote></div></div></div><p class="MsoNormal">_______________________________________________<br>ISC funds the development of this software with paid support subscriptions. Contact us at <a href="https://www.isc.org/contact/" target="_blank">https://www.isc.org/contact/</a> for more information.<br><br>dhcp-users mailing list<br><a href="mailto:dhcp-users@lists.isc.org" target="_blank">dhcp-users@lists.isc.org</a><br><a href="https://lists.isc.org/mailman/listinfo/dhcp-users" target="_blank">https://lists.isc.org/mailman/listinfo/dhcp-users</a></p></blockquote></div></div></div>
_______________________________________________<br>
ISC funds the development of this software with paid support subscriptions. Contact us at <a href="https://www.isc.org/contact/" rel="noreferrer" target="_blank">https://www.isc.org/contact/</a> for more information.<br>
<br>
dhcp-users mailing list<br>
<a href="mailto:dhcp-users@lists.isc.org" target="_blank">dhcp-users@lists.isc.org</a><br>
<a href="https://lists.isc.org/mailman/listinfo/dhcp-users" rel="noreferrer" target="_blank">https://lists.isc.org/mailman/listinfo/dhcp-users</a><br>
</blockquote></div>
</blockquote></div>
</blockquote></div>