User Tools

Site Tools


computers:dhcp_server_configuration

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
computers:dhcp_server_configuration [2011/08/10 01:38] – created chkuocomputers:dhcp_server_configuration [2020/08/16 00:52] (current) chkuo
Line 2: Line 2:
  
 ===== Installation ===== ===== Installation =====
-  * Package+Download and install the package
 <code bash> <code bash>
-sudo apt-get install dhcp3-server+sudo apt-get install isc-dhcp-server
 </code> </code>
  
-  * Specify the interfaces dhcpd should listen to in ''/etc/default/dhcp3-server''+===== Configuration ===== 
 +Specify the interfaces dhcpd should listen to in ''/etc/default/isc-dhcp-server'', for example:
 <code bash> <code bash>
-INTERFACES="eth1+INTERFACESv4="eno1np0" 
 +</code> 
 + 
 +Edit ''/etc/dhcp/dhcpd.conf'', for example: 
 +<code bash> 
 +# /etc/dhcp/dhcpd.conf 
 +ddns-update-style none; 
 +log-facility local7; 
 +option domain-name-servers 192.168.1.1, 140.109.1.10, 8.8.8.8; 
 +default-lease-time 86400; 
 +max-lease-time 86400; 
 + 
 +subnet 192.168.1.0 netmask 255.255.255.0 { 
 + option routers                  192.168.1.1; 
 + option subnet-mask              255.255.255.0; 
 + option broadcast-address        192.168.1.255; 
 +  
 + range 192.168.1.200 192.168.1.250; 
 +
 + 
 +# printer 
 +host poplar { 
 + hardware ethernet XX:XX:XX:XX:XX:XX; 
 + fixed-address 192.168.1.11; 
 +
 + 
 +# server 
 +host oak { 
 + hardware ethernet XX:XX:XX:XX:XX:XX; 
 + fixed-address 192.168.1.21; 
 +
 + 
 +# workstation 
 +host sage { 
 + hardware ethernet XX:XX:XX:XX:XX:XX; 
 + fixed-address 192.168.1.101; 
 +
 +</code> 
 + 
 +===== Activation ===== 
 +To start/stop/restart the service: 
 +<code bash> 
 +sudo service isc-dhcp-server start 
 +sudo service isc-dhcp-server stop 
 +sudo service isc-dhcp-server restart 
 +</code> 
 + 
 +===== Monitoring ===== 
 +To check dhcpd status: 
 +<code bash> 
 +sudo service isc-dhcp-server status 
 +</code> 
 + 
 +To see the leases: 
 +<code bash> 
 +more /var/lib/dhcp/dhcpd.leases
 </code> </code>
  
 ===== References ===== ===== References =====
   * [[https://help.ubuntu.com/10.04/serverguide/C/dhcp.html]]   * [[https://help.ubuntu.com/10.04/serverguide/C/dhcp.html]]
 +  * [[https://help.ubuntu.com/community/dhcp3-server]]
 +  * [[http://wiki.ubuntu-tw.org/index.php?title=UbuntuTW_Guide_ch15]]
 +
 +
computers/dhcp_server_configuration.1312911496.txt.gz · Last modified: 2011/08/10 01:38 by chkuo