apt update && apt install isc-dhcp-server
nano /etc/dhcp/dhcpd.conf
subnet 10.20.30.0 netmask 255.255.255.0 {
range 10.20.30.10 10.20.30.20;
option domain-name-servers 10.20.30.1;
option domain-name "lab.lan";
option routers 10.20.30.1;
default-lease-time 600;
max-lease-time 7200;
}
nano /etc/default/isc-dhcp-server
INTERFACESv4="enp0s8"
systemctl restart isc-dhcp-server
network:
ethernets:
enp0s3:
dhcp4: yes
dhcp-lease-list
ip a
- на стороне клиентаarp <ip>
- на стороне gw (потребуется установка пакета net-tools)host <hostname> {
hardware ethernet <mac>;
fixed-address <ip>;
}