Cisco Certified Network Associate (CCNA) Practice Exam

Disable ads (and more) with a membership for a one time $4.99 payment

Prepare for the Cisco Certified Network Associate (CCNA) Practice Exam. Test your knowledge with our interactive quizzes featuring multiple choice questions, hints, and explanations. Equip yourself for success!

Practice this question and more.


Which command is used to map a hostname to an IP address using DNS?

  1. (config)#ip host HOSTNAME ip address

  2. (config)#hostname HOSTNAME ip address

  3. (config)#ip address HOSTNAME ip

  4. (config)#dns host HOSTNAME ip address

The correct answer is: (config)#ip host HOSTNAME ip address

The command used to map a hostname to an IP address using DNS is the one that begins with `ip host`. This command allows you to create a local mapping of a hostname to an IP address directly on the router or switch's configuration. By using this command, you facilitate the resolution of the hostname to its corresponding IP address when the device tries to reach that host, effectively functioning within local DNS lookup capabilities. This is especially useful in scenarios where you might not want to rely on external DNS servers for name resolution or when you need a quick setup for hostname resolutions that are specific to the device’s environment. It ensures that even if the DNS servers are down or unreachable, the device can still resolve the specified hostname using the local entry. The other options provided do not represent valid commands for mapping a hostname to an IP address within the context of DNS configuration. For example, using `hostname` is actually for setting the device's name itself rather than mapping it to an IP address.