docker_notes:docker-dhcp

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revisionBoth sides next revision
docker_notes:docker-dhcp [2023-07-09 Sun wk27 14:14] – [main dhcp4] baumkpdocker_notes:docker-dhcp [2024-01-10 Wed wk02 19:13] – [Docker - DHCP Server] baumkp
Line 1: Line 1:
 {{tag>linux docker kea dhcp}} {{tag>linux docker kea dhcp}}
 ======Docker - DHCP Server====== ======Docker - DHCP Server======
-propose to create a Docker ISC Kea Image using base Docker Alpine Linux images, with S6 init system. <fs x-small>(ISC Kea is a modern replacement for their DHCP.)</fs>+Since mid 2023 have been running a Docker ISC Kea Image using base Docker Alpine Linux images, with S6 init system. <fs x-small>(ISC Kea is a modern replacement for their DHCP.)</fs>  The main DHCP server runs on my main server and I have an automatic fall over back up on my separate Linux router.  I basically followed the Kea template [[https://kea.readthedocs.io/en/latest/arm/config-templates.html#template-home-network-of-a-power-user|Home Network of a Power User]].  I was never quite sure I had the automatic fall over back-up working. On 2023-01-02 I modified a configuration file on the primary server with a syntax error. Today, 8 days later I notice millions of lines of errors on my log files.  Sure enough the backup had simply been working.  I fixed up the simple syntax error and the primary server took back over.  Everything basically worked as expected.
  
 ISC also has a project for a simple GUI interface primarily for Kea and basic for Bind9.  There is apparently no Alpine package yet for Stork. ISC also has a project for a simple GUI interface primarily for Kea and basic for Bind9.  There is apparently no Alpine package yet for Stork.
Line 24: Line 24:
 |isc-kea-perfdhcp|Optional. Includes a DHCP performance testing tool from ISC.|?| |isc-kea-perfdhcp|Optional. Includes a DHCP performance testing tool from ISC.|?|
 |isc-kea-shell|Text client for Kea DHCP Control Agent.|?| |isc-kea-shell|Text client for Kea DHCP Control Agent.|?|
- 
-<fs xx-large><fc #ff0000>Work not stated yet</fc></fs> 
  
 ====Network Ports==== ====Network Ports====
Line 39: Line 37:
 ====DHCP testing==== ====DHCP testing====
 ''%%sudo nmap --script broadcast-dhcp-discover%%'' will test the DHCP servers on the same network. ''%%sudo nmap --script broadcast-dhcp-discover%%'' will test the DHCP servers on the same network.
 +
 +===Reference===
 +  *[[https://serverfault.com/questions/171744/command-line-program-to-test-dhcp-service|Command line program to test DHCP service]]
 +  *[[https://nmap.org/book/toc.html|The Official Nmap Project Guide to Network Discovery and Security Scanning]]
 +  *[[https://www.redhat.com/sysadmin/nmap-scripting-engine|5 scripts for getting started with the Nmap Scripting Engine]]
  
 ====main dhcp4==== ====main dhcp4====
   *''kea-dhcp4 -t /app/dhcpv4.conf'' to test the kea-dhcp4 configuration files ''/app/dhcpv4.conf''   *''kea-dhcp4 -t /app/dhcpv4.conf'' to test the kea-dhcp4 configuration files ''/app/dhcpv4.conf''
   *''kea-dhcp4 -c /app/dhcpv4.conf'' to start kea dhcp4 using configuration file ''/app/dhcpv4.conf''   *''kea-dhcp4 -c /app/dhcpv4.conf'' to start kea dhcp4 using configuration file ''/app/dhcpv4.conf''
 +++++Use of symlink, TL;DR;|
 +Using symlinks in is confusing when using Docker mounted directories.
 To control which dhcp4 config file to run (basic or plus): To control which dhcp4 config file to run (basic or plus):
   *''ln -s .config/dhcp_basic.conf .config/dhcp.conf'' to run basic   *''ln -s .config/dhcp_basic.conf .config/dhcp.conf'' to run basic
   *''ln -s .config/dhcp_plus.conf .config/dhcp.conf'' to run plus   *''ln -s .config/dhcp_plus.conf .config/dhcp.conf'' to run plus
     *The ''-f'' flag can be used to overwrite an existing link file instead of deleting first.     *The ''-f'' flag can be used to overwrite an existing link file instead of deleting first.
-The plus configuration allows a secondary backup dhcp server to be operated.+The plus configuration allows a secondary backup dhcp server to be operated.++++ 
 +  *''kea-dhcp4 -c /app/dhcpv4_plus.conf'' to start kea dhcp4 using configuration file ''/app/dhcpv4_plus.conf'' This configuration file is designed to work with the kea control agent setup.  Where as the basic configuration ''/app/dhcpv4_basic.conf'' is not.
  
 ====ctrl-agent -t /app/kea-ctrl-agent.conf==== ====ctrl-agent -t /app/kea-ctrl-agent.conf====
   *''kea-ctrl-agent -t /app/kea-ctrl-agent.conf'' to test the kea-cont-agent configuration file ''/app/kea-ctrl-agent.conf''     *''kea-ctrl-agent -t /app/kea-ctrl-agent.conf'' to test the kea-cont-agent configuration file ''/app/kea-ctrl-agent.conf''  
   *''kea-ctrl-agent -c /app/kea-ctrl-agent.conf'' to start the kea-cont-agent configuration file ''/app/kea-ctrl-agent.conf''   *''kea-ctrl-agent -c /app/kea-ctrl-agent.conf'' to start the kea-cont-agent configuration file ''/app/kea-ctrl-agent.conf''
 +
 +  *[[https://kea.readthedocs.io/en/latest/arm/agent.html|The Kea Control Agent]]
 +
 +====Kea logging====
 +  *[[https://kb.isc.org/docs/kea-logging-configuration|Kea Logging Configuration]]
 +I have stored log files in the .config directory that is a Docker mounted volume for persistence and easy external viewing outside container.  The following logs files can be seen.
 +  * ''.config/log/kea-dhcp4-commands.log''
 +  * ''.config/log/kea-dhcp4-dhcpsrv.log''
 +  * ''.config/log/kea-dhcp4-leases.log''
 +  * ''.config/log/kea-dhcp4.log''
 +  * ''.config/log/kea-dhcp4-ha-hooks.log''
 +
 +====Kea Miscellaneous====
 +
 +  *''docker attach kptr-kea-1'' to attach to running container
 +  *''kea-dhcp4 -v'' To check running version
 =====References===== =====References=====
   *KPTree.net's bare metal implementation of [[linux_router:dns_dhcp|dns - dhcp]], based upon ISC Bind9 and DHCP on Debian 10 <fs xx-small>(was originally Ubuntu)</fs>.   *KPTree.net's bare metal implementation of [[linux_router:dns_dhcp|dns - dhcp]], based upon ISC Bind9 and DHCP on Debian 10 <fs xx-small>(was originally Ubuntu)</fs>.
Line 59: Line 81:
     *[[https://kb.isc.org/docs/kea-configuration-sections-explained|Kea Configuration Introduction]]     *[[https://kb.isc.org/docs/kea-configuration-sections-explained|Kea Configuration Introduction]]
     *[[https://kb.isc.org/docs/kea-configuration-for-small-office-or-home-use|Kea Configuration for Small Office or Home Use]]     *[[https://kb.isc.org/docs/kea-configuration-for-small-office-or-home-use|Kea Configuration for Small Office or Home Use]]
 +    *[[https://web-wilke.de/install-and-run-kea-dhcp-with-stork-on-debian-11/|Install and run KEA DHCP with Stork on Debian 11]]
 +    *[[https://github.com/JonasAlfredsson/docker-kea| JonasAlfredsson / docker-kea ]]
  
- +<- docker_notes:docker-dns|Back ^ docker_notes:index|Start page ^ docker_notes:nginx-php-notes|Next ->
-<- docker_notes:docker-dns|Back ^ docker_notes:index|Start page ^ |End->+
  • /app/www/public/data/pages/docker_notes/docker-dhcp.txt
  • Last modified: 2024-02-24 Sat wk08 14:18
  • by baumkp