4.0 Network Services and Security
DNS Practice Questions
Updated for CCNA v2.0
Domain name resolution on Cisco IOS devices.
Author-reviewed by LabFabric · 6 September 2026 · Report a content issue
One solved question, so you can see how these are marked
Which command tells a router which DNS server to query when it needs to resolve a hostname to an IP address?
ip name-server 1.1.1.1
ip name-server specifies the DNS resolver addresses used by the router itself. It does not distribute DNS settings to client PCs; configure those separately, for example through DHCP.
Every question in the set below is marked like this. The answers stay hidden until you pick one.
Find related practice in the CCNA pathAll 4 DNS questions in this set
Answers and explanations appear when you work through the set above.
A router needs to resolve the name PC1 to 192.168.0.1 without relying on an external DNS server. Which command accomplishes this directly on the router?
- ip name-server PC1 192.168.0.1
- ip domain-name PC1 192.168.0.1
- ip host PC1 192.168.0.1
- ip dns static PC1 192.168.0.1
Which command displays a router's configured DNS server, default domain, and any statically or dynamically learned hostname to address mappings?
- show ip dns
- show hosts
- show ip host-table
- show running-config | section dns
On a router with ip name-server 1.1.1.1 and ip host PC1 192.168.0.1 both configured, an administrator runs ping PC1. What happens?
- The router always queries the DNS server at 1.1.1.1 first because dynamic lookups take priority
- The router uses the local static host entry for PC1 and pings 192.168.0.1 without querying the DNS server
- The command fails because both a name server and a static host entry cannot exist at the same time
- The router prompts the administrator to choose which mapping to use
An end-user PC needs to resolve names like youtube.com to an IP address. Where is the DNS server address configured for that PC in a typical lab setup?
- In the PC's IP configuration, as a DNS server address alongside its IP address, subnet mask, and default gateway
- On the nearest switch, using the ip name-server command
- In the router's ip domain-name command, which then pushes DNS settings to all PCs automatically
- PCs cannot be configured with DNS servers, only routers can