Маршрутизатор cisco 2960 команды

Catalyst 2960, 2960-S, 2960-C, and 2960-Plus Switches Command Reference, Cisco IOS Release 15.0(2)SE and Later

The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.

Book Title

Catalyst 2960, 2960-S, 2960-C, and 2960-Plus Switches Command Reference, Cisco IOS Release 15.0(2)SE and Later

Using the Command Line Interface

Results

Chapter: Using the Command Line Interface

Using the Command-Line Interface

The Catalyst 2960. 2960-S, and 2960-C switch is supported by Cisco IOS software. This chapter describes how to use the switch command-line interface (CLI) to configure software features.

  • For a complete description of the commands that support these features, see Chapter1, “Catalyst 2960, 2960-S, and 2960-C Switch Cisco IOS Commands”
  • For information on the bootloader commands, see Appendix 1, “Catalyst 2960, 2960-S, 2960-C, and 2960-Plus Switch Bootloader Commands.”
  • For information on the debug commands, see Appendix 1, “Catalyst 2960, 2960-S, 2960-C, and 2960-Plus Switch Debug Commands.”
  • For information on the show platform commands, see Appendix 1, “Catalyst 2960, 2960-S, 2960-C, and 2960-Plus Switch Show Platform Commands.”
  • For more information on Cisco IOS Release 12.2, see the Cisco IOS Release 12.2 Command Summary.
  • For task-oriented configuration steps, see the software configuration guide for this release.

In this document, IP refers to IP version 4 (IPv4) unless there is a specific reference to IP version 6 (IPv6).

Accessing the Switch Stack

The Catalyst 2960-S switch running the LAN base image supports stacking. You manage the switch stack and the stack member interfaces through the stack master. You cannot manage stack members on an individual switch basis. You can connect to the stack master through the console port of one or more stack members. Be careful with using multiple CLI sessions to the stack master. Commands you enter in one session are not displayed in the other sessions. Therefore, it is possible to lose track of the session from which you entered commands.

Читайте также:  Маршрутизатор tp link archer c20 custom otk

Note We recommend using one CLI session when managing the switch stack.

If you want to configure a specific stack member port, you must include the stack member number in the CLI command interface notation. For more information about interface notations, see the “Configuring Interfaces” chapter in the software configuration guide for this release.

To debug a specific stack member, you can access it from the stack master by using the session stack-member-number privileged EXEC command. The stack member number is appended to the system prompt. For example, Switch-2# is the prompt in privileged EXEC mode for stack member 2, and the system prompt for the stack master is Switch . Only the show and debug commands are available in a CLI session to a specific stack member.

Note Stacking is not supported on Catalyst 2960 or 2960-C switches, or Catalyst 2960-S switches running the LAN Lite image.

CLI Command Modes

This section describes the CLI command mode structure . Command modes support specific Cisco IOS commands. For example, the interface interface-id command only works when entered in global configuration mode.

These are the main command modes for the switch:

  • User EXEC
  • Privileged EXEC
  • Global configuration
  • Interface configuration
  • VLAN configuration
  • Line configuration

Table 1-1 lists the main command modes, how to access each mode, the prompt you see in that mode, and how to exit that mode. The prompts listed use the default name Switch.

Table 1-1 Command Modes Summary

Command Mode Access Method Prompt Exit or Access Next Mode

This is the first level of access.

(For the switch) Change terminal settings, perform basic tasks, and list system information.

Enter the logout command.

To enter privileged EXEC mode, enter the enable command.

From user EXEC mode, enter the enable command.

To exit to user EXEC mode, enter the disable command.

To enter global configuration mode, enter the configure command.

From privileged EXEC mode, enter the configure command.

To exit to privileged EXEC mode, enter the exit or end command, or press Ctrl-Z.

To enter interface configuration mode, enter the interface configuration command.

From global configuration mode, specify an interface by entering the interface command followed by an interface identification.

To exit to privileged EXEC mode, enter the end command, or press Ctrl-Z.

To exit to global configuration mode, enter the exit command.

In global configuration mode, enter the vlan vlan-id command.

To exit to global configuration mode, enter the exit command.

To return to privileged EXEC mode, enter the end command, or press Ctrl-Z.

Читайте также:  Маршрутизатор xiaomi mi router 4a прошивка

From global configuration mode, specify a line by entering the line command.

