Ahoy!

I am attempting to write a script up that will issue lots and lots of DHCP requests to test and see if the new DHCP server can handle the load, as well as prove once and for all that an 386 with a 10BaseT card should not be the primary DHCP server.
But I am running into snags left and right....
I managed to find Net::DHCPClient and it looks to be perfect for what I intend, but I am still having lots more difficulty than I feel that I should be...
My first attempt has been:

use strict; use Net::DHCPClient; my $mac_address = `ifconfig |grep HW |cut -d: -f2-7|cut -dr -f3 |cut - +d' ' -f2`; # get the MAC address my $dhcp = new Net::DHCPClient ( maccaddr => $mac_address, interface => 'eth0', ); $dhcp->discover(61 => $mac_address); $dhcp->request; $dhcp->release;
I have got Ethereal out there sniffing and when I run this nothing happens... Not even a complaint from perl telling me my syntax is totally wrong...

What have I done wrong?
Can anyone recomend a better way to initate this test?
My understanding of DHCP is limited, is this test even possible or does the link between MAC address and IP address cause a problem with requesting 20 addresses a second?


jcpunk
all code is tested, and doesn't work so there :p (varient on common PM sig for my own ammusment)

In reply to Load testing a DHCP server by jcpunk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.