ITNuvoAkademiya
Academy homePackagesPlaylistsToolsSubnet calculatorSearchGlossary
CiscoCCNA · CCNA: networking fundamentals1. Introduction2. Network Fundamentals3. Network Access4. IP Connectivity5. IP Services6. IPv67. Security Fundamentals8. AutomationCCNP: Enterprise networks · coming soon
LinuxLinux: system administrator üçün · Linux for system administrators1. Getting to know Linux2. Working with text3. Users and permissions4. Processes and packages5. Inside the system6. Monitoring and logs7. NetworkingRed Hat Enterprise Linux · Red Hat Enterprise Linux: from beginner to advanced1. Getting started2. Packages3. Users and permissions4. SELinux5. Services6. Storage7. Networking8. Building services9. Boot and recovery10. DevOps11. Security and monitoring
FortinetFortiGate Administrator · FortiGate Administrator: from first login to ZTNA1. Getting to know FortiGate2. Routing, policy and NAT3. Security profiles4. Users and logs5. Resilience, SD-WAN and automation6. VDOM7. VPN and ZTNA8. Proxy9. DMZ
MonitoringZabbix · Zabbix: from installation to alerts1. Introduction2. Installation and the database3. Basics: groups, templates, users4. Connecting devices5. Alerts, Grafana and the API
VirtualizationProxmox VE · coming soonVMware ESXi · coming soon
My account / Sign in
AZENRU
← itnuvo.com

A Cisco router as a DHCP server, and ip helper-address

Lesson 5.17 minIntermediateNovember 4, 2026
Open

This lesson is open to everyone. The other lessons open with a package: sign in or sign up, then choose a package.

Key points

  • ip dhcp pool MYPOOL creates a pool. network says which network to hand out IP addresses for, default-router gives clients their gateway, dns-server their DNS server.
  • ip dhcp excluded-address 192.168.12.10 192.168.12.20 keeps that range from being handed to clients. Be careful: it is a global command, not under the pool.
  • ip address dhcp makes an interface a DHCP client. On the server you check the result with show ip dhcp binding.
  • Routers don't forward broadcasts: if the DHCP server is in another subnet, the client's DHCP Discover never reaches it.
  • The fix: ip helper-address <server IP> on the interface facing the clients. The router sends the DHCP messages to the server as unicast, and the server's reply is relayed back to the client through the router.

A router as a DHCP server

We talked about DHCP and DHCP servers before but never showed the configuration. Let's see how to configure a Cisco router as a DHCP server. The topology:

ClientDHCP192.168.12.0 /24Fa0/0.254 Fa0/0ip address dhcprequests an IPip dhcp pool MYPOOLnetwork 192.168.12.0default-router 192.168.12.254dns-server 8.8.8.8192.168.12.1 /24
Figure 1 · The "DHCP" router hands out an IP address, default gateway and DNS server from its pool
  • On the left is a router called "Client". We'll configure its FastEthernet 0/0 interface as a DHCP client, so it will request an IP address.
  • On the right is a router called "DHCP": this will be our DHCP server.

Server configuration

text
DHCP(config)#interface fastEthernet 0/0
DHCP(config-if)#no shutdown
DHCP(config-if)#ip address 192.168.12.254 255.255.255.0
DHCP(config-if)#exit

DHCP(config)#ip dhcp pool MYPOOL
DHCP(dhcp-config)#network 192.168.12.0
DHCP(dhcp-config)#default-router 192.168.12.254
DHCP(dhcp-config)#dns-server 8.8.8.8
DHCP(dhcp-config)#exit
CommandWhat it does
ip dhcp pool MYPOOLCreates a DHCP pool (named MYPOOL)
network 192.168.12.0Says which network to hand out IP addresses for
default-router 192.168.12.254Gives clients a default gateway (optional)
dns-server 8.8.8.8Gives clients a DNS server (optional); 8.8.8.8 is Google DNS

Keeping some addresses back: excluded-address

Optionally, you can stop certain IP addresses from being handed out to DHCP clients:

text
DHCP(config)#ip dhcp excluded-address 192.168.12.10 192.168.12.20

In this example 192.168.12.10 – 192.168.12.20 will not be given to clients.

Be careful! ip dhcp excluded-address is a global command: the prompt is DHCP(config)#, not (dhcp-config)#. The book's author notes it would have made more sense to configure this under the pool, but that is not how it works.

The client side

text
Client(config)#interface fastEthernet 0/0
Client(config-if)#ip address dhcp
Client(config-if)#no shutdown

We tell the router to configure its IP address through DHCP. This is what you will see on its console:

text
Client#
%DHCP-6-ADDRESS_ASSIGN: Interface FastEthernet0/0 assigned DHCP address
192.168.12.1, mask 255.255.255.0, hostname Client

We received an IP address from the DHCP server. We can also verify this on the server:

text
DHCP#show ip dhcp binding
Bindings from all pools not associated with VRF:
IP address          Client-ID/              Lease expiration        Type
                    Hardware address/
                    User name
192.168.12.1        0063.6973.636f.2d63.    Mar 02 2002 12:06 AM    Automatic
                    3230.372e.3065.3734.
                    2e30.3030.302d.4661.
                    302f.30

The DHCP server has given 192.168.12.1 to the client.

The problem: the DHCP server is in another subnet

DHCP isn't difficult to configure, but there is one issue you might run into:

DHCP ClientR1DHCP Server192.168.12.0 /24192.168.23.0 /24.2 Fa0/0Fa1/0 .2.3Discover (broadcast)routers do not forward broadcastsDHCP ClientR1DHCP Server192.168.12.0 /24192.168.23.0 /24.2 Fa0/0Fa1/0 .2.3Discover (broadcast)unicast → 192.168.23.3ip helper-address 192.168.23.3
Figure 2 · Top: the DHCP Discover is a broadcast and stops at R1. Bottom: with ip helper-address on Fa0/0, R1 relays DHCP messages to the server as unicast

On the left is a DHCP client connected to R1. The DHCP server is on the right side of R1, in another subnet. You will often see this, because most networks have their servers centralized.

When the DHCP client tries to get an IP address and sends a DHCP Discover, what will R1 do?

Routers don't forward broadcasts, so this DHCP Discover will never reach the DHCP server! There is a solution, called ip helper:

text
R1(config)#interface fa0/0
R1(config-if)#ip helper-address 192.168.23.3

This little command forwards the DHCP messages to the DHCP server as unicast. The DHCP server sends the DHCP Offer back to the router so it can be forwarded to the client.

Remember: when there is no DHCP server on the local subnet, use ip helper so the router forwards the DHCP packets to the DHCP server. The command goes on the interface facing the clients (here Fa0/0) and points to the DHCP server's IP address.

Check yourself

5 questions · answers are shown instantly · 3 correct answers complete the lesson

1Which command in a DHCP pool gives clients their default gateway?

default-router gives clients a default gateway; dns-server gives them a DNS server.

2Where is the ip dhcp excluded-address command configured?

It is a global command, not configured under the pool.

3Which command makes a router interface a DHCP client?

ip address dhcp makes the interface get its IP address from a DHCP server.

4The DHCP server is in another subnet and the client gets no IP. Why?

The router doesn't forward the broadcast, so the Discover never reaches the server. The fix is ip helper-address.

5On which R1 interface must ip helper-address 192.168.23.3 be configured?

The helper address goes on the interface where the client's broadcast arrives.
Was this lesson useful?

Comments

Sign in to comment.