Cisco Switch DHCP Configuration

M. Ichsanul Fadhil•November 21, 2026•11 min read

Learn how to forward client DHCP discover broadcasts across router boundaries to a central DHCP server using the Cisco IOS ip helper-address command.

cisco-switch-dhcp.simneta
Topology Preview

In an enterprise network spanning multiple branch offices, managing separate DHCP servers at every physical location is expensive and inefficient.

Updating DNS servers or reserving IP scopes across twenty standalone routers invites human error. Network architects solve this by centralizing all DHCP address pools on a dedicated core server in the corporate data center.

However, client workstations discover DHCP servers using local broadcast frames that routers drop by default. In this lab, we configure router R1 as a DHCP Relay Agent using the Cisco IOS ip helper-address command to bridge remote branch clients across the WAN to central server R2.

The Broadcast Wall: Why Client Requests Stop at Routers

When an employee plugs a laptop into branch switch SW1, the computer has no IP identity. It starts the dynamic configuration handshake by broadcasting a DHCPDISCOVER packet to destination 255.255.255.255:67.

A router's fundamental duty is dividing networks into separate broadcast domains. When branch router R1 hears this broadcast on interface GigabitEthernet0/1, it drops the packet immediately to prevent broadcast traffic from flooding the WAN.

DHCP Broadcast to Unicast Mutation via IP Helper-Address

Figure 1. Packet Mutation: Converting Local Broadcast into Directed WAN Unicast

Without an intermediary, the central DHCP server at headquarters never hears the request, and the branch workstation falls back to an unusable 169.254.x.x APIPA address.

Figure 1 shows the solution: the DHCP Relay Agent. When we apply ip helper-address 203.0.113.1 to R1's client-facing port, R1 intercepts the broadcast, mutates it into a directed unicast packet, and forwards it across the WAN link to server R2.

The GIADDR Secret: How the Server Picks the Right Pool

Central router R2 manages multiple address scopes, including POOL_1 (192.168.1.0/24) for the branch and POOL_2 (192.168.2.0/24) for local headquarters.

When a unicast request arrives at R2 from router R1, how does the server know which subnet pool to lease from?

DHCP GIADDR Gateway IP Address Field Matching Intelligence

Figure 2. Field GIADDR Inspection: Matching Subnets to Address Pools

The secret lies inside the DHCP packet payload shown in Figure 2.

Before forwarding the packet, relay router R1 inserts its own incoming interface IP (192.168.1.1) into a field called GIADDR (Gateway IP Address).

Server R2 reads the GIADDR field, matches 192.168.1.1 to the network statement inside POOL_1, and selects an available address from the branch subnet. It never offers an address from the wrong pool.

Centralized Architecture: Serving Local and Remote Hosts

A single central Cisco IOS router can effortlessly service both local workstations and remote branches at the same time.

Centralized Multi-Subnet DHCP Server Architecture on Cisco IOS

Figure 3. Centralized Multi-Subnet DHCP Architecture on Cisco Router R2

Figure 3 illustrates this dual operational flow:

  • Local HQ Workstation (PC2): Connects directly to switch SW2. R2 hears the local broadcast on GigabitEthernet0/1 and leases an IP from POOL_2.
  • Remote Branch Workstation (PC1): Broadcasts on switch SW1. Router R1 converts the frame to unicast and routes it across the 203.0.113.0/30 WAN link. R2 services the request from POOL_1.

Always exclude static infrastructure addresses before activating pools. In our setup, R2 reserves 192.168.1.1 - .10, 192.168.2.1 - .10, and WAN transit IP 203.0.113.1.

The Addressing & Relay Network Plan

Here is the complete network mapping for both router interfaces, client subnets, and transit links:

Device Interface IP Address Subnet Mask Physical Role
R1 GigabitEthernet0/1 192.168.1.1 255.255.255.0 Branch LAN Gateway & Relay Agent
R1 GigabitEthernet0/0 203.0.113.2 255.255.255.252 Branch WAN Uplink
R2 GigabitEthernet0/0 203.0.113.1 255.255.255.252 Central DHCP Server WAN Port
R2 GigabitEthernet0/1 192.168.2.1 255.255.255.0 HQ LAN Gateway
PC1 FastEthernet0 Dynamic (.1.x) 255.255.255.0 Remote Branch Client (via Relay)
PC2 FastEthernet0 Dynamic (.2.x) 255.255.255.0 Local HQ Client

Step-by-Step Configuration on R1 and R2

Follow these sequential configuration steps to configure the central pools on R2 and enable the relay agent on R1:

1

Configure Exclusions and Multi-Subnet Pools on R2

Exclude infrastructure gateways, then create POOL_1 for branch clients and POOL_2 for local headquarters clients.

R2(config)# ip dhcp excluded-address 192.168.1.1 192.168.1.10
R2(config)# ip dhcp excluded-address 192.168.2.1 192.168.2.10
R2(config)# ip dhcp excluded-address 203.0.113.1
R2(config)# ip dhcp pool POOL_1
R2(dhcp-config)# network 192.168.1.0 255.255.255.0
R2(dhcp-config)# default-router 192.168.1.1
R2(dhcp-config)# dns-server 8.8.8.8
R2(dhcp-config)# exit
R2(config)# ip dhcp pool POOL_2
R2(dhcp-config)# network 192.168.2.0 255.255.255.0
R2(dhcp-config)# default-router 192.168.2.1
R2(dhcp-config)# dns-server 8.8.8.8
2

Configure IP Helper-Address on Branch Router R1

Apply the helper address directly to the interface that receives client broadcasts (Gi0/1), pointing to R2's WAN address.

R1(config)# interface GigabitEthernet0/1
R1(config-if)# ip helper-address 203.0.113.1
R1(config-if)# exit

Verification and Centralized Lease Inspection

Once the relay agent is active, trigger a DHCP refresh on both PC1 and PC2.

To verify that both local and remote clients obtained valid leases, run show ip dhcp binding on central server R2:

R2# show ip dhcp binding
Bindings from all pools :
IP address          Client-ID/              Lease expiration        Type
                    Hardware address/
                    User name
192.168.1.11        0001.64bc.1a01          Infinite                Automatic
192.168.2.11        0002.43ba.2c09          Infinite                Automatic
Centralized DHCP Binding Resolution and End-to-End Ping Flow

Figure 4. Centralized Lease Bindings and Two-Way Multi-Hop Communication

As shown in Figure 4, server R2 maintains full visibility of client hardware MAC addresses from both subnets in a single table.

Finish verification by sending a ping from branch client PC1 (192.168.1.11) to headquarters client PC2 (192.168.2.11). The successful reply confirms that DHCP relay, default gateway routing, and end-to-end IP reachability are functioning flawlessly across the enterprise.

Discussion & Community Notes

Ask questions, share configuration solutions, or discuss this practice lab.

0 Comments
Posting as Guest • 1-level replies supported