- Cisco Virtual Security Gateway for Nexus 1000V Series Switch Configuration Guide, Release 4.2(1)VSG1(1)
- Table of Content
- Preface
- Cisco Virtual Security Gateway Overview
- Cisco Virtual Security Gateway Command-Line Interface
- Configuring the Cisco Virtual Security Gateway Port Profile on the Cisco Nexus 1000V Series Switch
- Cisco Virtual Security Gateway System Management
- Cisco Virtual Security Gateway High Availability
- Cisco Virtual Security Gateway Firewall Profiles and Policy Objects
- Index
Cisco Virtual Security Gateway Command-Line Interface
This chapter describes the Cisco Virtual Security Gateway (VSG) command-line interface (CLI).
This chapter includes the following sections:
- Information About the CLI Prompt
- Command Modes
- Special Characters
- Keystroke Shortcuts
- Abbreviating Commands
- Using the no Form of a Command
- Using Help

Note Information about the Cisco VSG CLI is provided in this chapter. For information about the Cisco Nexus 1000V Series switch CLI, see the Cisco Nexus 1000V Series switch documentation.
Information About the CLI Prompt
Once you have successfully accessed the system, the CLI prompt displays in the terminal window of your console port or remote workstation, as follows:
You can change this switch prompt to another name or leave it as it is.
Command Modes
This section includes the following topics:
- Information About Command Modes
- EXEC Command Mode
- Global Configuration Command Mode
- Exiting a Configuration Mode
- Command Mode Summary
Information About Command Modes
The CLI is divided into command modes that define the actions available to the user. Command modes are “nested” and are accessed in sequence. When you first log in, you are placed in CLI EXEC mode.
As you navigate from EXEC mode to global configuration mode, a larger set of commands is available to you. To transition to global configuration mode, enter the following command:
Table 2-1 shows how command access builds from user EXEC to global configuration mode.
Table 2-1 Accessing the Global Configuration Mode
All commands in EXEC command mode are accessible from the global configuration command mode. For example, the show commands are available from any command mode.
EXEC Command Mode
When you first log in, you are placed into EXEC mode. The commands available in EXEC mode include the show commands that display device status and configuration information, the clear commands, and other commands that perform actions that you do not save in the device configuration.
Global Configuration Command Mode
Global configuration mode provides access to the widest range of commands, including those commands used to make configuration changes that are saved by the device and can be stored and applied when the device is rebooted.
Commands entered in global configuration mode update the running configuration file as soon as they are entered, but must also be saved into the startup configuration file by using the following command:
copy running-config startup-config
In global configuration mode, you can access protocol-specific, platform-specific, and feature-specific configuration modes.
Exiting a Configuration Mode
To exit from any configuration mode, use one of the following commands:
Command Mode Summary
Table 2-2 summarizes information about command modes.
To exit to EXEC mode, use the end or exit command or press Ctrl-Z . |
|||
From global configuration mode, enter the command, zone zone-name . |
|||
From global configuration mode, enter the command interface data0 |
Saving CLI Configuration Changes
This section describes how to save CLI configuration changes and includes the following topics:
- Running Configuration
- Startup Configuration
- Copying the Running Configuration to the Startup Configuration
Running Configuration
The running configuration is the configuration that is currently running on the device. It includes configuration changes from commands entered since the last time the device was restarted. If the device is restarted, the running configuration is replaced with a copy of the startup configuration. Any changes that were made to the running configuration but were not copied to the startup configuration are discarded.
Startup Configuration
The startup configuration is the configuration that is saved and that will be used by the device when you restart it. When you make configuration changes to the device, they are automatically saved in the running configuration. If you want configuration changes saved permanently, you must copy them to the startup configuration so that they are preserved when the device is rebooted or restarted.
Special Characters
Table 2-3 lists the characters that have special meaning in text strings and should be used only in regular expressions or other special contexts.
Keystroke Shortcuts
Table 2-4 lists command key combinations that can be used in both EXEC and configuration modes.
Moves the cursor one character to the left. |
|
Exits to the previous command mode without removing the command string. |
|
Deletes all characters from the cursor to the end of the command line. |
|
Transposes the character to the left of the cursor with the character located to the right of the cursor. |
|
Deletes all characters from the cursor to the beginning of the command line. |
|
When using this key combination, press and release the Ctrl and X keys together before pressing H. |
|
Recalls the most recent entry in the buffer (press keys simultaneously). |
|
Ends a configuration session, and returns you to EXEC mode. When used at the end of a command line in which a valid command has been typed, the resulting configuration is first added to the running configuration file. |
|
![]() |
|
![]() |
|
![]() |
Moves your cursor through the command history directionally to locate a command string. |
Completes the word for you after you enter the first characters of the word and then press the Tab key. All options that match are presented. |
|
Abbreviating Commands
You can abbreviate commands and keywords by entering the first few characters of a command. The abbreviation must include enough characters to make it unique from other commands or keywords. If you are having trouble entering a command, check the system prompt and enter the question mark (?) for a list of available commands. You might be in the wrong command mode or using incorrect syntax.
Table 2-5 lists examples of command abbreviations.
Using the no Form of a Command
Almost every configuration command has a no form that can be used to disable a feature or function. For example, to remove a VLAN, use the no vlan command. To reenable it, use the vlan command form.
For example, if you use the boot command in global configuration mode, you can then use the no boot command to undo the results:
Using Help
The CLI provides the following help features (see Table 2-6 and Table 2-7 ).
The example in Table 2-7 describes how to use syntax error isolation and context-sensitive help.