DHCP and DNS: Automatic Addressing and Name Resolution

Manually configuring an IP address on every device does not scale, and remembering numeric IP addresses for every service is impractical, which is why DHCP and DNS exist as essential supporting services in nearly every network. This article explains how DHCP automatically assigns IP addressing information, covers configuring a Cisco device as a DHCP server or relay agent, and explains how DNS resolves human-readable names into IP addresses.

DHCP ConfigurationDHCP RelayDNS Resolution

~6 min read · Updated Sep 9, 2026

Why Manual IP Configuration Does Not Scale

Manually configuring an IP address, subnet mask, default gateway, and DNS server on every device, discussed earlier in this series regarding IPv4 addressing, is manageable for a handful of routers and switches, but completely impractical for hundreds or thousands of end-user devices that join and leave a network constantly. DHCP (Dynamic Host Configuration Protocol) solves this by automatically assigning this information to devices as they connect.

The DHCP Process: DORA

A device requesting an address from a DHCP server goes through a four-step exchange commonly remembered by the acronym DORA.

DORA process:

1. Discover: the client broadcasts a request,
   since it has no IP address yet and does not
   know where the DHCP server is

2. Offer: one or more DHCP servers respond with
   an offered IP address and configuration

3. Request: the client broadcasts a request for
   one specific offer (usually the first received)

4. Acknowledge: the chosen server confirms the
   assignment and the client begins using it

This entire exchange relies on broadcast traffic, discussed earlier in this series, since the client has no IP address of its own yet and cannot send a directed (unicast) request to a specific server address.

Configuring a Cisco Device as a DHCP Server

Router(config)# ip dhcp excluded-address 192.168.1.1 192.168.1.10
-- reserves addresses that should never be
-- dynamically assigned (typically the gateway
-- and other statically configured devices)

Router(config)# ip dhcp pool LAN-POOL
Router(dhcp-config)# network 192.168.1.0 255.255.255.0
Router(dhcp-config)# default-router 192.168.1.1
Router(dhcp-config)# dns-server 8.8.8.8
Router(dhcp-config)# lease 7

-- lease 7 sets the address lease time to 7 days,
-- after which a client must renew its assignment

The ip dhcp excluded-address command must be configured before creating the pool for it to be effective, and is easy to forget — without it, the DHCP server could accidentally offer an address already statically assigned to a router interface or server, causing an IP address conflict.

The Problem: DHCP Broadcasts Don't Cross Routers

Since the DHCP discovery process relies entirely on broadcast traffic, and routers do not forward broadcasts between subnets by default, discussed earlier in this series regarding broadcast domains, a DHCP client on one subnet cannot directly reach a DHCP server located on a different subnet.

DHCP Relay: Bridging the Gap Across Subnets

Rather than deploying a separate DHCP server on every subnet, a DHCP Relay Agent, configured on the router interface facing the client's subnet, converts the client's broadcast into a unicast packet directed specifically at the remote DHCP server.

Router(config)# interface gigabitethernet 0/1
Router(config-if)# ip helper-address 192.168.1.10

-- 192.168.1.10 is the address of the actual
-- DHCP server, located on a different subnet
-- than this interface's own network

The ip helper-address command is applied to the interface closest to the requesting clients, and the router forwards the client's DHCP broadcast as a unicast packet to the specified server, then relays the server's response back to the client — allowing a single centralized DHCP server to serve clients across many separate subnets.

Verifying DHCP Operation

Router# show ip dhcp binding

IP address       Client-ID/Hardware address    Lease expiration
192.168.1.11      0100.5056.aa11.22             Jul 15 2026 10:30 AM
192.168.1.12      0100.5056.bb33.44             Jul 15 2026 11:15 AM

Router# show ip dhcp pool LAN-POOL

show ip dhcp binding lists every address currently leased out, along with the requesting device's identifier and when the lease expires — the primary command for confirming DHCP is actually assigning addresses correctly and for identifying which physical device holds a specific IP address.

Why Numeric IP Addresses Alone Are Impractical

