JDHCPSim

Ragnar Lonn ragnar at ghn.se
Tue Jan 9 14:14:08 UTC 2007


Gene Rackow skrev:
> Before attempting to use this to create such a tool, does anyone
> already have something liek a nagios or bigbrother module that could be used?
> I think it would be pretty easy to do with this.  Just wondering if it's already been done.
>
> Or possibly a tool that
>   sends a dhcp request
>   if no-response or bad-response, send mail to sysadmin
>   

You could do a simple shellscript, something like:

#!/bin/sh

sendalert() {
  ( echo "From: dhcptool" ; \
    echo "To: sysadmin" ; \
    echo "Subject: Invalid or no DHCP response" ; \
    echo "" ; \
    echo "dhcptool received this:" ; \
    cat /tmp/dhcptool.out ) | \
  /path/to/sendmail sysadmin at somewhere
}

/path/to/dhcptool -i interface -o discover -O 55=1:3:6 >/tmp/dhcptool.out
grep "Option 054" /tmp/dhcptool.out || sendalert


...and execute the script via cron regularly.

Regards,

  /Ragnar

> --Gene
>   
> Ragnar Lonn made the following keystrokes:
>  >For outgoing packets, you cannot currently specify source- or destination
>  >port. It sends from port 68 to port 67, like most clients will do. But being
>  >able to change source- and destination UDP ports is a useful feature and
>  >something we will probably add for the next version.
>  >
>  >For incoming packets it reads raw ethernet frames from the interface
>  >specified, and will report any packets it sees that contains the DHCP
>  >magic cookie. So the packets don't have to arrive on or from any
>  >particular UDP port.
>  >
>  >Regards,
>  >
>  >  /Ragnar
>  >
>  >
>  >Frank Bulk skrev:
>  >> Neat....does that tool allow one to simulate a relay agent?
>  >>
>  >> Can one specify ports, too?  We had an issue with a DHCP appliance that
>  >> would not respond correctly to relayed src 67/dst 67 packets, but it would
>  >> on 68/68 packets.
>  >>
>  >> Regards,
>  >>
>  >> Frank
>  >>
>  >> -----Original Message-----
>  >> From: dhcp-users-bounce at isc.org [mailto:dhcp-users-bounce at isc.org] On Behalf
>  >> Of Ragnar Lonn
>  >> Sent: Monday, January 08, 2007 4:30 AM
>  >> To: dhcp-users at isc.org
>  >> Subject: Re: JDHCPSim
>  >>
>  >> If you need something that can emulate different types of DHCP client
>  >> behaviour, we have a tool called DHCPTool that is free to download here:
>  >>
>  >> http://gatorhole.com/index.php?product=dhcp&lang=gb
>  >>
>  >> Regards,
>  >>
>  >>   /Ragnar
>  >>
>  >>
>  >> Heiko Großstück skrev:
>  >>   
>  >>> Does anyone have the tool JDHCPSim (in version 1.1)?
>  >>> I need this to test a DHCP server, but the site of the developer is down:
>  >>> www.descension.org/~boggan/JDHCPSim.html
>  >>> (internet archive doesn't have the *.gz)
>  >>>
>  >>> thanks
>  >>> Heiko
>  >>>   
>  >>>     
>  >>
>  >>
>  >>
>  >>   
>  >
>  >
>
>   



More information about the dhcp-users mailing list