ISC DHCP SERVER DEBIAN SERVER (INSTALL & CONFIG)

ISC DHCP SERVER

root@dlp:~# 
apt -y install isc-dhcp-server

root@dlp:~# 
vi /etc/default/isc-dhcp-server
# line 4 : uncomment

DHCPDv4_CONF=/etc/dhcp/dhcpd.conf
# 1line 17,18 : specify interface to listen (replace it to your environment)

INTERFACESv4="
enp1s0
"
root@dlp:~# 
vi /etc/dhcp/dhcpd.conf
# line 7 : specify domain name

option domain-name 
"srv.world"
;
# line 8 : specify nameserver's hostname or IP address

option domain-name-servers 
dlp.srv.world
;
# line 21 : uncomment (this DHCP server to be declared valid)

authoritative;
# specify network address and subnetmask

# specify the range of lease IP address

subnet 10.0.0.0 netmask 255.255.255.0 {
    # specify gateway
    option routers 10.0.0.1;
    # specify subnet mask
    option subnet-mask 255.255.255.0;
    # specify the range of lease IP address
    range dynamic-bootp 10.0.0.200 10.0.0.254;
}
 

root@dlp:~# 

systemctl restart isc-dhcp-server


---------------
root@dlp:~# 
vi /etc/network/interfaces
# change to [dhcp] on the target iface line

iface enp1s0 inet 
dhcp
root@dlp:~# 
systemctl restart ifup@enp1s0

 

Comments

Popular Posts