Skip to content

Commit 7c09477

Browse files
committed
feat: add DHCP (v4/v6) and DNS fault injection scenarios
1 parent fefdd46 commit 7c09477

2 files changed

Lines changed: 467 additions & 0 deletions

File tree

injection/dhcp_issues.yaml

Lines changed: 258 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,258 @@
1+
# SPDX-License-Identifier: GPL-3.0-or-later
2+
#
3+
# GNS3-Skills - Network troubleshooting skills repository
4+
#
5+
# Copyright (C) 2025 Yue Guobin
6+
#
7+
8+
name: "DHCP Issues Injection"
9+
description: "DHCP server, DHCP relay, DHCPv6, prefix delegation related network faults for troubleshooting practice"
10+
category: "injection"
11+
protocols:
12+
- dhcp
13+
- dhcpv6
14+
- dhcp-relay
15+
- dhcp-server
16+
17+
issues:
18+
# DHCP Server Issues
19+
20+
dhcp_pool_exhausted:
21+
name: "DHCP Address Pool Exhausted"
22+
description: "Configure DHCP pool too small for number of clients causing new clients unable to obtain addresses"
23+
severity: "high"
24+
difficulty: "beginner"
25+
protocols:
26+
- dhcp
27+
symptoms:
28+
- "New DHCP clients fail to obtain IP address"
29+
- "DHCP server logs 'address pool exhausted'"
30+
- "Manual static IP works but DHCP does not"
31+
- "Some hosts get IP while new ones cannot"
32+
troubleshooting_hints:
33+
- "Check DHCP pool usage with 'show ip dhcp binding'"
34+
- "Verify 'network <prefix> <mask>' address range"
35+
- "Use 'ip dhcp excluded-address' to check reserved range"
36+
- "Default lease time is 1 day (reduces churn)"
37+
- "Increase pool size or reduce lease time"
38+
- "Check 'show ip dhcp pool <name>' for utilization statistics"
39+
applicability: "All DHCP server deployments"
40+
41+
dhcp_wrong_subnet:
42+
name: "DHCP Pool Subnet / Default Gateway Mismatch"
43+
description: "Configure DHCP pool with wrong subnet or default-router not matching client VLAN"
44+
severity: "high"
45+
difficulty: "beginner"
46+
protocols:
47+
- dhcp
48+
symptoms:
49+
- "DHCP clients receive IP addresses but cannot reach default gateway"
50+
- "Default gateway IP different from client subnet"
51+
- "Hosts get IP but have no network connectivity"
52+
- "Ping to default gateway fails despite DHCP success"
53+
troubleshooting_hints:
54+
- "Check 'default-router <ip>' in DHCP pool matches client subnet"
55+
- "Verify 'network <network> <mask>' covers client subnet"
56+
- "Client gets address from DHCP but routing fails if gw wrong"
57+
- "Use 'show ip dhcp pool' to verify pool configuration"
58+
- "DHCP options: 3 (default-router), 6 (dns-server)"
59+
- "Ping the default gateway from a client to verify"
60+
applicability: "DHCP server provisioning"
61+
62+
dhcp_static_wrong:
63+
name: "DHCP Static / Manual Binding Misconfiguration"
64+
description: "Configure DHCP static binding (reservation) with wrong MAC address or IP"
65+
severity: "medium"
66+
difficulty: "beginner"
67+
protocols:
68+
- dhcp
69+
symptoms:
70+
- "Specific host does not get the reserved IP address"
71+
- "IP assigned to different device than expected"
72+
- "MAC mismatch between DHCP binding and client"
73+
- "Duplicate IP due to reservation overlapping with pool"
74+
troubleshooting_hooks:
75+
- "DHCP manual binding: 'ip dhcp pool <name>' then 'host <ip> <mask>' and 'hardware-address <mac>'"
76+
- "Verify MAC address format: xxxx.xxxx.xxxx (Cisco format)"
77+
- "Check 'show ip dhcp binding' for active reservations"
78+
- "If client MAC does not match reservation: client gets dynamic address"
79+
- "If reserved IP in pool range: possible duplicate IP"
80+
- "Use 'show run | section ip dhcp pool' to review all bindings"
81+
applicability: "DHCP reservations for servers or infrastructure"
82+
83+
# DHCP Relay Issues
84+
85+
dhcp_relay_udp:
86+
name: "DHCP Relay / UDP 67/68 Forwarding Failure"
87+
description: "Configure DHCP relay (ip helper-address) but DHCP discover/offer not forwarded"
88+
severity: "critical"
89+
difficulty: "intermediate"
90+
protocols:
91+
- dhcp
92+
- dhcp-relay
93+
symptoms:
94+
- "DHCP clients in relay VLAN cannot get IP address"
95+
- "DHCP discover never reaches the server"
96+
- "DHCP server responds but reply not forwarded back"
97+
- "Only directly connected VLAN clients get IP"
98+
troubleshooting_hooks:
99+
- "DHCP relay: 'ip helper-address <server-ip>' on VLAN interface"
100+
- "Relay forwards UDP 67/68 broadcasts as unicast to server"
101+
- "Check 'show ip interface <vlan>' for helper-address configuration"
102+
- "Verify IP routing between relay agent and DHCP server"
103+
- "Relay inserts Option 82 (giaddr) for server to know source subnet"
104+
- "Check firewall: UDP 67/68 must be routable between relay and server"
105+
applicability: "Multi-VLAN DHCP deployments with centralized server"
106+
107+
dhcp_relay_giaddr:
108+
name: "DHCP Relay giaddr / Source Subnet Identification Error"
109+
description: "Configure DHCP relay but giaddr (gateway address) not set correctly causing server fails to assign correct subnet"
110+
severity: "high"
111+
difficulty: "intermediate"
112+
protocols:
113+
- dhcp
114+
- dhcp-relay
115+
symptoms:
116+
- "DHCP clients receive IP from wrong subnet pool"
117+
- "Server cannot determine which pool to allocate from"
118+
- "Relay giaddr missing or set to wrong IP"
119+
- "Client gets IP that does not match its VLAN"
120+
troubleshooting_hooks:
121+
- "Relay sets giaddr = primary IP of the incoming interface"
122+
- "DHCP server uses giaddr to select which pool to use"
123+
- "If giaddr is missing or wrong: server picks wrong pool or no pool"
124+
- "Check 'show ip dhcp relay' for relay statistics"
125+
- "Use debug: 'debug ip dhcp server' to see giaddr in requests"
126+
- "Ensure interface has IP in the expected subnet for the client VLAN"
127+
applicability: "DHCP relay with multiple subnets"
128+
129+
dhcp_relay_uc:
130+
name: "DHCP Unicast Reply / Server Unreachable for Unicast"
131+
description: "Configure DHCP relay but server cannot reach client via unicast for ACK/NAK"
132+
severity: "high"
133+
difficulty: "intermediate"
134+
protocols:
135+
- dhcp
136+
- dhcp-relay
137+
symptoms:
138+
- "DHCP DISCOVER/OFFER works but ACK fails"
139+
- "Client gets to SELECTING state but never gets ACK"
140+
- "DHCP relay forwards discovery but reply fails"
141+
- "Intermittent DHCP success"
142+
troubleshooting_hooks:
143+
- "After relay forwards DISCOVER to server: server responds via unicast to relay"
144+
- "Relay must be reachable from DHCP server via unicast"
145+
- "VERIFY: 'ping <relay-ip>' from DHCP server"
146+
- "Route back from server to relay IP + client subnet required"
147+
- "Check extended ACL on relay that may block unicast DHCP replies"
148+
- "Use 'debug ip dhcp server events' to track packet flow"
149+
applicability: "DHCP relay across routed segments"
150+
151+
# DHCP Options Issues
152+
153+
dhcp_option_missing:
154+
name: "DHCP Option / Additional Parameters Missing"
155+
description: "Configure DHCP pool without essential options causing client operation issues"
156+
severity: "medium"
157+
difficulty: "beginner"
158+
protocols:
159+
- dhcp
160+
symptoms:
161+
- "DHCP clients get IP but cannot resolve hostnames (no DNS)"
162+
- "DHCP clients cannot reach outside network (no domain-list)"
163+
- "PXE/network boot clients fail (no next-server/option 66)"
164+
- "IP phones cannot find call manager (option 150)"
165+
troubleshooting_hooks:
166+
- "Common DHCP options: 3 (router), 6 (dns), 15 (domain), 150 (tftp-server)"
167+
- "Configure: 'dns-server <ip>', 'domain-name <name>', 'option <num> <value>'"
168+
- "Check 'show ip dhcp pool <name>' for configured options"
169+
- "Use 'default-router', 'dns-server', 'domain-name' sub-commands"
170+
- "Option 150 (tftp) for Cisco IP phones"
171+
- "Option 66/67 for PXE network boot"
172+
applicability: "DHCP with application-specific options"
173+
174+
dhcp_lease_time:
175+
name: "DHCP Lease Time / Renewal Misconfiguration"
176+
description: "Configure DHCP lease time too short causing excessive renewal traffic or too long causing address depletion"
177+
severity: "low"
178+
difficulty: "beginner"
179+
protocols:
180+
- dhcp
181+
symptoms:
182+
- "Frequent DHCP renewal requests filling server logs"
183+
- "DHCP server high CPU due to lease renewals"
184+
- "Address pool depletion due to long lease times"
185+
- "Clients fail to renew before lease expiry"
186+
troubleshooting_hooks:
187+
- "Lease time: 'lease {days [hours [minutes]] | infinite}'"
188+
- "Default: 1 day (86400 seconds)"
189+
- "Short lease = frequent renewals, faster address turnover"
190+
- "Long lease = fewer renewals, slower address recovery"
191+
- "Client renews at roughly 50% and 87.5% of lease time"
192+
- "Check 'show ip dhcp binding' for lease expiration times"
193+
applicability: "DHCP lease time optimization"
194+
195+
# DHCPv6 Issues
196+
197+
dhcpv6_stateless:
198+
name: "DHCPv6 Stateless / Stateful Mode Misconfiguration"
199+
description: "Configure DHCPv6 with wrong mode (stateless vs stateful) for client needs"
200+
severity: "high"
201+
difficulty: "intermediate"
202+
protocols:
203+
- dhcpv6
204+
symptoms:
205+
- "DHCPv6 clients do not receive IPv6 addresses"
206+
- "Clients get other-config but no managed address"
207+
- "IPv6 SLAAC works but DHCPv6 assigned address missing"
208+
- "Stateless DHCPv6 providing addresses incorrectly"
209+
troubleshooting_hooks:
210+
- "DHCPv6 modes: stateless (SLAAC + other config), stateful (managed addresses)"
211+
- "ND flags: 'ipv6 nd managed-config-flag' (stateful), 'ipv6 nd other-config-flag' (stateless)"
212+
- "Stateful: DHCPv6 server assigns /64 or /128 addresses"
213+
- "Stateless: SLAAC addresses + DHCPv6 provides DNS, domain, etc."
214+
- "Check 'show ipv6 dhcp interface <intf>' for DHCPv6 mode"
215+
- "Both flags cannot be unset for DHCPv6 to work"
216+
applicability: "DHCPv6 for IPv6 address assignment"
217+
218+
dhcpv6_pd:
219+
name: "DHCPv6 Prefix Delegation / Prefix Pool Misconfiguration"
220+
description: "Configure DHCPv6 prefix delegation (PD) but CE does not receive delegated prefix"
221+
severity: "high"
222+
difficulty: "advanced"
223+
protocols:
224+
- dhcpv6
225+
symptoms:
226+
- "CPE router does not receive IPv6 prefix via DHCPv6 PD"
227+
- "DHCPv6 IA-PD option missing from server response"
228+
- "CE router cannot assign global IPv6 addresses downstream"
229+
- "DHCPv6 prefix pool exhausted"
230+
troubleshooting_hooks:
231+
- "DHCPv6 PD: 'ipv6 dhcp pool <name>' then 'prefix-delegation pool <pool-name>'"
232+
- "CE requests: 'ipv6 dhcp client pd <name>' on WAN interface"
233+
- "Check 'show ipv6 dhcp binding' for prefix delegation bindings"
234+
- "Verify prefix pool has available prefixes"
235+
- "IA-PD lifetime must not expire before renewal"
236+
- "Check 'show ipv6 dhcp interface' for PD status"
237+
applicability: "ISP IPv6 prefix delegation deployments"
238+
239+
dhcpv6_rapid_commit:
240+
name: "DHCPv6 Rapid Commit / Two-Way Exchange Failure"
241+
description: "Configure DHCPv6 rapid commit on server but client does not support two-way exchange"
242+
severity: "medium"
243+
difficulty: "intermediate"
244+
protocols:
245+
- dhcpv6
246+
symptoms:
247+
- "DHCPv6 rapid commit not used despite configuration"
248+
- "Client falls back to four-way exchange (SOLICIT-ADVERTISE-REQUEST-REPLY)"
249+
- "Rapid commit option missing from server reply"
250+
- "Longer DHCPv6 exchange time than expected"
251+
troubleshooting_hooks:
252+
- "Rapid commit: two-way exchange (SOLICIT-REPLY) instead of four-way"
253+
- "Server: 'ipv6 dhcp server <pool> [rapid-commit]'"
254+
- "Client must include rapid-commit option in SOLICIT"
255+
- "If client does not support rapid-commit: falls back to four-way"
256+
- "Check 'debug ipv6 dhcp detail' for option codes"
257+
- "Rapid commit reduces address assignment latency"
258+
applicability: "DHCPv6 performance optimization"

0 commit comments

Comments
 (0)