Courseiva
Network Services and SecurityhardTroubleshootingObjective-mapped

CCNA Network Services and Security Practice Question

Exhibit

R1# show running-config | section ip domain
ip domain lookup
ip name-server 203.0.113.1
ip domain name example.com
!
R1# show ip dns server
DNS server: 203.0.113.1
Default domain: example.com

R1# nslookup ServerA
Server:   203.0.113.1
Address 1: 203.0.113.1

Name:      ServerA.example.com
Address 1: 203.0.113.10

R1# dig ServerA
; <<>> DiG 9.8.3 <<>> ServerA
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 1234
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;ServerA.            IN    A

;; Query time: 10 msec
;; SERVER: 203.0.113.1#53(203.0.113.1)
;; WHEN: Thu Jan 18 12:00:00 2024
;; MSG SIZE  rcvd: 28

R1# ping ServerA
Translating "ServerA"...domain server (203.0.113.1)
% Unrecognized host or address, or protocol not running.

You are connected to R1. The network uses DNS to resolve hostnames for remote device management. Currently, R1 cannot resolve the hostname 'ServerA' via DNS. Using the nslookup and dig commands, you have gathered the following outputs:

nslookup ServerA Server: 203.0.113.1 Address: 203.0.113.1#53

Name: ServerA.example.com Address: 203.0.113.10

dig ServerA ... ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: ... ...

The show running-config command shows that 'ip domain-lookup' is enabled, the name-server is 203.0.113.1, and no static host entries are configured. Diagnose and fix the DNS resolution failure. Ensure that R1 can successfully resolve 'ServerA' to its intended IP address 198.51.100.10.

⚠ Common exam trap

Do not assume that a DNS server that responds is correctly configured. Always verify the actual record returned. The nslookup output may show a response, but the IP could be wrong. Use 'dig' to see the exact answer section. Also, remember that static host entries override DNS and are useful for troubleshooting.

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

Add a static host entry: 'ip host ServerA 198.51.100.10'

The nslookup output misleadingly shows a response with IP 203.0.113.10, but the dig output reveals NXDOMAIN, indicating the DNS server has no valid A record for ServerA. The returned address is a default domain record that does not point to the correct device. Since the external DNS server cannot be modified, the quickest and valid fix is to add a static host entry on R1 using 'ip host ServerA 198.51.100.10', which overrides DNS and ensures correct resolution. Option B is incorrect because changing to 8.8.8.8 would still depend on a remote server having the correct record, which is not guaranteed. Option C is wrong because 'ip domain-lookup' is already enabled, so disabling/enabling it has no effect. Option D is wrong because modifying the domain name only affects how FQDN is built but does not fix the missing A record or wrong IP issue.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Add a static host entry: 'ip host ServerA 198.51.100.10'

    Why this is correct

    Since the DNS server returns an incorrect IP for ServerA (203.0.113.10 instead of 198.51.100.10) and we cannot modify the external DNS server, creating a static host entry on R1 overrides DNS and provides the correct IP. This is a common workaround when DNS is misconfigured or unavailable.

  • Change the DNS server to 8.8.8.8 using 'ip name-server 8.8.8.8'

    Why it's wrong here

    This is incorrect because the problem is not that the DNS server is unreachable; nslookup shows a response from 203.0.113.1. The issue is that the DNS server has a wrong A record for ServerA. Changing to 8.8.8.8 might resolve the hostname if that server has the correct record, but it is not guaranteed and does not address the root cause of the misconfigured DNS server.

  • Enable 'ip domain lookup' with 'ip domain-lookup' command

    Why it's wrong here

    This is incorrect because 'ip domain lookup' is already enabled by default on Cisco routers. The nslookup output shows that DNS queries are being sent and responses received, so the issue is not that DNS lookup is disabled.

  • Configure the correct domain name using 'ip domain-name example.com'

    Why it's wrong here

    This is incorrect because the nslookup output shows that the DNS server is returning a response for 'ServerA.example.com' with an IP, so the domain name is already being appended. The issue is not the domain name configuration but the incorrect A record on the DNS server.

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.

Add a static host entry: 'ip host ServerA 198.51.100.10'Correct answer

Why this is correct

Since the DNS server returns an incorrect IP for ServerA (203.0.113.10 instead of 198.51.100.10) and we cannot modify the external DNS server, creating a static host entry on R1 overrides DNS and provides the correct IP. This is a common workaround when DNS is misconfigured or unavailable.

Change the DNS server to 8.8.8.8 using 'ip name-server 8.8.8.8'Wrong answer — click to see why

Why this is wrong here

The DNS server is reachable and responds, but with incorrect data. Simply changing the server may not fix the issue if the new server also lacks the correct record.

Why candidates choose this

Candidates often assume DNS issues are due to unreachability and try to change the server to a public one like 8.8.8.8, overlooking that the current server is responding but with wrong data.

Enable 'ip domain lookup' with 'ip domain-lookup' commandWrong answer — click to see why

Why this is wrong here

The command 'ip domain-lookup' enables DNS resolution, but it is enabled by default. The problem is the incorrect DNS record, not the feature being disabled.

Why candidates choose this

Candidates might think DNS resolution is not working because the feature is disabled, especially if they forget that it is enabled by default. However, the nslookup output confirms DNS is active.

Configure the correct domain name using 'ip domain-name example.com'Wrong answer — click to see why

Why this is wrong here

The domain name is already being used in the query (ServerA.example.com). Configuring a different domain name would change the query but not fix the incorrect record for ServerA.

Why candidates choose this

Candidates may think that the hostname is not being fully qualified, but the output shows the domain is appended. They might also confuse this with the need to set a domain name for other features like SSH.

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

Client Recursive Resolver Root DNS (13 root servers) TLD DNS (.com, .org, …) Authoritative example.com query IP addr answer

Quick reference

Common DNS Record Types

RecordPurposeExample
AIPv4 address mappingexample.com → 93.184.216.34
AAAAIPv6 address mappingexample.com → 2606:2800::1
CNAMEAlias to another hostnamewww → example.com
MXMail server for domainexample.com → mail.example.com (priority 10)
TXTText data (SPF, DKIM, verification)v=spf1 include:_spf.example.com ~all
NSAuthoritative name serversexample.com NS ns1.example.com
PTRReverse DNS (IP → hostname)34.216.184.93.in-addr.arpa → example.com
SOAZone authority recordPrimary NS, admin email, serial, TTL defaults

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 →

How Courseiva writes practice questions · Editorial policy

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.