"Fossies" - the Fresh Open Source Software Archive

Member "opendhcp/README" (21 Sep 2021, 8146 Bytes) of package /linux/misc/opendhcpV1.80.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "README": V1.75_vs_V1.80.

    1 This release 1.80 is a Stable Release
    2 
    3 ENHANCEMENTS in 1.80
    4 
    5 1) Y2038 issue fixed, althugh it will not matter till year 2038.
    6 
    7 ENHANCEMENTS in 1.58/1.59
    8 
    9 1) Subnet Selection can now be manually configured.
   10 2) Target Relay Agent can be overridden.
   11 3) HTTP Interface can be restricted.
   12 4) HTTP Interface blocking fixed
   13 
   14 DOWNLOAD
   15 
   16 The latest version can be downloaded from http://dhcpserver.sourceforge.net/
   17 
   18 DOCUMENTATION
   19 
   20 OpenDHCPServerManual.pdf is included in the distro
   21 
   22 INSTALLATION
   23 
   24 This program if installed on a machine, which is static configured for IP Address,
   25 DNS & router, it detects these settings from server machine (If you want diffrent
   26 setting for clients, edit ini file) and uses them for configuring other machines
   27 on local network.
   28 
   29 Expand the gz archive to any directory (say <installDir>)
   30 Change the permissions of file opendhcpd with chmod 711 opendhcpd
   31 For daemonizing, look at section DAEMONIZING below.
   32 
   33 test run as root:-
   34 #<installDir>/opendhcpd -v
   35 You should see something similar to:-
   36 
   37 Starting DHCP...
   38 Server Name: LinuxServer
   39 Detecting Static Interfaces..
   40 Lease Status URL: http://192.168.33.2
   41 Listening On: 192.168.33.2
   42 Listening On: 192.168.55.2
   43 
   44 Now try getting IP Address for another machine, it should work.
   45 
   46 RUNNING
   47 
   48 This program runs in two modes:-
   49 a) Verbatim Mode (using -v argument)
   50 b) Daemon (not using -v argument)
   51 
   52 This program uses 2 or 3 helper files:-
   53 i)   -i[inifile], where configuration settings can be specified,
   54      default is ./etc/opendhcpd.ini
   55 ii)  -s[statefile] saves current leases, default is /etc/opendhcpd.state 
   56 iii) -l[logfile] dumps log to this file in daemon mode, default is syslog
   57 
   58 You can start/run as:-
   59 
   60 <installDir>/opendhcpd (daemon with default files)
   61 <installDir>/opendhcpd -v (verbatim with default files)
   62 <installDir>/opendhcpd -i inifile -s statefile -l logfile (as daemon)
   63 <installDir>/opendhcpd -i inifile -s statefile (as daemon)
   64 <installDir>/opendhcpd  -v -i inifile -s statefile as verbatim
   65 
   66 Please include %Y for full year or %y for 2 digit year, %m for month, %d for day
   67 of month like:-
   68 
   69 <installDir>d/opendhcpd -l <installDir>d/log/opendhcpd%Y%m%d.log -i<installDir>d/opendhcpd.ini
   70 
   71 Order of %Y %m %d is not important. You can also include just %m and %Y if you want monthly log file like:-
   72 
   73 <installDirecory>/opendhcpd -l <logDirecory>/opendhcpd%Y%m.log -i<someDirecory>/opendhcpd.ini
   74 
   75 As shown above if you use separate directory for log file, you should manually create this directory
   76 
   77 DAEMONIZING
   78 
   79 If your system supports chkconfig command, you can use the enclosed
   80 rc.opendhcp file to add the service. Simply copy rc.opendhcp as
   81 /etc/init.d/opendhcp (or just create a link to it as opendhcpserver in init.d)
   82 and make it executable. Also change the file paths (depending on where you
   83 have installed the executive and log file directory) in this file.
   84 Then you can use chkconfig command to add the daemon.
   85 
   86 #ln -s <installDir>/rc.opendhcp /etc/init.d/opendhcp
   87 #chmod 755 /etc/init.d/opendhcp
   88 #chkconfig --add opendhcp
   89 #chkconfig opendhcp on
   90 Thats all you may need.
   91 
   92 If you dont have chkconfig command, you can manually modify boot scripts
   93 in /etc/rc.d/rc.local file or /etc/inittab file or /etc/rc.d/rc.inet2
   94 file. Also you need to do following changes:-
   95 
   96 Add the enclosed rc.opendhcp script in /etc/rc.d and make it executable (755).
   97 Also change the file paths (depending on where you have installed the executive
   98 and log file directory) in this file. Finally you need to add the lines:-
   99 
  100 # Start the Dual DHCP DNS Server daemon:
  101 if [ -x /etc/rc.d/rc.opendhcp ]; then
  102 /etc/rc.d/rc.opendhcp start
  103 fi
  104 
  105 to any of above scripts (preferably to /etc/rc.d/rc.inet2)
  106 
  107 COMPILING
  108 
  109 Recompiling is not generally needed on 32 bit Intel/Linux systems.
  110 For other system, you should. Try:-
  111 
  112 #g++ opendhcpd.cpp -oopendhcpd -lpthread
  113 #g++ opendhcpd.cpp -oopendhcpd -lpthread -lgcc_s
  114 #cc opendhcpd.cpp -oopendhcpd -lsocket -lnsl -lpthread
  115 
  116 You need C++ compiler for Versions 3 onwards, as these versions use STL
  117 If you have only C Compiler, you need to download and use Version 2.1 only.
  118 
  119 CONFIGURATION
  120 
  121 1) Configuration of Server
  122 
  123    Server configuration is stored in enclosed opendhcp.ini file, which is self 
  124    explainatory. At the minimum the Server needs to be specified DHCP Range or Static Clients.
  125    In the packaged opendhcp.ini file, DHCP Range 192.168.0.1-DHCP Range 192.168.0.254 is 
  126    specified, for testing, which can be changed.
  127    
  128 2) Configuration of Clients
  129 
  130    a. You can use windows/linux/unix mix of clients.
  131    b. The clients should be set to get IP Address automatically.
  132 
  133 REPLICATED OPERATION
  134 
  135 This is the unique feature of Open DHCP Server that two instances can be simultaneously used. The
  136 database of both servers remains in synch as special DHCP INFORM messages flow between the servers
  137 in unicast mode. When one server renew or allott the lease, other server gets this info and adds the
  138 info in its database. These two servers run on load sharing basis. Now if one server goes down, other
  139 can renew the lease when DHCP REQUEST goes in broadcast mode, without interuption in server.
  140 
  141 GENERAL
  142    
  143 1) This document is for guidance and is covered under GNU public license.
  144 
  145 DEBUG
  146 
  147 If program is not assigning addresses or resolve them check:-
  148 
  149 1) Ensure that you run this program as root only.
  150 2) Check network hardware and ensure that client machines has different host names from server and
  151    each other.
  152 3) No other service should be running on Server on ports 67.
  153 4) If you get error like port 67 already in use means some other DHCP program or proxy server with DHCP 
  154    service is running. Use netstat command to detect which program is listening on these ports.
  155    It is also possible that another copy of opendhcpd itself is running.
  156 5) If you get error Static Interfaces/Listening Ports not available, it may be because of 1) Another
  157    dhcp Server is running or Interfaces specified on [LISTEN_ON] section are not available.
  158    or you have just restated the server and TCP port is not yet closed, then wait for some time.
  159 6) Look at log file (if running as service) or Run in standalone mode, it will provide all debug
  160    information as it verbatim the activities.
  161 7) If you use Braodband router, which also has DHCP Server, this program may still run, but some hosts
  162    configured by other DHCP Server may not use this DNS Service. Please disable the DHCP Service on
  163    Broadband router.
  164 8) opendhcpd.state file backs up current leases and is read back when server restarts. If you want to 
  165    clean previous leases, you may delete this file and restart the server.
  166 9) Errors like "libstdc++.so.?: cannot open shared object file: No such file or directory" 
  167    are possible in some Linux flavours. Please recompile the program or create symbolic links:-
  168 	ln -s /usr/local/lib/libstdc++.so.? /usr/lib/libstdc++.so.? 
  169 	ln -s /usr/local/lib/libgcc_s.so.? /usr/lib/libgcc_s.so.?
  170    (? is library version as reported in error)
  171    or add the library path (directory where above file is) to env variable LD_LIBRARY_PATH.
  172 10)If you are not able to receive DHCP Discover messages from clients, make sure that Dual DHCP DNS Server
  173    and client are on same physical network (not separated by routers). If it is separated by routers and it
  174    is same subnet, please allow routers to pass broadcast messages to Server on Port 67. If these are 
  175    different subnets, use the BOOTP relay agents.
  176 11) Make sure that firewall is allowing packets on ports 53 and 67.
  177 12) If you have just upgraded from previous version and program just dies or fails to start, please
  178     delete /tmp/dualserver.state file and retry.
  179 
  180 UNINSTALLATION
  181 
  182 	Just remove the program directory. You should also remove entries from initialize scripts of 
  183 	your machine.
  184 
  185 BUGS
  186 	If you find any problem with this program or need more features, please send mail to achaldhir@gmail.com.
  187 	You may also send thanks email if it works fine for you.
  188 	
  189 DONATIONS
  190 
  191 	If you find that this program is suitable for your office environment and you are using it, Please consider
  192 	some donation for this project. $10-$50 do not make any difference to office, but it does make difference
  193 	to Project.