Difference between revisions of "Raspbian: install DHCP server"

From OnnoWiki
Jump to navigation Jump to search
(Created page with "Instalasi sudo su apt update apt install isc-dhcp-server Edit default vi /etc/default/isc-dhcp-server INTERFACESv4="eth0" Konfigurasi vi /etc/dhcp/dhcpd.conf Pa...")
 
Line 20: Line 20:
 
  authoritative;
 
  authoritative;
 
  # A slightly different configuration for an internal subnet.
 
  # A slightly different configuration for an internal subnet.
  subnet 10.5.5.0 netmask 255.255.255.224 {
+
  subnet 192.168.1.0 netmask 255.255.255.0 {
   range 10.5.5.26 10.5.5.30;
+
   range 192.168.1.100 192.168.1.200;
   option domain-name-servers 202.134.2.5, 203.130.196.5;  
+
   option domain-name-servers 192.168.1.10, 192.168.1.10;  
 
   option domain-name "sekolah.sch.id";
 
   option domain-name "sekolah.sch.id";
   option routers 10.5.5.1;
+
   option routers 192.168.1.1;
   option broadcast-address 10.5.5.31;
+
   option broadcast-address 192.168.1.255;
 
   default-lease-time 600;
 
   default-lease-time 600;
 
   max-lease-time 7200;
 
   max-lease-time 7200;

Revision as of 15:21, 10 October 2018

Instalasi

sudo su
apt update
apt install isc-dhcp-server


Edit default

vi /etc/default/isc-dhcp-server
INTERFACESv4="eth0"

Konfigurasi

vi /etc/dhcp/dhcpd.conf 

Parameter

authoritative;
# A slightly different configuration for an internal subnet.
subnet 192.168.1.0 netmask 255.255.255.0 {
  range 192.168.1.100 192.168.1.200;
  option domain-name-servers 192.168.1.10, 192.168.1.10; 
  option domain-name "sekolah.sch.id";
  option routers 192.168.1.1;
  option broadcast-address 192.168.1.255;
  default-lease-time 600;
  max-lease-time 7200;
}


Pranala Menarik