31 Domain Name System Part 3: Dynamic DNS
Jacob Christensen
In DNS Part 1, we manually configured our DNS entries with the IP addresses that were statically assigned to our client devices. However, it is uncommon to use static IP assignments, especially in networks with hundreds or even thousands of clients! If we can get our DHCP and DNS servers to communicate with each other, then IPs can automatically be assigned and our zone files can automatically be populated. This practice is called Dynamic DNS (DDNS).
This lab will expand on the work in Chapter 29 and Chapter 30 to learn how to configure and manage DDNS in a small network environment.
Overview
This lab is an extension of the previous two chapters. If you have not completed them, it is recommended that you do so first before continuing. By the end your network should look like the following:

Estimated time for completion: 60 minutes
Last updated October 2026
learning objectives
- Learn how DDNS works on an enterprise network
- Learn how to work with multiple services (DHCP and DNS) on one network
prerequisites
deliverables
- Screenshot of PC1 pinging PC2 by name
- Screenshot of PC2 pinging PC3 by name
resources
- BIND9 Administrator Reference Manual
- Kea Administrator Reference Manual: DHCP-DDNS Server
- Kea Administrator Reference Manual: DHCPv4 Server
Contributors and testers
Mathew J. Heath Van Horn, PhD, ERAU-Prescott
Kyle Wheaton, Cybersecurity Student, ERAU-Prescott
Phase 0 – Professional Alignment
Modern enterprise networks rely on Dynamic DNS (DDNS) to automatically maintain accurate DNS records as devices join, leave, or change addresses on the network. In this chapter, you will configure Dynamic DNS using BIND9 and Kea DHCP so that hostnames and IP addresses remain synchronized without manual intervention. This integration demonstrates how enterprise infrastructure services work together to simplify administration and improve network reliability.
DCWF Work Roles
The knowledge and skills developed in this chapter align with the following Department of Defense Cyber Workforce Framework (DCWF) work roles:
- 441 – Network Services Specialist
- 511 – Network Operations Specialist
- 531 – Systems Administrator
NICE Work Roles
This chapter supports competencies associated with the following NICE Workforce Framework for Cybersecurity work roles:
- Network Services Specialist
- Network Operations Specialist
- Systems Administrator
Professional Skills
By completing this chapter, you will begin developing the ability to:
- Configure Dynamic DNS (DDNS) to automatically update DNS records.
- Integrate DHCP and DNS services within an enterprise network.
- Validate automatic forward and reverse DNS record creation.
- Analyze DNS update behavior using standard diagnostic tools.
- Troubleshoot Dynamic DNS configuration and synchronization issues.
- Document integrated enterprise network service configurations.
What You’ll Be Able to Do
After completing this chapter, you should be able to:
- Configure BIND9 to support secure Dynamic DNS updates.
- Configure Kea DHCP to automatically register client DNS records.
- Verify that forward and reverse DNS records are created and updated automatically.
- Validate successful name resolution for dynamically registered hosts.
- Diagnose common Dynamic DNS and DHCP integration issues.
- Explain how Dynamic DNS reduces administrative effort while improving the accuracy of enterprise DNS records.
Phase I – Modifying the Topology
In a production environment, both DHCP and DNS services can operate on the same computer. In this lab, we are separating them into two devices for clarity between their roles on a network. When students are learning about these services for the first time, having the services on different VMs enable them to visualize how these services function.
- Duplicate the network that you built in the last chapter
- Move PC1 to the blue network
- Add a Linux server to the red network
- Change its hostname to DHCP
- Install Kea’s DHCPv4 and DDNS server packages
sudo apt -y install kea-dhcp4-server kea-dhcp-ddns-server
NOTE: Connect a device to a NAT cloud to quickly setup an Internet connection in GNS3. This can be used to update and install software before proceeding further in the chapter.

