Difficulty: Easy
Correct Answer: Router(config)# line vty 0 4
Explanation:
Introduction / Context:
This question checks your understanding of Cisco IOS command modes and syntax for configuring virtual terminal lines. VTY lines are used for remote access protocols such as Telnet and SSH. To apply passwords and access control to all default VTY lines, you must know how to enter the correct line configuration mode from global configuration mode.
Given Data / Assumptions:
Concept / Approach:
In Cisco IOS, the prompt tells you which configuration mode you are in. Global configuration mode is indicated by Router(config)#. From there, you can enter line configuration mode for VTY lines with the command line vty 0 4. The prompt then changes to Router(config-line)#, which confirms that you are configuring those lines. Any option that shows the wrong prompt or wrong syntax does not correctly configure the VTY lines.
Step-by-Step Solution:
Step 1: From privileged EXEC mode (Router#), enter global configuration mode with configure terminal, which changes the prompt to Router(config)#.Step 2: From global configuration mode, use the command line vty 0 4 to select all five default VTY lines.Step 3: The prompt changes to Router(config-line)#, indicating that you can now configure settings such as password and login for those lines.Step 4: Verify that you used the correct mode and syntax: the command must be issued at the Router(config)# prompt, not at user EXEC or interface configuration prompts.Step 5: Apply desired commands such as password, login, and transport input to control remote access.
Verification / Alternative check:
On an actual router, if you enter Router(config)# line vty 0 4 and press Enter, the IOS prompt changes to Router(config-line)#, confirming that you are in VTY line configuration mode. Using a different prompt or missing the config keyword will either generate an error or not change into the correct mode.
Why Other Options Are Wrong:
Option A is incorrect because the prompt Router# indicates privileged EXEC mode, not global configuration mode.Option C is wrong because line console 0 configures the console line, not the VTY lines.Option D uses an invalid keyword all; Cisco IOS expects a numeric range such as 0 4.Option E again uses the Router# prompt, which is not the correct mode to issue line configuration commands.
Common Pitfalls:
A frequent mistake is to forget to enter global configuration mode before attempting line configuration or to confuse console and VTY lines. Another common issue is misreading the prompt and thinking you are in the correct mode when you are not. Always verify that the prompt shows Router(config)# before issuing the line vty command.
Final Answer:
The correct command to configure all default VTY lines is Router(config)# line vty 0 4.
Discussion & Comments