Cisco Certified Network Associate (CCNA) Practice Exam

Disable ads (and more) with a membership for a one time $2.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!

Each practice test/flash card set has 50 randomly selected questions from a bank of over 500. You'll get a new set of questions each time!

Practice this question and more.


Which command initializes a router and sets its hostname to 'R2-RC'?

  1. Router(config)#hostname R2-RC

  2. Router>enable

  3. Router#configure terminal

  4. Router(config)#enable secret cisco1

The correct answer is: Router(config)#hostname R2-RC

The command used to set the hostname of a router is "hostname" followed by the desired name of the router. In this case, "Router(config)#hostname R2-RC" directly accomplishes the task of initializing the router's configuration mode and assigning it a hostname of 'R2-RC.' When you enter this command in global configuration mode, it immediately changes the router's hostname to the specified name. This is a foundational step in router configuration, as naming the device helps in network management and identification. Other options provided serve different functions. The command that enters privileged EXEC mode does not affect the hostname, while entering global configuration mode sets the stage for configuration commands but does not set the hostname itself. Lastly, the command for setting an enable secret is related to password security and does not impact the router's hostname.