Figure 2 – Connect VM to Internet - Assign it the static address 172.16.16.100/24
- Configure a DHCP relay on the router for the blue network
/ip/dhcp-relay add interface=ether2 dhcp-server=172.16.16.100 disabled=no
Phase II – Modify the DNS Server
In the context of dynamic DNS, authorized DHCP servers will coordinate with DNS servers to automatically update zone RRs while they are running. As new hosts join or leave the network, zone databases will dynamically grow and shrink in size.
/Etc vs /Var
Files under /etc are traditionally ‘static’. For example, configuration files (such as named.conf.options) define server/process settings and typically do not change unless manual updates are made by an administrator. In previous chapters, zone database files were stored in the directory /etc/bind, because hosts were assigned static addresses and static hostnames.
Alternatively, the /var (variable) directory is traditionally for files that often change over the lifetime of a process or service. For example, /var/log is where most services store their logs files, which will constantly grow in size as new log entries are added.
Dynamic zone files should be placed in /var/lib/bind, which should have been created when BIND was initially installed.
- In NS1, move both forward and reverse zone files for blue.net to /var/lib/bind
sudo mv /etc/bind/db.blue* /var/lib/bind/
The red network only has hosts with static hostname-IP mappings (NS1 and DHCP). It will not be using DDNS, so its zone files can remain in /etc/bind.
- Update the zones’ filenames in the local configuration
sudo vi /etc/bind/named.conf.local

Figure 3 – Updating zone file paths - In the same file, allow the DHCP server to update both zones’ records

Figure 4 – Allow DHCP to update zone records - Check for syntax errors
named-checkconf
- Add a new static entry for DHCP
- Update the forward zone file
sudo vi /var/lib/bind/db.red.net

Figure 5 – Red forward zone file - Update the reverse zone file
sudo vi /var/lib/bind/db.red.net.rev

Figure 6 – Red reverse zone file
- Update the forward zone file
- Remove all static entries in the blue zone files
- Update the forward zone file
sudo vi /var/lib/bind/db.blue.net

Figure 7 – Blue forward zone - Update the reverse zone file
vi /var/lib/bind/db.blue.net.rev

Figure 8 – Blue reverse zone
- Update the forward zone file
- Reload the server to apply changes
Phase III – Configuring the DHCP Server
The following section outlines the configuration of the DHCP daemon for the network and how to connect it to a DDNS server.
- Modify the Kea DHCP server
sudo vi /etc/kea/kea-dhcp4.conf
- As in previous chapters, add global lease timers and interface/lease database configurations

Figure 9 – Kea DHCP config 1 - Add a section to connect the DHCP server to Kea’s DDNS server

Figure 10 – Kea DHCP config 2 Parameter Description enable-updates: true Send DDNS updates on DHCPREQUEST and DHCPRELEASE packets, or when client hostnames change when renewing leases. server-ip: 127.0.0.1 The DDNS server is running on the same machine, so connect to the localhost address. server-port: 53001 Connect to Kea DDNS default port 53001. - Add a subnet declaration for the blue network

Figure 11 – Kea DHCP config 3 This lab introtroduces two new DHCP options. Domain name servers (code 6) provides a list of DNS addresses the client should use to resolve hostnames. Domain name (code 15) sets the local search domain.
When generating a new DDNS request, the DHCP server needs to know the client’s hostname and the zone to update. In most cases, clients will provide their hostname in their initial DHCPDISCOVER, as shown below:

Figure 12 – Client option host name However, the hostname itself is not enough to identify which zone the client has joined. In cases where clients do not provide FQDN information, the value of “ddns-qualifying-suffix” is appended to their hostname, so DDNS updates are sent to the right zone.
- Here is the full configuration for reference

Figure 13 – Full config reference - Check for syntax errors
kea-dhcp4 -t /etc/kea/kea-dhcp4.conf
- Reload the server to apply changes
Phase IV – Configuring the DDNS Server
Kea’s DDNS server takes update requests generated from the DHCP server, and sends them to their appropriate DNS server. Essentially, it acts as the “middle-man” between DHCP and DNS.
- Edit Kea’s DDNS server configuration
sudo vi /etc/kea/kea-dhcp-ddns.conf
- Create a basic server outline

Figure 14 – DDNS server outline NOTE: Double-check that the IP and port settings here align with the DHCP server configuration.
- Point the blue.net forward zone to NS1

