CCNA Network Services and Security Practice Question
Exhibit
VLAN 20 clients: 10.20.20.0/24 DHCP server: 10.99.99.10 Clients and server are in different subnets
Exhibit: PCs in VLAN 20 are not receiving addresses from a DHCP server in another subnet. The switch SVI for VLAN 20 is up, and routing is working. Which configuration is most likely missing on the gateway for VLAN 20?
⚠ Common exam trap
A frequent exam trap is selecting the ip default-gateway command as the solution for DHCP relay issues. This command only applies to Layer 2 switches for their own management traffic and does not forward DHCP broadcasts across routed interfaces. Candidates may also mistakenly focus on VLAN trunking or spanning-tree settings, which do not affect DHCP relay functionality. The key is to recognize that DHCP broadcasts must be explicitly forwarded by the router or Layer 3 switch interface using ip helper-address to reach a DHCP server in another subnet.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
ip helper-address 10.99.99.10
DHCP Discover messages are broadcasts and do not cross routers by default. An ip helper-address on the client gateway interface relays those requests to a remote DHCP server.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
ip default-gateway 10.20.20.1
Why it's wrong here
ip default-gateway assigns a gateway for the switch's own management VLAN, enabling the admin to reach the switch remotely for management purposes. It does nothing for client PCs that obtain their addresses from DHCP, nor does it instruct the switch to forward client broadcasts toward a DHCP server. The PCs in VLAN 20 already use 10.20.20.1 as their gateway via the router/SVI; setting a static default-gateway on the switch does not relay DHCP messages to the remote server.
When this WOULD be correct
In a different question setup where the focus is on configuring a standalone host or a router that needs to reach a default gateway for local traffic, the option 'ip default-gateway 10.20.20.1' would be correct. For example, if the question asked about configuring a PC in VLAN 20 to communicate with a router in the same subnet, this command would be appropriate.
- ✓
ip helper-address 10.99.99.10
Why this is correct
DHCP relies on broadcast discovery, and broadcasts do not cross Layer 3 boundaries. The PCs in VLAN 20 cannot reach the DHCP server on a different subnet unless the VLAN 20 SVI has ip helper-address 10.99.99.10 configured. That command converts the client broadcast into a unicast relayed to the server, while also inserting the SVI IP as the giaddr so the server can scope an appropriate address. Therefore, this is the missing configuration.
- ✗
switchport trunk allowed vlan 20
Why it's wrong here
This command limits which VLANs are allowed to pass traffic over a trunk link, yet the exhibit already places PCs in VLAN 20 on access ports. A trunk would matter only if the DHCP server shared the same VLAN 20 at Layer 2 but sat beyond a switch-to-switch trunk. Since the intended server is on a different subnet, DHCP broadcasts still fail without relay—trunk permission is irrelevant to crossing the Layer 3 boundary.
When this WOULD be correct
In a scenario where the question asks about ensuring that a trunk port is correctly configured to allow VLAN 20 traffic to pass between switches, 'switchport trunk allowed vlan 20' would be the correct answer. This would be relevant if the question focused on VLAN propagation across trunk links.
- ✗
spanning-tree portfast default
Why it's wrong here
PortFast is a per-port STP optimization that moves an access port into the forwarding state immediately, eliminating the listening and learning delay. It is purely a Layer 2 loop-prevention feature and has no effect on IP processes such as DHCP discovery or relay. Since the problem is an inter-subnet broadcast forwarding failure, enabling spanning-tree portfast default would not correct the DHCP allocation issue.
When this WOULD be correct
In a scenario where the question asks about optimizing the DHCP response time for end devices connected to access ports in a VLAN, 'spanning-tree portfast default' would be correct. This would apply if the focus was on reducing the time it takes for devices to start communicating on the network after being powered on.
Option-by-option analysis
Why each answer is right or wrong
Understanding why wrong answers are wrong — and when they would be correct — is what separates a 750 score from a 900. The 200-301 exam frequently reuses these exact scenarios with slightly different constraints.
✓ip helper-address 10.99.99.10Correct answer▾
Why this is correct
DHCP relies on broadcast discovery, and broadcasts do not cross Layer 3 boundaries. The PCs in VLAN 20 cannot reach the DHCP server on a different subnet unless the VLAN 20 SVI has ip helper-address 10.99.99.10 configured. That command converts the client broadcast into a unicast relayed to the server, while also inserting the SVI IP as the giaddr so the server can scope an appropriate address. Therefore, this is the missing configuration.
✗ip default-gateway 10.20.20.1Wrong answer — click to see why▾
Why this is wrong here
The option 'ip default-gateway 10.20.20.1' is incorrect because it is used for configuring the default gateway on a host, not on a router or switch interface. In this scenario, the issue is related to DHCP relay, which requires the 'ip helper-address' command instead.
★ When this WOULD be the correct answer
In a different question setup where the focus is on configuring a standalone host or a router that needs to reach a default gateway for local traffic, the option 'ip default-gateway 10.20.20.1' would be correct. For example, if the question asked about configuring a PC in VLAN 20 to communicate with a router in the same subnet, this command would be appropriate.
Why candidates choose this
Candidates may find this option tempting because it relates to gateway configuration, which is a common task in network setups. They might mistakenly believe that any gateway-related command would be relevant to the DHCP issue presented.
✗switchport trunk allowed vlan 20Wrong answer — click to see why▾
Why this is wrong here
The option 'switchport trunk allowed vlan 20' is incorrect because it pertains to configuring trunk ports on switches, not directly related to enabling DHCP relay for VLAN 20. The issue described is about DHCP address assignment across subnets, which is not resolved by trunking configurations.
★ When this WOULD be the correct answer
In a scenario where the question asks about ensuring that a trunk port is correctly configured to allow VLAN 20 traffic to pass between switches, 'switchport trunk allowed vlan 20' would be the correct answer. This would be relevant if the question focused on VLAN propagation across trunk links.
Why candidates choose this
Candidates may choose this option because they recognize the importance of VLAN configurations in switch operations, leading them to mistakenly associate trunking with the DHCP issue instead of focusing on the need for a helper address.
✗spanning-tree portfast defaultWrong answer — click to see why▾
Why this is wrong here
This option is wrong because 'spanning-tree portfast default' is related to enabling PortFast on access ports, which does not address the issue of DHCP relay for VLAN 20. The problem lies in the DHCP relay configuration, not spanning-tree settings.
★ When this WOULD be the correct answer
In a scenario where the question asks about optimizing the DHCP response time for end devices connected to access ports in a VLAN, 'spanning-tree portfast default' would be correct. This would apply if the focus was on reducing the time it takes for devices to start communicating on the network after being powered on.
Why candidates choose this
Candidates might choose this option due to a misunderstanding of the role of spanning-tree in network configurations, believing that it directly impacts DHCP functionality without recognizing the specific need for DHCP relay settings.
Analysis generated from the official 200-301blueprint and verified against question context. The “when correct” sections are what AI assistants cite when candidates ask “what’s the difference between these options?”
Visual reference
Go deeper
Related to this question
Learn chapter
Diagnosing DNS Record Issues — A, AAAA, CNAME, MX, NS, and PTR Records
Key term
SVI
A Switch Virtual Interface (SVI) is a logical, software-based interface on a multilayer switch that provides Layer 3 routing capabilities for a VLAN, allowing devices in different VLANs to communicate without an external router.
Key term
DHCP
Dynamic Host Configuration Protocol (DHCP) automatically assigns IP addresses and network settings to devices on a network, so they can communicate without manual configuration.
About these practice questions
One of 1,389 original 200-301 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This 200-301 practice question is part of Courseiva's free Cisco certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 200-301 exam.