Even with addressing automated by DHCP, requiring users to remember and type numeric IP addresses for every service they use would be deeply impractical — nobody wants to type an IP address to visit a website. DNS (Domain Name System) solves this by translating human-readable domain names into the IP addresses computers actually use to communicate.

How DNS Resolution Works

Simplified DNS resolution process:

1. User's device queries a configured DNS server
   for the IP address of "example.com"

2. If the DNS server does not already have this
   answer cached, it queries other DNS servers
   in a hierarchy (root servers, then top-level
   domain servers, then the domain's own
   authoritative server) until it finds the answer

3. The DNS server returns the resolved IP address
   to the user's device, which then connects
   directly to that address

Configuring DNS on a Cisco Device

Router(config)# ip domain-name example.com
Router(config)# ip name-server 8.8.8.8 8.8.4.4

-- allows the router itself to resolve domain
-- names, useful for commands like ping or
-- telnet that accept a hostname instead of
-- requiring a numeric IP address

Router# ping example.com
Translating "example.com"...domain server (8.8.8.8) [OK]

Configuring multiple DNS servers, as shown above, provides redundancy — if the first server does not respond, the device automatically tries the next one, avoiding a total loss of name resolution if a single DNS server becomes unreachable.

Why DHCP and DNS Are Essential Supporting Services

Neither DHCP nor DNS is a routing or switching protocol in the sense of the topics covered elsewhere in this series, but both are essential supporting services without which a modern network would be effectively unusable at any real scale — manually configuring every device's IP address and requiring users to memorize numeric addresses for every service simply does not work beyond a handful of devices. Fluency with configuring, relaying, and troubleshooting both services is a core, everyday skill for any network administrator.

Written & researched by Dr. Shahin Siami

Related Articles

OSPF Fundamentals: Link-State Routing Explained

OSPF is the most widely deployed interior routing protocol in enterprise networks, using a fundamentally different approach than simply exchanging routing tables between neighbors. This article explains what a link-state protocol actually is, how OSPF routers become neighbors and build a shared topology database, how the cost metric determines the best path, and the essential commands for configuring and verifying single-area OSPF.

Continue

Network Address Translation: Sharing Public IP Addresses

The limited supply of public IPv4 addresses made it impossible for every device worldwide to have its own globally unique address, and Network Address Translation solved this by letting many private devices share a small number of public addresses. This article explains the three main NAT types, walks through configuring static NAT, dynamic NAT, and PAT on a Cisco router, and covers the essential commands for verifying active translations.

Continue

Access Control Lists: Filtering Traffic on Cisco Routers

Access Control Lists let a router or switch selectively permit or deny traffic based on source, destination, and protocol information, forming the foundation of basic network security and traffic filtering. This article explains how ACLs process traffic sequentially, covers the difference between standard and extended ACLs, walks through wildcard mask calculation, and explains critical placement rules that determine whether an ACL works as intended.

Continue

Inter-VLAN Routing: Connecting VLANs with Router-on-a-Stick and SVIs

VLANs isolate broadcast domains from each other at Layer 2, but real applications still need devices in different VLANs to communicate, which requires routing between them at Layer 3. This article explains the legacy router-on-a-stick approach using subinterfaces, the modern and more scalable Switch Virtual Interface approach on Layer 3 switches, and the essential configuration and verification commands for both.

Continue

EtherChannel: Combining Multiple Links Into One Logical Connection

Instead of choosing between redundancy and bandwidth, EtherChannel combines multiple physical links into a single logical connection that provides both simultaneously, without Spanning Tree blocking any of the links. This article explains how EtherChannel bundles ports together, compares the PAgP and LACP negotiation protocols used to form a bundle safely, and covers the essential configuration and verification commands.

Continue

Spanning Tree Protocol: Preventing Loops in Switched Networks

Redundant physical links between switches provide fault tolerance but create Layer 2 loops that can bring down an entire network within seconds. This article explains why loops are catastrophic in switched networks, how Spanning Tree Protocol elects a root bridge and blocks redundant paths to prevent them, and the essential commands for verifying STP operation on a Cisco switch.

Continue