Figure 15 – Adding forward domain NOTE: Notice how the name “blue.net.” is fully qualified (ends with a dot).
- Point the blue.net reverse zone to NS1

Figure 16 – Kea DDNS full config - Check the configuration file for any errors
kea-dhcp-ddns -t /etc/kea/kea-dhcp-ddns.conf
- Reload the service to apply the new configuration
sudo systemctl restart kea-dhcp-ddns-server
Phase V – Testing Dynamic Name Resolution
Now that our network is set up, let’s watch DDNS in action.
- Start Wireshark on the DHCP-Switch1 link
- From PC1, request a new address

Figure 17 – PC1 show IP details Notice how the DOMAIN NAME and DNS fields were automatically configured by the server.
- Filter for DHCP and DNS in the capture session

Figure 18 – Wireshark DDNS update Dynamic updates take place when a client sends a DHCPREQUEST or DHCPRELEASE.
- From DHCP, follow DDNS server logs
journalctl -fu kea-dhcp-ddns-server

Figure 19 – DDNS journal What is A DHCID?
Consider the following scenario: If both Client A (10.0.0.1) and Client B (10.0.0.2) join a network with the hostname “computer”, to which address would DDNS resolve?
In DDNS, clients have a unique identifier that is assocated with their RR entry called DHCID. In the example below…

Figure 20 – DHCID example …the FQDN “pc1.blue.net” is associated with with the DHCID “AAEB…Ca1g=“. If conflict resolution is enabled, then records with this hostname can only be updated or removed by the client that shares this DHCID (the original client). If another device with the hostname “pc1” joins blue.net, DDNS will not update the record’s IP address, because they will have a different DHCID value. However, if conflict resolution is disabled, then new clients can override other host’s RRs sharing the same name.
- From NS1, follow Named server logs
journalctl -fu named

Figure 21 – Named journal **these logs were cropped for readability**
BIND added four RRs for PC1 in response to DDNS updates: an A and DHCID record in the foward zone, and a PTR and DHCID record in the reverse zone. Any previous records with a matching DHCID value are removed from both zones (e.g. old hostnames or IP addresses from previous DHCP leases).
- Request addresses for PC2 and PC3
In this example, the addresses assigned were 192.168.15.100 (PC1), 192.168.15.101 (PC2), and 192.168.15.102 (PC3).
- PC1 should be able to ping the other PCs by hostname

Figure 22 – Testing name resolution - Change the hostname of PC3 to “Computer” AND request a new address to inform the DHCP server of the name change
set pcname computer

Figure 23 – Change PC3 hostname - From PC1, test if pinging Computer resolves to PC3’s IP address

Figure 24 – Testing name resolution after hostname update
- PC1 should be able to ping the other PCs by hostname
Checkpoint
Career Connection
Large enterprise networks may contain thousands of devices that regularly join, leave, or change network locations. Maintaining DNS records manually in these environments is time-consuming and prone to error. Systems administrators and network engineers therefore integrate DHCP and DNS services to automatically register and update host records, ensuring that network resources remain discoverable while reducing administrative overhead. Understanding how Dynamic DNS operates prepares you to manage scalable enterprise infrastructures where automation and service integration are essential for efficient operations.
End of Lab
Deliverables
4 screenshots are needed to receive credit for this exercise:
- PC1 pinging PC2 by name
- PC2 pinging PC3 by name
- PC1 performing a DNS query and resolution with the NS1 server via Wireshark monitoring
- NS1 reports of the DDNS update logs when PC3 joins the network
Homeworks
Assignment 1 – Add the GREEN network to the workspace on the existing router
- Add 3 VPCS devices
- Use a random address space with a /24 prefix
- Modify the router, DHCP, and NS1 to provide the same functionality to the GREEN network that exists on the BLUE network
Assignment 2 – Complete Assignment 1 and then add a PURPLE network
- Add 3 VPCS devices
- Use a random address space with a /24 prefix
- Modify the router, DHCP, and NS1 to provide the same functionality to the PURPLE network that exists on the BLUE and GREEN networks
RECOMMENDED GRADING CRITERIA: Same as deliverables with appropriate substitutions for added devices.
