This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
сервис_dhcp [2023/07/24 12:57] val [Стандартная конфигурация] |
сервис_dhcp [2024/05/01 10:19] val [isc-kea] |
||
---|---|---|---|
Line 7: | Line 7: | ||
* [[https://www.isc.org/kea/|Kea DHCP Modern, open source DHCPv4 & DHCPv6 server]] | * [[https://www.isc.org/kea/|Kea DHCP Modern, open source DHCPv4 & DHCPv6 server]] | ||
+ | |||
+ | ===== isc-dhcp-server ===== | ||
+ | |||
===== Установка ===== | ===== Установка ===== | ||
Line 229: | Line 232: | ||
# dhcpd-pools -l /var/db/dhcpd/dhcpd.leases -c /usr/local/etc/dhcpd.conf | # dhcpd-pools -l /var/db/dhcpd/dhcpd.leases -c /usr/local/etc/dhcpd.conf | ||
+ | </code> | ||
+ | |||
+ | ===== isc-kea ===== | ||
+ | |||
+ | * [[https://ubuntu.com/server/docs/how-to-install-and-configure-isc-kea|How to install and configure isc-kea]] | ||
+ | |||
+ | <code> | ||
+ | gate# apt install kea | ||
+ | |||
+ | gate# cat /etc/kea/kea-dhcp4.conf | ||
+ | </code><code> | ||
+ | { | ||
+ | "Dhcp4": { | ||
+ | "interfaces-config": { | ||
+ | "interfaces": [ "eth2" ], | ||
+ | "dhcp-socket-type": "raw" | ||
+ | }, | ||
+ | |||
+ | "control-socket": { | ||
+ | "socket-type": "unix", | ||
+ | "socket-name": "/run/kea/kea4-ctrl-socket" | ||
+ | }, | ||
+ | |||
+ | "lease-database": { | ||
+ | "type": "memfile", | ||
+ | "lfc-interval": 3600 | ||
+ | }, | ||
+ | |||
+ | "expired-leases-processing": { | ||
+ | "reclaim-timer-wait-time": 10, | ||
+ | "flush-reclaimed-timer-wait-time": 25, | ||
+ | "hold-reclaimed-time": 3600, | ||
+ | "max-reclaim-leases": 100, | ||
+ | "max-reclaim-time": 250, | ||
+ | "unwarned-reclaim-cycles": 5 | ||
+ | }, | ||
+ | |||
+ | "renew-timer": 900, | ||
+ | "rebind-timer": 1800, | ||
+ | "valid-lifetime": 3600, | ||
+ | |||
+ | "option-data": [ | ||
+ | { | ||
+ | "name": "domain-name-servers", | ||
+ | "data": "192.168.13.10" | ||
+ | }, | ||
+ | { | ||
+ | "name": "domain-search", | ||
+ | "data": "corp13.un" | ||
+ | }, | ||
+ | { | ||
+ | "name": "domain-name", | ||
+ | "data": "corp13.un" | ||
+ | } | ||
+ | ], | ||
+ | |||
+ | "subnet4": [ | ||
+ | { | ||
+ | "subnet": "192.168.113.0/24", | ||
+ | "pools": [ { "pool": "192.168.113.100 - 192.168.113.109" } ], | ||
+ | "option-data": [ | ||
+ | { | ||
+ | "name": "routers", | ||
+ | "data": "192.168.113.1" | ||
+ | } | ||
+ | ] | ||
+ | } | ||
+ | ], | ||
+ | "loggers": [ | ||
+ | { | ||
+ | "name": "kea-dhcp4", | ||
+ | "output_options": [ | ||
+ | { | ||
+ | "output": "stdout", | ||
+ | "pattern": "%-5p %m\n" | ||
+ | } | ||
+ | ], | ||
+ | "severity": "INFO", | ||
+ | "debuglevel": 0 | ||
+ | } | ||
+ | ] | ||
+ | } | ||
+ | } | ||
+ | </code><code> | ||
+ | # kea-dhcp4 -t /etc/kea/kea-dhcp4.conf | ||
+ | |||
+ | # service kea-dhcp4-server restart | ||
+ | |||
+ | # service kea-dhcp4-server status | ||
+ | |||
+ | # cat /var/lib/kea/kea-leases4.csv | ||
</code> | </code> | ||