% -*- mode: latex; fill-column: 120; -*-
OpenCHAMI uses CoreDHCP as the DHCP service to provide IP Addresses to nodes,
there is a default configuration in place that we need to overwrite.

Of Note if your router address is different than the internal network address .254 you will need to change this file on your own.
CoreDHCP has been configured to only provide addresses to nodes it knows.
There are some extra \href{https://github.com/OpenCHAMI/deployment-recipes/blob/main/quickstart/DHCP.md}{configuration changes} you can make to change that

% begin_ohpc_run
% ohpc_comment_header Configure DHCP \ref{sec:dhcp_config}
\begin{lstlisting}[language=bash,keywords={}]
[sms](*\#*) cat > /etc/openchami/configs/coredhcp.yaml <<EOF
[sms](*\#*) server4:
[sms](*\#*)  plugins:
[sms](*\#*)     - server_id: ${sms_ip}
[sms](*\#*)     - router: ${ipv4_gateway}
[sms](*\#*)     - dns: ${dns_servers}
[sms](*\#*)     - netmask: ${internal_netmask}
[sms](*\#*)     - coresmd: https://${sms_name}:8443 http://${sms_ip}:8081 /root_ca/root_ca.crt 30s 1h false
[sms](*\#*) EOF
\end{lstlisting}
% ohpc_validation_newline
% end_ohpc_run
