#sample config file
cat /etc/dhcp/dhcpd.conf
default-lease-time 600;
max-lease-time 7200;

subnet netmask {
allow unknown-clients;
option routers;
option broadcast-address;
default-lease-time 600;
max-lease-time 7200;

#show dhcp leases
To get manufacturer names please download http://standards.ieee.org/regauth/oui/oui.txt to /usr/local/etc/oui.txt
Reading leases from /var/lib/dhcp/dhcpd.leases
MAC IP hostname valid until manufacturer
44:5b:ed:7d:c6:81 Aruba-Stack-38 2022-06-02 07:07:22 -NA-
44:5b:ed:6e:f7:81 Aruba-Stack-38 2022-06-02 07:07:54 -NA-

#dhcp server commands
dhcpcd -h #show options
dhcpcd -l 3600 #set the leasetime in seconds
dhcpcd -x #exit / turn of the dhcp service

computer2know :: thank you for your visit :: have a nice day :: © 2024