What's changed: Initial version
4.2DHCP, DNS, and NTP
Covers the DORA operation of DHCP for automatic IP assignment and the roles of server, client, and relay agent (ip helper-address); the role of DNS in resolving hostnames to IPs; and the stratum hierarchy and client/server configuration of NTP for time synchronization—building the judgment to isolate faults such as "hosts on a remote segment get no IP."
Manually configuring an IP address on every device is impractical, so in practice we distribute them automatically via DHCP. We can reach hosts by name because DNS resolves hostnames to IPs behind the scenes, and we can correlate log timestamps because NTP synchronizes device clocks. CCNA tests whether you can, for these three "under the hood" services, judge configuration and fault isolation grounded in how they work. DHCP relay in particular is a frequent real-world trouble spot.
4.2.1DHCP DORA operation and the relay agent
- DHCP leases an address between client and server via the four DORA messages (Discover -> Offer -> Request -> Ack). The initial Discover is sent as a broadcast because the destination is not yet known (the server uses UDP 67, the client UDP 68).
- Because a router does not forward broadcasts to other segments, if the DHCP server is on a different subnet from the client, the Discover never reaches it. Bridging this is the job of the DHCP relay agent: configuring
ip helper-address <server-IP>on the client-facing interface makes the router convert the received DHCP broadcast into a unicast destined for the server and forward it. - To make a Cisco router itself a DHCP server, define
ip dhcp pool <name>->network/default-router/dns-server, and exclude addresses you do not want to hand out (such as the router's IP) withip dhcp excluded-address.
4.2.2The role of DNS
- DNS is the mechanism that resolves a hostname such as
www.example.cominto an IP address. A device receives the address of the DNS server to query (often via DHCP) and converts names to IPs for each communication. - A key isolation cue: if
ping 8.8.8.8(a raw IP) succeeds butping www.example.com(a name) fails, you can conclude that IP reachability is fine and only DNS name resolution is failing. On Cisco devices, specify the DNS server withip name-serverand enable resolution withip domain-lookup.
4.2.3NTP and stratum
- NTP synchronizes device clocks to an accurate reference time. Distance from the time source is expressed as a hierarchical value called stratum: the reference clock (GPS/atomic) is stratum 0, a server directly attached to it is stratum 1, and the number increases by one per hop thereafter. A lower stratum value means closer to the time source and higher trustworthiness (16 means unsynchronized).
- To make a Cisco device an NTP client, simply configure
ntp server <IP>. Verify synchronization withshow ntp status(shows "Clock is synchronized" and the device's own stratum) orshow ntp associations. Accurate time is essential for Syslog, digital-certificate validation, and log correlation.
Most-tested: DHCP Discover is a broadcast, so a server on a different subnet needs an ip helper-address relay; the relay converts the broadcast into a unicast forward; a lower NTP stratum is closer to the time source; ntp server configures the client; and "raw-IP ping works but name ping fails = a DNS problem". A missing DHCP relay is a classic isolation point on both the exam and the job.
Suppose you operate an L3 switch (router) aggregating several subnets, distributing IPs company-wide from a single DHCP server in the head-office server room. One day, only the PCs on a newly added Sales segment (10.20.0.0/24, a different subnet from the server) show "cannot obtain an IP address." A PC on that segment configured manually can ping the DHCP server, so the path (L3 reachability) is fine. Automatic acquisition still fails because DHCP's initial Discover is a broadcast, and a router/L3 switch does not forward broadcasts to a DHCP server on another segment. That other departments' existing segments get addresses fine while only the new segment fails strongly suggests a forgotten ip helper-address <DHCP server IP> on the new segment's gateway interface. Applying ip helper-address 10.10.1.5 (the server's IP) to the Sales SVI makes the router convert the received DHCP broadcast into a unicast to the server and relay it, so DORA completes and addresses are handed out. Thinking "ping to the server works, so DHCP must reach it too" is wrong here—the crux of isolation is the behavioral difference that ping is unicast L3 reachability, while a DHCP Discover is a broadcast that will not cross an L3 boundary without a relay. Likewise, if a site's clock drifts and Syslog cannot be correlated, check whether that device has ntp server configured and whether show ntp status reports synchronized.
| Service | Role | Key configuration | Isolation cue |
|---|---|---|---|
| DHCP | Auto-assigns IP and more (DORA) | ip dhcp pool / ip helper-address across subnets | No IP on a remote segment = missing relay |
| DNS | Resolves hostnames to IPs | ip name-server / ip domain-lookup | Raw-IP ping OK, name ping fails = DNS |
| NTP | Hierarchical time sync (stratum) | ntp server <IP> (client) | show ntp status shows not synchronized |
Trap: "If ping to the DHCP server works, hosts on another subnet should obtain an IP automatically too" is wrong—ping only checks unicast L3 reachability, whereas a DHCP Discover is a broadcast and will not cross an L3 boundary to the server without a relay (ip helper-address). Also wrong: "a higher NTP stratum value is closer to the time source and more accurate"—a lower stratum is closer and more trustworthy (stratum 1 is the top; 16 means unsynchronized).
4.2.4Section summary
- DHCP leases addresses via DORA. Since Discover is a broadcast, a server on a different subnet requires an
ip helper-addressrelay (converting the broadcast into a unicast) - DNS resolves hostnames to IPs. If raw-IP ping works but name ping fails, reachability is fine and DNS resolution is the problem
- NTP synchronizes time, and a lower stratum is closer to the source. The client uses
ntp server <IP>; check state withshow ntp status
Sign in to track progress — Log in.
Quick check
(just a quick review)Q1. Only the PCs on a newly added Sales segment (a different subnet from the DHCP server) cannot obtain an IP address automatically. A manually configured PC on that segment can ping the DHCP server successfully, and other departments' existing segments receive addresses fine. What is the most likely cause?
Q2. From a host, `ping 8.8.8.8` (a raw IP) succeeds, but `ping www.example.com` (a hostname) always fails. What cause is most strongly suggested by this behavior?
Q3. In an environment able to obtain time from several NTP servers, you must decide which to synchronize to as the reference. Which statement about the stratum value is most appropriate?
Keep track of your progress
The full study guide is free to read. Sign up free to practice with the question bank, track what you have read, review your mistakes, and highlight passages.

