Cisco CCNA (200-301)IP ServicesMedium
A network engineer is troubleshooting a connectivity issue on a Cisco router. They suspect that the router's DNS resolution is not working correctly. Which command can be used to verify the DNS server configured on the router?
- Ashow ip interface brief
- Bshow ip route
- Cshow running-config | section dns
- Dshow hosts
Show answer & explanationAnswer & explanation
Correct answer: C. show running-config | section dns
The 'show running-config | section dns' command will display the DNS-related configuration lines from the running configuration, including any 'ip name-server' commands that specify DNS servers.
Why the other options are wrong
- A. This command displays the status of interfaces, not DNS server configuration.
- B. This command displays the routing table, not DNS server configuration.
- D. This command displays the local host table, which can include static DNS entries, but not the configured DNS servers themselves.
Cisco IOS DNS Server Verification
To verify which DNS servers a Cisco router is configured to use for name resolution, you can inspect the running configuration for specific commands.
- DNS servers are configured using `ip name-server` command.
- Configuration is stored in running-config.
- Pipe commands (`| section`) are useful for filtering output.
Memory trick: To see the 'name-server' config, look in the 'running-config' section for 'dns'.