FREQUENTLY USED CLI COMMANDS
This section demonstrates how to use common CLI commands together to perform these tasks:
Reset the configuration to factory defaults.
Set the device hostname.
View the current IP configuration.
Set the switch IP address.
Ping a network device.
Use the Show command.
Reset Configuration to Defaults
You can reset the configuration to factory defaults.
# reload defaults
% Reloading defaults. Please stand by.
#
When the prompt returns, the system has reverted to factory defaults.
Set the Device Hostname
To set the device hostname, type the bold commands exactly as shown; bold italic marks a parameter
you provide, such as my-device as the new hostname.
1. Change to configuration mode, using one of the commands shown here. As these examples show,
you can abbreviate commands to short versions that are unique.
SWI2210# configure terminal
SWI2210# config term
SWI2210# conf t
2. The prompt changes to include the mode name in parentheses.
SWI2210(config)#
3. Enter the ‘hostname’ command and the new name. The command is executed immediately, and the
prompt changes to show the new name of the switch.
SWI2210(config)# hostname
my-device
my-device(config)#
4. Exit configuration mode. The exit command returns to the next higher mode, and the prompt
changes to show the new mode.
my-device(config)# exit
my-device#
5. Save the configuration (see XXX).
View the Current IP Configuration
To view the IP configuration, enter:
IP configuration