⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme

📁 Linux下的DHCP服务器程序源代码, 实现DHCP Server端协议
💻
字号:
This release 0.2 is a second Beta ReleaseThis Multisubnet DHCP Server supports both Dynamic and Static Leases. SupportsRelay Agents. Also supports BOOTP, PXEBOOT, User Defined Options. Options canbe Global, Range Specific and Client Specific. It also supports DHCP ranges filtered by Mac Address ranges.Future Plans to Integrate with LDAP.DOWNLOADThe latest copy of opendhcpd can be download from http://dhcpserver.sourceforge.netINSTALLATIONThis program if installed on a machine, which is static configured for IP Address,DNS & router, it detects these settings from server machine (If you want diffrentsetting for clients, edit ini file) and uses them for configuring other machineson local network.Expand the GZ archive to any directory (say opendhcpd)Change the permissions of file opendhcpd with chmod 755 opendhcpdtest run as root:-#./opendhcpd -vYou should see something similar to:-Forwarding DNS Server: 192.168.0.1DHCP Range: 192.168.0.1-192.168.0.254/255.255.255.0DNS Service Permitted Hosts: 192.168.0.1 - 192.168.0.254Expiry: 360000 (sec)Domain Name: workgroupServer Name: KnoppixListening On: 192.168.0.2Now try getting IP Address for another machine, it should work.RUNNINGThis program runs in two modes:-a) Verbatim Mode (using -v argument)b) Daemon (not using -v argument)This program uses 2 or 3 helper files:-i)   -i[inifile], where configuration settings can be specified,     default is ./etc/opendhcpd.iniii)  -s[statefile] saves current leases, default is /etc/opendhcpd.state iii) -l[logfile] dumps log to this file in daemon mode, default is syslogYou can start/run as:-./opendhcpd (daemon with default files)./opendhcpd -v (verbatim with default files)./opendhcpd -i inifile -s statefile -l logfile (as daemon)./opendhcpd -i inifile -s statefile (as daemon)./opendhcpd  -v -i inifile -s statefile as verbatimDAEMONIZINGThis program should be setup to start automaticallymodifying boot scripts in /etc/rc.d/rc.local fileor /etc/inittab file or /etc/rc.d/rc.inet2 file.Never include -v (verbatim flag) while runningas Daemon from these scripts. There are two alternatives:-i)  Just add the start line in any of above files.ii) Add the enclosed rc.opendhcpd script in /etc/rc.d    and make it executable (755). Also you need to add the    lines:-        # Start the Dual DHCP DNS Server daemon:    if [ -x /etc/rc.d/rc.opendhcpd ]; then      /etc/rc.d/rc.opendhcpd start    fi    to any of above scripts (preferably to /etc/rc.d/rc.inet2)Alternative ii) is recommendedRECOMPILINGRecompiling is not generally needed on Intel/Linux systems.#g++ opendhcpd.cpp -oopendhcpd -lpthreadYou need C++ compiler for Versions 3 onwards, as these versions use STLIf you have only C Compiler, you need to download and use Version 2.1 only.CONFIGURATION1) Configuration of Server   The program automatically picks up settings of Server computer and    no configuration is required if:-   a) Server machine is configured for DNS Servers and Gateway servers.   b) You use IP range 192.168.0.1 - 192.168.0.255 (Server is automatically excluded).   c) Lease Time is 360000 secs/100 hours.      You can change any of these settings in opendhcpd.ini file.   2) Configuration of Clients   a. You can use windows/linux/unix mix of clients.   b. The clients should be set to get IP Address automatically.   c. Do not configure the clients for Dynamic DNS Update, as this server automatically      does this.GENERAL   1) This document is for guidance and is covered under GNU public license.DEBUGIf program is not assigning addresses or resolve them check:-1) Ensure that you run this program as root only.2) Check network hardware and ensure that client machines has different host names from server and   each other.3) No other service should be running on Server on ports 67.4) If you get error like port 67 already in use means some other DHCP program or proxy server with DHCP    service is running. Use netstat command to detect which program is listening on these ports.   It is also possible that another copy of opendhcpd itself is running.5) If you get error Static Interfaces/Listening Ports not available, it may be because of 1) Another   dhcp Server is running or Interfaces specified on [LISTEN_ON] section are not available.   or you have just restated the server and TCP port is not yet closed, then wait for some time.6) Look at log file (if running as service) or Run in standalone mode, it will provide all debug   information as it verbatim the activities.7) If you use Braodband router, which also has DHCP Server, this program may still run, but some hosts   configured by other DHCP Server may not use this DNS Service. Please disable the DHCP Service on   Broadband router.8) opendhcpd.state file backs up current leases and is read back when server restarts. If you want to    clean previous leases, you may delete this file and restart the server.9) Errors like "libstdc++.so.?: cannot open shared object file: No such file or directory"    are possible in some Linux flavours. Please recompile the program or create symbolic links:-	ln -s /usr/local/lib/libstdc++.so.? /usr/lib/libstdc++.so.? 	ln -s /usr/local/lib/libgcc_s.so.? /usr/lib/libgcc_s.so.?   (? is library version as reported in error)   or add the library path (directory where above file is) to env variable LD_LIBRARY_PATH.10)If you are not able to receive DHCP Discover messages from clients, make sure that Dual DHCP DNS Server   and client are on same physical network (not separated by routers). If it is separated by routers and it   is same subnet, please allow routers to pass broadcast messages to Server on Port 67. If these are    different subnets, use the BOOTP relay agents.UNINSTALLATION	Just remove the program directory. You should also remove entries from initialize scripts of 	your machine.BUGS	If you find any problem with this program or need more features, please send mail to achaldhir@gmail.com.	You may also send thanks email if it works fine for you.	DONATIONS	If you find that this program is suitable for your office environment and you are using it, please consider	some donation for this project.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -