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:

dns part3 network diagram
Figure 1 – Network diagram

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

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.

  1. Duplicate the network that you built in the last chapter
  2. Move PC1 to the blue network
  3. Add a Linux server to the red network
    1. Change its hostname to DHCP
    2. 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.

      dns part3 connect vm to internet
      Figure 2 – Connect VM to Internet
    3. Assign it the static address 172.16.16.100/24
  4. 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.

  1. 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.

  2. Update the zones’ filenames in the local configuration

    sudo vi /etc/bind/named.conf.local

    dns part3 zone file path config
    Figure 3 – Updating zone file paths
  3. In the same file, allow the DHCP server to update both zones’ records
    dns part3 allow update
    Figure 4 – Allow DHCP to update zone records
  4. Check for syntax errors

    named-checkconf

  5. Add a new static entry for DHCP
    1. Update the forward zone file

      sudo vi /var/lib/bind/db.red.net

      dns part3 red forward zone file
      Figure 5 – Red forward zone file
    2. Update the reverse zone file

      sudo vi /var/lib/bind/db.red.net.rev

      dns part3 red reverse zone file
      Figure 6 – Red reverse zone file
  6. Remove all static entries in the blue zone files
    1. Update the forward zone file

      sudo vi /var/lib/bind/db.blue.net

      dns part3 blue forward zone
      Figure 7 – Blue forward zone
    2. Update the reverse zone file

      vi /var/lib/bind/db.blue.net.rev

      dns part3 blue reverse zone
      Figure 8 – Blue reverse zone
  7. 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.

  1. Modify the Kea DHCP server

    sudo vi /etc/kea/kea-dhcp4.conf

  2. As in previous chapters, add global lease timers and interface/lease database configurations
    dns part3 kea dhcp config part1
    Figure 9 – Kea DHCP config 1
  3. Add a section to connect the DHCP server to Kea’s DDNS server
    dns part3 kea dhcp config part2
    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.
  4. Add a subnet declaration for the blue network
    dns part3 kea dhcp config part3
    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:

    dns part3 dhcp discover host name
    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.

  5. Here is the full configuration for reference
    dns part3 kea dhcp full config reference
    Figure 13 – Full config reference
  6. Check for syntax errors

    kea-dhcp4 -t /etc/kea/kea-dhcp4.conf

  7. 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.

  1.  Edit Kea’s DDNS server configuration

    sudo vi /etc/kea/kea-dhcp-ddns.conf

  2.  Create a basic server outline
    dns part3 ddns server outline
    Figure 14 – DDNS server outline

    NOTE: Double-check that the IP and port settings here align with the DHCP server configuration.

  3. Point the blue.net forward zone to NS1
    dns part3 ddns server adding forward domain
    Figure 15 – Adding forward domain

    NOTE: Notice how the name “blue.net.” is fully qualified (ends with a dot).

  4. Point the blue.net reverse zone to NS1
    dns part3 kea ddns full config
    Figure 16 – Kea DDNS full config
  5. Check the configuration file for any errors

    kea-dhcp-ddns -t /etc/kea/kea-dhcp-ddns.conf

  6. 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.

  1. Start Wireshark on the DHCP-Switch1 link
  2.  From PC1, request a new address
    dns part3 pc1 show ip
    Figure 17 – PC1 show IP details

    Notice how the DOMAIN NAME and DNS fields were automatically configured by the server.

  3. Filter for DHCP and DNS in the capture session
    dns part3 wireshark ddns update
    Figure 18 – Wireshark DDNS update

    Dynamic updates take place when a client sends a DHCPREQUEST or DHCPRELEASE.

  4. From DHCP, follow DDNS server logs

    journalctl -fu kea-dhcp-ddns-server

    dns part3 ddns journal
    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…

    dns part3 dhcid example
    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.

  5. From NS1, follow Named server logs

    journalctl -fu named

    dns part3 adding an rr
    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).

  6. 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).

    1. PC1 should be able to ping the other PCs by hostname
      dns part3 pc1 ping pc2 and pc3
      Figure 22 – Testing name resolution
    2. Change the hostname of PC3 to “Computer” AND request a new address to inform the DHCP server of the name change

      set pcname computer

      dns part3 change pc3 hostname
      Figure 23 – Change PC3 hostname
    3. From PC1, test if pinging Computer resolves to PC3’s IP address
      dns part3 pc1 ping computer
      Figure 24 – Testing name resolution after hostname update

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.

Feedback email
Figure 00 – Contact us via prmaster@erau.edu

License

Icon for the Creative Commons Attribution-NonCommercial 4.0 International License

Mastering Enterprise Networks (3rd Ed) Copyright © 2026 by Mathew J. Heath Van Horn is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License, except where otherwise noted.