Cheatography
https://cheatography.com
Some of the commands that can be used in Cisco IOS CLI.
User Levels/Modes
Level |
Mode |
User View |
Some Available Commands |
1 |
User EXEC |
Switch> |
enable ping show (basic only) |
2 |
Privileged EXEC |
Switch# |
config User EXEC commands
|
3 |
Global Config. |
Switch(config)# |
hostname enable secret interface/router/line |
4a |
Interface Config. |
Switch(config-if)# |
shut/no shut switchport mode switchport access vlan |
4b |
Router Config. |
Switch(config-router)# |
version network |
4c |
Line Config. |
Switch(config-line)# |
login password |
|
Changing User Mode
Command |
Abbreviated Command |
Change in Mode |
>enable |
>en |
Moves from User Exec to Privileged EXEC User is prompted for a password |
#config terminal |
#config t |
Moves from Privileged EXEC to Global Config |
(config)# interface [type/number] |
(config)# int [type/number] |
Moves to Interface Config |
(config)# vlan [#] |
(config)# vl [#] |
Moves to VLAN Config |
exit |
|
Exits current mode and moves back to previous mode |
Remember to enter the appropriate mode while configuring/working. Some commands will only work in specific modes.
|
Getting Started - Global Configuration
Command |
Purpose |
hostname name |
Configure hostname on device |
int vlan [#] ip address[address][subnet mask] |
Configure IP address on management VLAN |
vlan [#] name [name/ip address] |
Configures vlan with specified name |
ip default-gateway address |
Configure default gateway |
banner motd #insert message# |
Configure banner message of the day |
enable secret [secret] |
Enables specified secret on device |
Some of the commands used during the base config. Others are in the Google Doc.
|
Important Show (sh) Commands
Command |
What it Shows |
sh boot |
Boot path-list |
sh cdp neighbors |
Cisco Discovery Protocol neighbors |
sh int [type/number] |
Network statistics of specified interface (status, input errors, etc.) |
sh int status |
Names/statuses/VLANs/etc. of all interfaces |
sh run int [type/number] |
Running config on specified interface (switchport mode, switchport access vlan, etc.) |
sh running-config (sh run) |
Current switch configuration |
sh history |
Switch session command history |
sh lldp neighbors |
Link Layer Discovery Protocol neighbors |
sh logging |
Switch log (changes in int statuses) |
sh power-inline |
Switch inline power (Available/Used/Remaining) |
sh spanning-tree sh spanning-tree vlan # |
Spanning tree topology (Desg/Root) 2nd command: STP of specific vlan |
sh switch |
Switch stack information |
sh version |
Hardware and software statuses |
sh vlan |
VLANs/names/statuses/ports |
|
Interface Types and Configuration
Components |
Application/Purpose |
Type(s) FastEthernet (fa) GigabitEthernet (gi) FiveGigabitEthernet (fi) TenGigabitEthernet (te) |
Type changes with sw model: 3550/60 - fa 3750, 2960, 9200, 930024UN - gi 930048UN - fi |
Stack Member Number 1-8 (Ex: 1/0/1) |
Identifies int. switch stack position |
Module Number 0-1 (Ex: 1/1/1) |
Identifies module number 0 = switch port 1 = uplink port |
Port Number Ex: 1/0/1 - 1/0/48 1/1/1 - 1/1/4 |
Identifies int. number on switch 1-48 = switch ports 1-4 = uplink ports |
|
Config Commands for Interfaces
Command |
Purpose |
switchport access vlan # |
Assigns interface to the specified VLAN |
switchport mode [mode] Access Trunk |
Changes an interface's mode
|
switchport voice vlan # |
Assigns interface to the specified voice VLAN |
ip dhcp snooping trust |
Enables the DHCP snooping security feature. Needed on trunk ports.* |
*ip dhcp snooping trust will make the port trusted and DHCP server messages/traffic can flow through that interface. Messages will be dropped otherwise.
|
Helpful Shortcuts on the Keyboard
Shortcut |
Purpose |
Ctrl-Z |
Goes back to Privileged EXEC Mode (Switch#) |
Tab |
Autofills the rest of the command |
Up Arrow |
Types the last command entered |
Right Click |
Pastes what is currently copied in the clipboard |
Commands for when you don't want to type everything in Cisco CLI.
|
Commands for Wiping a Switch
Command |
Purpose |
delete vlan.dat |
Deletes VLAN Database from switch |
write erase |
Erases configuration files |
reload |
Prompts the switch to reboot |
These commands can be performed in Privileged EXEC Mode. After executing the reload command, do not save the system configuration, as seen below:
System configuration has been modified. Save? [yes/no]: n
|
Created By
Metadata
Comments
No comments yet. Add yours below!
Add a Comment
Related Cheat Sheets