LinuxMint 19: Install isc-dhcp-server for DHCP server

Table of Contents

1 Install isc-dhcp-server

Install isc-dhcp-server with apt.

$ sudo apt install -y isc-dhcp-server

2 /etc/default/isc-dhcp-server

Add configuration for DHCPD. INTERFACES is a network interface name which is connected to a network which you try to provided DHCP.

$ INTERFACES=ens3$ sudo sed -e ‘s/^#DHCPD_CONF=/DHCPD_CONF=/g’ -e ‘s/^#DHCPD_PID=/DHCPD_PID=/g’ -e “s/INTERFACES=””/INTERFACES=”${INTERFACES}”/g” -i /etc/default/isc-dhcp-server

3 /etc/dhcp/dhcpd.conf

Define domain name, DHCP server IP address and gateway IP address. Mapping MAC address 52:54:00:5e:7a:a4 to IP address

$ cat /etc/dhcp/dhcpd.confsubnet netmask { option domain-name “”; option domain-name-servers; option routers;}host dhcp-client { hardware ethernet 52:54:00:5e:7a:a4; fixed-address; option host-name “”;}

4 Run isc-dhcp-server

Run isc-dhpc-server with systemd.

$ sudo systemctl enable isc-dhcp-server$ sudo systemctl restart isc-dhcp-server

5 Execution result

Run the following command on client machine.

IP address is provided.

$ ip a s1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWNgroup default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codelstate UP group default qlen 1000 link/ether 52:54:00:5e:7a:a4 brd ff:ff:ff:ff:ff:ff inet brd scope global dynamicnoprefixroute ens3 valid_lft 42938sec preferred_lft 42938sec inet6 fe80::3af3:7f8b:9205:2e03/64 scope link noprefixroute valid_lft forever preferred_lft forever

Hostname is provided.

$ hostnamectl Static hostname: localhostTransient hostname: Icon name: computer-vm Chassis: vm Machine ID: 4095cb9d62054733b651d895c996ea84 Boot ID: 857d974d1b704422be7dbca83a77d9e1 Virtualization: kvm Operating System: Linux Mint 19 Kernel: Linux 4.15.0-20-generic Architecture: x86-64

DNS server is provided.

$ systemd-resolve –status ens3Link 2 (ens3) Current Scopes: DNS LLMNR setting: yesMulticastDNS setting: no DNSSEC setting: no DNSSEC supported: no DNS Servers: DNS Domain:

Android | Linux | SDL - Narrow Escape