To exit to global configuration mode, enter the exit command.

To return to privileged EXEC mode, enter the end command, or press Ctrl-Z.

User EXEC Mode

After you access the device, you are automatically in user EXEC command mode. The EXEC commands available at the user level are a subset of those available at the privileged level. In general, use the user EXEC commands to temporarily change terminal settings, perform basic tests, and list system information.

The supported commands can vary depending on the version of software in use. To display a comprehensive list of commands, enter a question mark (?) at the prompt.

Privileged EXEC Mode

Because many of the privileged commands configure operating parameters, privileged access should be password-protected to prevent unauthorized use. The privileged command set includes those commands contained in user EXEC mode, as well as the configure privileged EXEC command through which you access the remaining command modes.

If your system administrator has set a password, you are prompted to enter it before being granted access to privileged EXEC mode. The password does not appear on the screen and is case sensitive.

The privileged EXEC mode prompt is the device name followed by the pound sign ( # ).

Enter the enable command to access privileged EXEC mode:

Switch> enable Switch#

The supported commands can vary depending on the version of software in use. To display a comprehensive list of commands, enter a question mark (?) at the prompt.

To return to user EXEC mode, enter the disable privileged EXEC command.

Global Configuration Mode

Global configuration commands apply to features that affect the device as a whole. Use the configure privileged EXEC command to enter global configuration mode. The default is to enter commands from the management console.

When you enter the configure command, a message prompts you for the source of the configuration commands:

Switch# configure Configuring from terminal, memory, or network [terminal]?

You can specify either the terminal or NVRAM as the source of configuration commands.

This example shows you how to access global configuration mode:

Switch# configure terminal Enter configuration commands, one per line. End with CNTL/Z.

The supported commands can vary depending on the version of software in use. To display a comprehensive list of commands, enter a question mark (?) at the prompt.

To exit global configuration command mode and to return to privileged EXEC mode, enter the end or exit command, or press Ctrl-Z.

Interface Configuration Mode

Interface configuration commands modify the operation of the interface. Interface configuration commands always follow a global configuration command, which defines the interface type.

Читайте также:  Debian настройка как роутера

Use the interface interface-id command to access interface configuration mode. The new prompt means interface configuration mode.

The supported commands can vary depending on the version of software in use. To display a comprehensive list of commands, enter a question mark (?) at the prompt.

To exit interface configuration mode and to return to global configuration mode, enter the exit command. To exit interface configuration mode and to return to privileged EXEC mode, enter the end command, or press Ctrl-Z.

VLAN Configuration Mode

Use this mode to configure normal-range VLANs (VLAN IDs 1 to 1005) or, when VTP mode is transparent, to configure extended-range VLANs (VLAN IDs 1006 to 4094). When VTP mode is transparent, the VLAN and VTP configuration is saved in the running configuration file, and you can save it to the switch startup configuration file by using the copy running-config startup-config privileged EXEC command. The configurations of VLAN IDs 1 to 1005 are saved in the VLAN database if VTP is in transparent or server mode. The extended-range VLAN configurations are not saved in the VLAN database.

Enter the vlan vlan-id global configuration command to access config-vlan mode:

Switch(config)# vlan 2000 Switch(config-vlan)#

The supported keywords can vary but are similar to the commands available in VLAN configuration mode. To display a comprehensive list of commands, enter a question mark (?) at the prompt.

For extended-range VLANs, all characteristics except the MTU size must remain at the default setting.

To return to global configuration mode, enter exit ; to return to privileged EXEC mode, enter end. All the commands except shutdown take effect when you exit config-vlan mode.

Line Configuration Mode

Line configuration commands modify the operation of a terminal line. Line configuration commands always follow a line command, which defines a line number. Use these commands to change terminal parameter settings line-by-line or for a range of lines.

Use the line vty line_number [ ending_line_number ] command to enter line configuration mode. The new prompt means line configuration mode. The following example shows how to enter line configuration mode for virtual terminal line 7:

Switch(config)# line vty 0 7

The supported commands can vary depending on the version of software in use. To display a comprehensive list of commands, enter a question mark (?) at the prompt.

To exit line configuration mode and to return to global configuration mode, use the exit command. To exit line configuration mode and to return to privileged EXEC mode, enter the end command, or press Ctrl- Z.

Источник

Оцените статью
Adblock
detector