Difference between revisions of "DHCP Server: Install"

From OnnoWiki
Jump to navigation Jump to search
(Created page with "==Install== apt-get install isc-dhcp-server -y systemctl start isc-dhcp-server systemctl enable isc-dhcp-server ==Konfigurasi== nano /etc/default/isc-dhcp-server IN...")
 
Line 11: Line 11:
 
  nano /etc/default/isc-dhcp-server
 
  nano /etc/default/isc-dhcp-server
  
  INTERFACESv4="eth0"
+
  INTERFACESv4="enp3s0"
  
  
Line 17: Line 17:
 
  nano /etc/dhcp/dhcpd.conf
 
  nano /etc/dhcp/dhcpd.conf
  
 +
default-lease-time 600;
 +
max-lease-time 7200;
 
  authoritative;
 
  authoritative;
 
+
  subnet 10.254.239.0 netmask 255.255.255.224 {
  {
+
  range 10.254.239.0 10.254.239.20;
default-lease-time 660;
+
  option routers 10.254.239.1;
max-lease-time 6300;
+
  option domain-name-servers 10.254.239.1;
 
 
# range of subnet
 
range 192.168.0.2 192.168.0.20;
 
 
 
# gateway address
 
option routers 192.168.0.1;
 
 
 
# DNS server address
 
option domain-name-servers 8.8.8.8, 8.8.4.4;
 
 
  }
 
  }

Revision as of 11:58, 13 September 2021

Install

apt-get install isc-dhcp-server -y
systemctl start isc-dhcp-server
systemctl enable isc-dhcp-server


Konfigurasi

nano /etc/default/isc-dhcp-server
INTERFACESv4="enp3s0"


nano /etc/dhcp/dhcpd.conf
default-lease-time 600;
max-lease-time 7200;
authoritative;
subnet 10.254.239.0 netmask 255.255.255.224 {
  range 10.254.239.0 10.254.239.20;
  option routers 10.254.239.1;
  option domain-name-servers 10.254.239.1;
}