β οΈ Prima di leggere: hai controllato show ip dhcp pool e i contatori di show ip dhcp binding? Guarda quanti indirizzi sono disponibili nel pool.
BUG 1
excluded-address esclude tutta la subnet 192.168.1.0/24 dal pool LAN1
π Come identificarlo:
R1# show ip dhcp pool
Pool LAN1:
Network: 192.168.1.0/24
Available addresses: 0 β pool vuoto!
R1# show run | section dhcp
ip dhcp excluded-address 192.168.1.0 192.168.1.254
β esclude tutto! Solo .255 (broadcast) non escluso
π§ Fix:
R1# conf t
R1(config)# no ip dhcp excluded-address 192.168.1.0 192.168.1.254
R1(config)# ip dhcp excluded-address 192.168.1.1 192.168.1.10
β esclude solo i primi 10 (router, server, infra)
PerchΓ© funziona: ip dhcp excluded-address esclude un range di indirizzi dall'assegnazione. Con 192.168.1.0 192.168.1.254 viene escluso praticamente tutto il pool β solo il broadcast (.255) resta, ma non Γ¨ assegnabile. La correzione esclude solo i primi indirizzi riservati all'infrastruttura.
BUG 2
Pool LAN2 β default-router punta a 192.168.2.2 invece di 192.168.2.1
π Come identificarlo:
R1# show ip dhcp pool
Pool LAN2:
Network: 192.168.2.0/24
Default router: 192.168.2.2 β R2 Γ¨ .1 non .2!
DNS: 8.8.8.8
π§ Fix:
R1# conf t
R1(config)# ip dhcp pool LAN2
R1(config-dhcp)# default-router 192.168.2.1
PerchΓ© funziona: il default-router nel pool DHCP Γ¨ l'indirizzo che viene comunicato ai client come gateway predefinito (opzione DHCP 3). Se sbagliato, i client configurano un gateway inesistente e non riescono a uscire dalla subnet locale.
BUG 3
R2 Gi0/1 β helper-address punta a 10.0.0.3 invece di 10.0.0.1
π Come identificarlo:
R2# show run | section interface
interface GigabitEthernet0/1
description *** LAN2 ***
ip address 192.168.2.1 255.255.255.0
ip helper-address 10.0.0.3 β R1 Γ¨ 10.0.0.1!
π§ Fix:
R2# conf t
R2(config)# interface GigabitEthernet0/1
R2(config-if)# no ip helper-address 10.0.0.3
R2(config-if)# ip helper-address 10.0.0.1
PerchΓ© funziona: ip helper-address indica a R2 dove forwardare i pacchetti broadcast DHCP (Discover/Request). Con l'indirizzo sbagliato, i pacchetti vengono inviati a un host inesistente e il server DHCP reale (R1 a 10.0.0.1) non li riceve mai.
π§ Come ragionare su un problema DHCP
Passo 1 β Verifica il pool
show ip dhcp pool β il pool esiste? Ha indirizzi disponibili (Available)? Se Available = 0 controlla gli excluded-address.
Passo 2 β Verifica i binding
show ip dhcp binding β ci sono assegnazioni attive? Se sΓ¬, il DHCP funziona ma forse i parametri (gateway, DNS) sono sbagliati. Se no, il server non risponde.
Passo 3 β Verifica la config del pool
show run | section dhcp β controlla network, default-router, dns-server, excluded-address. Il default-router deve corrispondere all'IP del router su quella subnet.
Passo 4 β Per subnet remote: verifica il relay
show run | section interface su R2 β c'Γ¨ ip helper-address sull'interfaccia LAN? Punta all'IP corretto del server DHCP?
π Concetti chiave β DHCP
Processo DORA
Discover β broadcast del client
Offer β unicast del server
Request β broadcast del client
Ack β conferma del server
Il relay converte il broadcast in unicast verso il server
excluded-address
Esclude indirizzi dal pool DHCP.
Sintassi: ip dhcp excluded-address <start> [<end>]
Usato per router, server, stampanti.
Attenzione: se escludi troppo il pool si svuota.
ip helper-address
Forwarda i broadcast DHCP (e altri UDP) verso un server unicast.
Configurato sull'interfaccia LAN del router relay.
Deve puntare all'IP del server DHCP.
Converte: broadcast β unicast
default-router nel pool
Opzione DHCP 3 β indirizzo gateway per i client.
Deve essere l'IP del router sulla stessa subnet del pool.
Pool LAN1 β default-router 192.168.1.1
Pool LAN2 β default-router 192.168.2.1
show ip dhcp pool β pool, network, available addresses
show ip dhcp binding β assegnazioni attive (client-ip, MAC)
show ip dhcp conflict β conflitti IP rilevati
show ip dhcp statistics β discover/offer/request/ack contatori
show run | section dhcp β excluded, pool config
show run | section interface β helper-address su R2
π Teoria β Bug 1: excluded-address troppo ampio
Il range 192.168.1.0 192.168.1.254 esclude tutti gli indirizzi usabili della /24 β dal network address (.0) al broadcast-1 (.254). Il risultato Γ¨ un pool con zero indirizzi disponibili. show ip dhcp pool mostra "Available: 0" β il segnale diagnostico piΓΉ veloce. La best practice Γ¨ escludere solo il range basso (es. .1-.10) per router e server fissi.
π Teoria β Bug 2: default-router sbagliato
Il default-router nel pool DHCP Γ¨ l'opzione 3 β viene comunicata al client nel pacchetto DHCP Offer/Ack. Il client la usa come gateway predefinito senza verificarne la raggiungibilitΓ . Se il gateway Γ¨ sbagliato, il client ha un IP valido ma non riesce a uscire dalla subnet β il ping verso l'esterno fallisce ma il ping verso host nella stessa subnet funziona. Questo sintomo β connettivitΓ locale ok, Internet no β Γ¨ il segnale che punta al default-router errato.
π Teoria β Bug 3: helper-address sbagliato
ip helper-address trasforma i broadcast DHCP in pacchetti unicast diretti al server. Se l'IP Γ¨ sbagliato, i pacchetti vengono routati verso un host inesistente β il server DHCP reale non riceve nulla. show ip dhcp statistics su R1 mostrerΓ 0 Discover ricevuti dalla subnet remota. Il modo piΓΉ rapido per verificare: confrontare l'IP nel helper-address con l'IP dell'interfaccia WAN di R1.
π¬π§ English version β Cisco official terminology for CCNA exam preparation.
BUG 1
excluded-address range covers entire 192.168.1.0/24 subnet β pool is empty
π How to identify:
R1# show ip dhcp pool
Pool LAN1:
Network: 192.168.1.0/24
Available: 0 β pool exhausted!
Leased: 0
R1# show run | section dhcp
ip dhcp excluded-address 192.168.1.0 192.168.1.254
π§ Fix:
R1# configure terminal
R1(config)# no ip dhcp excluded-address 192.168.1.0 192.168.1.254
R1(config)# ip dhcp excluded-address 192.168.1.1 192.168.1.10
Why this works: The ip dhcp excluded-address command reserves addresses that DHCP should never assign. Excluding .0 through .254 leaves only .255 (broadcast) β which is not assignable β resulting in zero available addresses. Fix: exclude only the infrastructure range (.1 through .10).
π Key concept β ip dhcp excluded-address
β’ Syntax: ip dhcp excluded-address <low> [<high>]
β’ Best practice: exclude .1 to .10 for routers, servers, printers
β’ Diagnostic: show ip dhcp pool β Available: 0 = excluded too many
β’ Must be configured before the pool (global config, not inside pool)
BUG 2
Pool LAN2 β default-router points to 192.168.2.2 (wrong gateway)
π How to identify:
R1# show ip dhcp pool
Pool LAN2:
Network: 192.168.2.0/24
Default router: 192.168.2.2 β R2 LAN IP is .1 not .2!
DNS server: 8.8.8.8
π§ Fix:
R1# configure terminal
R1(config)# ip dhcp pool LAN2
R1(config-dhcp)# default-router 192.168.2.1
Why this works: The default-router command configures DHCP Option 3, which is sent to clients as their default gateway. The IP must match the router interface on the same subnet as the pool. With the wrong gateway, clients get an IP address but cannot route traffic beyond their local subnet.
π Key concept β DHCP Options
β’ Option 3 (default-router): client's default gateway
β’ Option 6 (dns-server): DNS server address
β’ Option 51 (lease): IP address lease duration
β’ Must match the router IP on that specific subnet
BUG 3
R2 Gi0/1 β helper-address points to 10.0.0.3 (nonexistent host)
π How to identify:
R2# show run | section interface
interface GigabitEthernet0/1
ip address 192.168.2.1 255.255.255.0
ip helper-address 10.0.0.3 β R1 WAN is 10.0.0.1!
π§ Fix:
R2# configure terminal
R2(config)# interface GigabitEthernet0/1
R2(config-if)# no ip helper-address 10.0.0.3
R2(config-if)# ip helper-address 10.0.0.1
Why this works: ip helper-address converts DHCP broadcast (255.255.255.255) into unicast packets sent to the specified server IP. With the wrong IP, packets are routed to a nonexistent host β the real DHCP server (R1 at 10.0.0.1) never receives the Discover messages.
π Key concept β ip helper-address
β’ Configured on the LAN-facing interface of the relay router
β’ Points to the DHCP server's IP address (usually WAN IP of R1)
β’ Forwards: DHCP (67/68), TFTP (69), DNS (53), NTP (123), and others
β’ Diagnostic: show ip dhcp statistics on R1 β 0 Discovers from remote subnet = helper-address wrong
π―
Exam Practice β DHCP Troubleshooting
3 questions Β· CCNA 200-301 style Β· answer before checking
0/3
Q1.
A network administrator runs show ip dhcp pool and sees "Available: 0" for the LAN1 pool (192.168.1.0/24). What is the most likely cause?
A) All IP addresses in the pool have been assigned to clients
B) The ip dhcp excluded-address command excludes the entire usable range of the subnet
C) The DHCP pool network statement does not match the interface subnet
D) The router requires ip dhcp server enable to activate the service
Q2.
Hosts in a remote subnet receive IP addresses from DHCP but cannot ping the default gateway or reach the Internet. The DHCP server is on a different router. What should the administrator check first?
A) The ip helper-address on the relay router β it may point to the wrong server
B) The default-router value in the DHCP pool β it may not match the gateway of that subnet
C) The excluded-address range β too many addresses may have been excluded
D) The lease time in the DHCP pool β it may have expired
Q3.
A router (R2) needs to relay DHCP requests from its LAN (192.168.2.0/24) to a DHCP server at 172.16.0.1. Which command correctly configures the relay on R2's LAN interface?
A) ip dhcp relay-agent 172.16.0.1
B) ip helper-address 172.16.0.1
C) ip dhcp server 172.16.0.1
D) ip forward-protocol udp 67 172.16.0.1