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.
This chapter provides helpful tips for understanding and configuring the from the command-line interface (CLI). The can be deployed for small, medium, and large deployments and is available on different platforms and also as a software that can run on VMware.
Before logging in to the CLI, ensure that you have completed the installation tasks as specified in the Cisco Prime Infrastructure 3.2 Quick Start Guide at : http://www.cisco.com/c/en/us/support/cloud-systems-management/prime-infrastructure/products-installation-guides-list.html.
When you power on the appliances for the first time, you are prompted to run the setup utility to configure the appliances. Before you run the utility using the setup command, ensure that you have values for the following network configuration prompts:
The following is a sample output from the setup command:
********************************************** Please type 'setup' to configure the appliance ********************************************** localhost login: setup Press 'Ctrl-C' to abort setup Enter hostname[]: pi-33-aws-100 Enter IP address[10.126.168.100]: Enter IP default netmask[]: 255.255.255.0 Enter IP default gateway[]: 10.126.168.1 Enter default DNS domain[]: cisco.com Enter primary nameserver[]: 72.163.128.140 Add/Edit another nameserver? Y/N : n Enter primary NTP server[time.nist.gov]: 10.81.254.202 Add/Edit secondary NTP server? Y/N : n Enter system timezone[UTC]: Asia/Calcutta Current system clock time : 2017-11-15 07:59:14 IST Change system clock time? Y/N : n Enter username[admin]: Enter password: Enter password again: ************************************************* * High Availability (HA) Role Selection * ************************************************* HA refers to a system that is continuously operating during failure. To configure HA, go to the primary server's user interface. Choose Administration > High Availability > HA Configuration. For more information, click the context-sensitive online help. Will this server be used as a Secondary for HA? (yes/no) : no ******************************************** * Web Interface Root Password Selection * ******************************************** Enter Web Interface - root password: Enter Web Interface - root password again: Apply these settings? (y/n)y Settings Applied. Bringing up network interface... Pinging the gateway... Pinging the primary nameserver... Do not use 'Ctrl-C' from this point on... Appliance is configured Setup is complete Running post setup script... Installing applications... Installing NCS ... Prime Application installation completed ************************************************ * Cisco Prime Infrastructure Setup * ************************************************ Reading configuration from file. ************************************************ * Summary * ************************************************ Server will not be a Secondary Web Interface - root password is set. Settings Applied. Application bundle (NCS) installed successfully === Initial Setup for Application: NCS === Running database cloning script... Running database creation script... Setting limits.conf file... Virtual Appliance Turning off ipmi service... Setting up NCS service... Generating configuration... Rebooting...
After you enter the required information, the appliance automatically reboots and the following login prompt appears:
machine_name login:
where machine_name identifies the hostname that you specified when you ran the setup command.
In this example, this prompt appears:
NCS login:
To log in, use the administrator user account (and the corresponding password) that you created during the setup process. You must also use this Admin account to log in to the CLI for the first time. After accessing the CLI as an administrator, you can create more users (with admin and operator privileges) with SSH access to the CLI by running the username command in configuration mode.
Before logging in to the CLI, ensure that you have completed the hardware installation and configuration process outlined in the Before Accessing the CLI
To log in to the server and access the CLI, use an SSH secure shell client or the console port. You can log in from:
Any terminal device compatible with VT100 or ANSI characteristics. On the VT100-type and ANSI devices, you can use cursor-control and cursor-movement key. Keys include left arrow, up arrow, down arrow, right arrow, Delete, and Backspace. The CLI senses the use of the cursor-control keys and automatically uses the optimal device characteristics.
To exit the CLI, use the exit command from EXEC mode. If you are currently in one of the configuration modes and you want to exit the CLI, enter the end, exit, or press Ctrl z command to return to EXEC mode, and then enter the exit command.
The following valid terminal types can access the :
You can also access the through an SSH client or the console port.
Note | To access the CLI environment, use any SSH client that supports SSH v2. |
The following example shows you how to log in with a Secure Shell (SSH) client (connection to a wired WAN) via a PC by using Windows XP. Assuming that is preconfigured through the setup utility to accept an Admin (administrator) user, log in as Admin.
If you need to configure locally (without connecting to a wired LAN), you can connect a PC to the console port on the appliance by using a null-modem cable.
The serial console connector (port) provides access to the CLI locally by connecting a terminal to the console port. The terminal is a PC running terminal-emulation software or an ASCII terminal. The console port (EIA/TIA-232 asynchronous) requires only a null-modem cable.
To connect a PC running terminal-emulation software to the console port, use a DB-9 female to DB-9 female null-modem cable.
To connect an ASCII terminal to the console port, use a DB-9 female to DB-25 male straight-through cable with a DB-25 female to DB-25 female gender changer.
The default parameters for the console port are 9600 baud, 8 data bits, no parity, 1 stop bit, and no hardware flow control.
Note | If you are using a Cisco switch on the other side of the connection, set the switchport to duplex auto, speed auto (the default). |
When you start a session on the , you begin in admin or EXEC mode. From EXEC mode, you can enter configuration mode. Most of the EXEC commands (one-time commands), such as show commands, display the current configuration status. The admin or EXEC mode prompt consists of the device name or hostname before a pound sign (#), as shown:
ncs/admin# (Admin or EXEC mode)
Note | Throughout this guide, the server uses the name ncs in place of the hostname and admin of the server for the user account. |
You can always tell when you are in EXEC mode or configuration mode by looking at the prompt.
In EXEC mode, a pound sign (#) appears after the NCS server hostname and your username.
ncs/admin#
In configuration mode, the ‘config’ keyword and a pound sign (#) appear after the hostname of the server and your username.
ncs/admin# configure Enter configuration commands, one per line. End with CNTL/Z. ncs/admin(config)# (configuration mode)
If you are familiar with UNIX, you can equate EXEC mode to root access. You could also equate it to the administrator level in Windows NT or the supervisor in NetWare. In this mode, you have permission to access everything in the server, including the configuration commands. However, you cannot enter configuration commands directly. Before you can change the actual configuration of the server, you must enter configuration mode by entering the configure or configure terminal (conf t) command. Enter this command only when in EXEC mode.
ncs/admin# conf t Enter configuration commands, one per line. End with CNTL-Z. ncs(config)# (configuration mode)
The configuration mode has several submodes; each has its own prompt. To enter these submodes, you must first enter configuration mode by entering the configure terminal command.
To exit configuration mode, enter the end, exit, or Ctrl-z command. To exit EXEC mode, enter the exit command. To exit both configuration and EXEC modes, enter this sequence of commands:
ncs/admin(config)# exit ncs/admin# exit
To obtain a listing of commands in EXEC mode, enter a question mark (?):
ncs/admin# ?
Use configuration mode to make changes to the existing configuration. When you save the configuration, these commands remain across server reboots, but only if you run either of these commands:
To enter configuration mode, run the configure or configure terminal (conf t) command in EXEC mode. When in configuration mode, the expects configuration commands.
ncs/admin# configure Enter configuration commands, one per line. End with CNTL-Z. ncs/admin(config)# (configuration mode)
From this level, you can enter commands directly into the configuration. To obtain a listing of commands in this mode, enter a question mark (?):
ncs/admin(config)# ?
The configuration mode has several configuration submodes. Each of these submodes places you deeper in the prompt hierarchy. When you enter the exit, command the backs you out one level and returns you to the previous level. When you enter the exit command again, the backs you out to the EXEC level.
Note | In configuration mode, you can alternatively press the Ctrl-z instead of entering the end or exit command. |
In the configuration submodes, you can enter commands for specific configurations. For example:
ncs/admin# config t ncs/admin(config)# interface GigabitEthernet 0 ncs/admin(config-GigabitEthernet)#
To obtain a list of commands in this mode, enter a question mark (?):
ncs/admin(config-GigabitEthernet)# ?
Use the exit or end command to exit this prompt and return to the configuration prompt.
The following table lists the commands in the interface GigabitEthernet 0 configuration submode. Other configuration submodes exist including those specific to the kron, repository, and password policy commands.
This section describes how to navigate the commands and modes on the
Use the question mark (?) and the arrow keys to help you enter commands:
For a list of available commands, enter a question mark (?):
ncs/admin# ?
To complete a command, enter a few known characters before ? (with no space):
ncs/admin# s?
To display keywords and arguments for a command, enter ? at the prompt or after entering part of a command followed by a space:
ncs/admin# show ?
The displays a list and brief description of available keywords and arguments.
To redisplay a command that you previously entered, press the Up Arrow key. Continue to press the Up Arrow key to see more commands.
Some EXEC or configuration commands have a no form. In general, use the no form to disable a function. Use the command without the no keyword to re-enable a disabled function or to enable a function disabled by default; for example, an IP address enabled by default. To disable the IP address, use the no ip address command; to re-enable the IP address, use the ip address command.
Configuration commands can also have a default form, which returns the command settings to the default values. Most commands disable by default, so in such cases using the default form has the same result as using the no form of the command. However, some commands are enabled by default and have variables set to certain default values. In these cases, the default form of the command enables the command and sets the variables to their default values.
See Command Reference for a description of the complete syntax of the configuration commands, and the no and default forms of a command.
This section contains some basic command-line convention and operation information that is essential to the use of this guide.
The provides a number of keyboard shortcuts that you can use to edit an entered line.
Press Ctrl-c to abort the sequence. Pressing this key sequence breaks out of any executing command and returns to the previous mode.
Press Ctrl-z to exit configuration mode and return to previous configuration mode.
Enter a question mark (?) at the prompt to list the available commands.
Command-line completion makes the CLI more user-friendly. It saves you extra key strokes and helps out when you cannot remember the syntax of a command.
For example, for the show running-config command:
ncs/admin# show running-config
ncs/admin# sh run
The expands the command sh run to show running-config.
Another shortcut is to press the Tab key after you type sh; the Cisco NCS CLI fills in the rest of the command, in this case show.
If the Cisco NCS CLI does not understand a command, it repeats the entire command line and places a caret symbol (^) under the point at which it is unable to parse the command.
ncs/admin# show unning-configuration ^ % Invalid input detected at ‘^’ marker.
The caret symbol (^) points to the first letter in the command line that the does not understand. Usually, this means that you need to provide additional arguments to complete the command or you mispelled the command. In this case, you omitted the “r” in the “unning” command. To fix the error, retype the command.
In another form of command-line completion, you can start a command by entering the first few characters, then pressing the Tab key. As long as you can match one command, the CLI will complete the command. For example, if you type sh and press Tab, the completes the sh with show. If does not complete the command, you can enter a few more letters and press Tab again.
When working with the CLI, output often extends beyond the visible screen length. For cases where output continues beyond the bottom of the screen, such as with the output of many ? or show commands, the output pauses and a --More-- prompt appears at the bottom of the screen. To resume output, press Return to scroll down one line, or press the spacebar to display the next full screen of output.
Now that you are familiar with some of the CLI basics, you can begin to configure the by using the CLI.
You can use the question mark (?) and arrow keys to help you enter commands.
Each command mode restricts you to a set of commands. If you have difficulty entering a command, check the prompt and then enter the question mark (?) to see a list of available commands.
To disable a feature, enter the keyword no before the command; for example, no ip address.
You must save your configuration changes so that you preserve them during a system reload or power outage.
Proceed to Command Reference for command listings, descriptions, syntax, usage guidelines, and sample output.