RPi
isc dhcp server
Installation
sh# apt install isc-dhcp-server
Configuration
dhcpd.conf
pool
subnet
shared-network
range
group
sh# vi /etc/dhcp/dhcpd.conf
option domain-name "home";
option domain-name-server 208.67.222.222, 208.67.220.220;
default-lease-time 600;
max-lease-time 7200;
ddns-update-style none;
authoritative;
subnet 192.168.72.0 netmask 255.255.255.0 {
range 192.168.72.23 192.168.72.34;
option routers myrouter72;
option broadcast-address 192.168.72.255;
}
subnet 192.168.45.0 netmask 255.255.255.0 {
range 192.168.45.34 192.168.45.52;
option routers myrouter45
host myrouter72 {
hardware ethernet 00:00:00:cc:bb:aa;
fixed-address 192.168.72.1;
}
host myrouter45 {
hardware ethernet 00:00:00:ff:ee:dd;
fixed-address 192.168.45.1;
}
/etc/dhcp/dhcpd.conf
Network Interfaces
sh# vi /etc/default/isc-dhcp-server
...
INTERFACESv4="eth72 eth45"
systemd
Starting / Stopping
sh# systemctl enable isc-dhcp-server
sh# systemctl start isc-dhcp-server
Disabling dhcp client on router
sh# systemctl stop dhcpcd
sh# systemctl disable dhcpcd
Synchronizing state of dhcpcd.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install disable dhcpcd
Removed /etc/systemd/system/dhcpcd5.service.