CCNA Network Infrastructure and Connectivity Practice Question
Network Topology
You are troubleshooting a client connectivity issue on PC1, which is connected to switch SW1. PC1 reports that it cannot access the internet, but it can ping its default gateway (192.168.1.1). The network uses VLAN 10 for the client subnet. Examine the following show outputs: On PC1, ipconfig shows IP 192.168.1.10, default gateway 192.168.1.1, DNS server 192.168.1.1. On SW1, show running-config includes 'interface Vlan10' with IP 192.168.1.1 255.255.255.0, but no 'ip dns server' and no 'ip name-server' commands. SW1's show ip route displays a default route via 203.0.113.1. Identify the root cause. Configure the necessary fix on the appropriate device to restore full connectivity.
⚠ Common exam trap
Do not assume that internet connectivity issues are always routing problems. When a client can ping the gateway but cannot access websites, the issue is often DNS. Also, remember that 'ip name-server' configures DNS servers, while 'ip domain-lookup' only enables the DNS client feature.
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
✓
Configure 'ip dns server' and 'ip name-server 8.8.8.8' on SW1.
PC1 is configured with DNS server 192.168.1.1, which is the switch SW1. However, SW1 lacks DNS forwarding capability. To enable DNS relay on the switch, both the 'ip dns server' command (to activate the DNS forwarder) and 'ip name-server 8.8.8.8' (to point to an upstream resolver) are required. Option A provides the necessary configuration to restore DNS resolution and internet connectivity.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Configure 'ip dns server' and 'ip name-server 8.8.8.8' on SW1.
Why this is correct
This is the correct fix because 'ip dns server' enables SW1 to act as a DNS proxy, accepting recursive queries sent to its VLAN 10 SVI from PC1. The 'ip name-server 8.8.8.8' command tells SW1 which upstream recursive resolver to contact for hostnames it does not know. Once PC1 sends a DNS query to SW1, the switch forwards it to 8.8.8.8 using its existing default route and relays the response back. Both commands are mandatory: without the upstream name-server entry, the switch has no external resolver, and without 'ip dns server', it will silently drop or ignore DNS packets from clients.
- ✗
Configure 'ip default-gateway 192.168.1.1' on SW1.
Why it's wrong here
This is incorrect because the switch already has an SVI for VLAN 10 and a default route to the internet. The 'ip default-gateway' command is used for switch management access when IP routing is disabled, but here routing is enabled and the issue is DNS, not gateway reachability.
- ✗
Configure 'ip route 0.0.0.0 0.0.0.0 203.0.113.1' on SW1.
Why it's wrong here
This command would add a default static route to 203.0.113.1, but the scenario already states that SW1 has a default route to that same next hop, making the configuration redundant. It would not change any forwarding decision because the route already exists. The real problem is that PC1 is configured to use SW1 as a DNS server, but SW1 is not running the DNS forwarder, so adding or duplicating a route cannot fix name resolution. This option incorrectly assumes the host is unreachable, whereas the issue is the absence of DNS service on SW1.
- ✗
Configure 'ip domain-lookup' on SW1.
Why it's wrong here
This is incorrect because 'ip domain-lookup' enables DNS resolution on the switch itself, but it does not configure a DNS server. Without a DNS server, the switch cannot resolve names, and clients using the switch as DNS will still fail.
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.
✓Configure 'ip dns server' and 'ip name-server 8.8.8.8' on SW1.Correct answer▾
Why this is correct
This is the correct fix because 'ip dns server' enables SW1 to act as a DNS proxy, accepting recursive queries sent to its VLAN 10 SVI from PC1. The 'ip name-server 8.8.8.8' command tells SW1 which upstream recursive resolver to contact for hostnames it does not know. Once PC1 sends a DNS query to SW1, the switch forwards it to 8.8.8.8 using its existing default route and relays the response back. Both commands are mandatory: without the upstream name-server entry, the switch has no external resolver, and without 'ip dns server', it will silently drop or ignore DNS packets from clients.
✗Configure 'ip default-gateway 192.168.1.1' on SW1.Wrong answer — click to see why▾
Why this is wrong here
The specific factual error is that 'ip default-gateway' is for management access on a Layer 2 switch, not for client connectivity. The switch already has a default route (203.0.113.1) for routing traffic.
Why candidates choose this
Candidates might confuse 'ip default-gateway' with a default route or think that the gateway is missing because PC1 cannot reach the internet, but PC1 can ping the gateway, so the gateway is reachable.
✗Configure 'ip route 0.0.0.0 0.0.0.0 203.0.113.1' on SW1.Wrong answer — click to see why▾
Why this is wrong here
The specific factual error is that the default route already exists; the problem is not routing but DNS resolution. The switch can route traffic but cannot resolve names for clients.
Why candidates choose this
Candidates often assume that internet connectivity issues are always due to missing default routes, especially when the client can ping the gateway but not the internet. However, PC1 can ping the gateway, so routing is likely fine.
✗Configure 'ip domain-lookup' on SW1.Wrong answer — click to see why▾
Why this is wrong here
The specific factual error is that 'ip domain-lookup' is enabled by default and does not specify a DNS server. The missing piece is the 'ip name-server' command to provide the DNS server address.
Why candidates choose this
Candidates might think that enabling DNS lookup is sufficient, but without a server address, the switch cannot forward queries. This command alone does not fix client DNS resolution.
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
DNS Resolution Process
Key term
VLAN
A VLAN (Virtual Local Area Network) is a logical grouping of network devices that behave as if they are on the same physical network segment, regardless of their actual physical location.
Key term
Route
A route is a path that data takes through a network from one device or network to another, determined by routing protocols and configured rules.
About these practice questions
Courseiva writes every 200-301 question from scratch — 1,389 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. 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.