Giter Site home page Giter Site logo

xmulxs / dhtest Goto Github PK

View Code? Open in Web Editor NEW

This project forked from saravana815/dhtest

0.0 1.0 0.0 92 KB

A DHCP client simulation on linux. It can simulates multiple DHCP clients behind a network device. It can help in testing the DHCP servers or in testing switch/router by loading the device with multiple DHCP clients.

License: GNU General Public License v2.0

Makefile 0.15% Python 3.85% C 96.00%

dhtest's Introduction

  dhtest readme
  *************
 
  About the tool
  --------------
  dhtest - linux dhcp client simulation tool. It can simulate hundreds of dhcp
  client from a linux machine. Linux root login is needed because the tool requires 
  layer2 raw socket for sending and receiving dhcp packets.
  
  Installation
  ------------

    * Download the latest source from github as zip. 
      Download link - https://github.com/saravana815/dhtest/archive/master.zip

        [sargandh@CentOS Desktop]$ unzip dhtest-master.zip 
        [sargandh@CentOS Desktop]$ cd dhtest-master
        [sargandh@CentOS dhtest-master]$ make
        gcc    -c -o dhtest.o dhtest.c
        gcc    -c -o functions.o functions.c
        gcc dhtest.o functions.o -o dhtest
        [sargandh@CentOS dhtest-master]$ ls -lh dhtest
        -rwxrwxr-x 1 sargandh sargandh 38K Mar 13 10:47 dhtest

  dhtest 1.5 - new 1.5 features supported
  -----------------------------------------
  
    * Add option to send DHCP DECLINE packets ('-D' flag)
    * Fix potential Segmentation Fault in get_dhinfo() function


  dhtest 1.4 - till 1.4 features supported
  -----------------------------------------
  
    * IP obtaining through DHCP
    * Release obtained IP with -r flag
    * VLAN
    * Broadcast flag support
    * DHCP option 50 - Requested IP
    * DHCP option 60 - Vendor Class Identifier
    * Binding obtained IP for a default timeout of 3600 seconds
    * Support of bind timeout with -k flag on command line
    * Added DHCP option 51 - Requested lease time from server
    * Added DHCP option 12 - Hostname
    * Added DHCP option 81 - Fqdn
    * Option to send in unicast mode.
    * Option to output for nagios.
    * Option to change port, patch by Alan Dekok.
    * Custom option support - Allows packing of any dhcp option in number/string/hex format

  License
  ---------
  Please see the LICENSE file.

  Tool usage examples
  -------------------
    * https://sargandh.wordpress.com/2012/02/23/linux-dhcp-client-simulation-tool/

    * custom option examples
        dhcp option 82 
        --------------
          [root@CentOS dhtest-1.1]# ./dhtest -m 00:00:00:11:11:11 
          -c 82,hex,0108476967302f312f30021130303a30303a30303a31313a31313a3131
                     | ||              |
                     | ||              |Subopt value - 'Gig0/1/0' 
                     | | **************        
                     | Subopt len 8
                   Opt82 subopt 1
                   Circuit id 

          [root@CentOS dhtest-1.1]# ./dhtest -m 00:00:00:11:11:11 
          -c 82,hex,0108476967302f312f30021130303a30303a30303a31313a31313a3131
                                         | ||              |
                                         | ||              |Subopt value - '00:00:00:11:11:11' 
                                         | | **************        
                                         | Subopt len 17
                                       Opt82 subopt 2
                                       Remote id 

        dhcp option 60 and 82 (multiple custom options) 
        -----------------------------------------------
          [root@CentOS dhtest-1.1]# ./dhtest -m 00:00:00:11:11:11 -c 60,str,"MSFT 5.0" 
          -c 82,hex,0108476967302f312f30021130303a30303a30303a31313a31313a3131 

  Contacts
  -------- 
  Authour: Saravanakumar.G
  Send your comments, enhancements and bugs to [email protected]

dhtest's People

Contributors

rubydhash avatar saravana815 avatar donothingloop avatar alandekok avatar inov8shn avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.