A little cheat-sheet for some of the Cisco CLI commands. I can’t guarantee that this is a complete list.

Level Legend
user EXEC>
privileged EXEC#
global config.conf
interface config.if
router config.rout
Command Table

Italics denote user-selected input, curly braces denote optional extra commands

?contextual command — use this while typing a command for a list of options, or run by itself for a list of all available commands on the systemanyany
channel-group virtual-interface-number mode EtherChannel-modeSets the selected interface(s) to the specified EtherChannel protocol & mode. See EtherChannel for more info.ifswitch
channel-protocol protocolExplicitly configure which EtherChannel protocol the selected interface(s) will use. This command is mostly useless as setting the EtherChannel mode (which must be done anyway) will automatically select the correct protocol anyway. Possible values for protocol are lacp and pagp. If you later try to configure a mode with a conflicting protocol to the one specified with this command you will receive a protocol mismatch error.ifswitch
configure terminalenter global configuration mode#any
do ___run a command in global config mode without having to exitconfany
enableenter privileged EXEC mode>any
enable password passwordConfigure a plaintext password for privileged EXEC mode — inadvisable#any
enable secret passwordEnables a type 5 MD5 encrypted password. Supersedes normal passwords. The least you could do, really.#any
exitexit current mode to next lower lever, e.g. global config privileged EXEC, priv. EXEC user EXECanyany
interface interface-identer configuration for the particular interfaceconf, ifany
interface range interface-idsSelect multiple interfaces at once for simultaneous configuration. You can select multiple consecutive IDs with a dash (e.g. Fa0/1-5), or you can select non-consecutive IDs with a comma-separated list (e.g. Fa0/1,2,5)conf, ifswitch
port-channel load-balance balance-methodChange the current EtherChannel [[Cisco CCNA/Networking/EtherChannel#Load-Balancing | confswitch
service password-encryptionEncrypt current and future passwords using type 7 Cisco encryption. Still inadvisable.#any
show datapresents requested information; there’s a lot of possible values for (x) here#any
show etherchannel load-balanceDisplays the current EtherChannel [[Cisco CCNA/Networking/EtherChannel#Load-Balancing | #switch
show etherchannel port-channeldisplays information about the virtual port-channel interfaces on the switch#switch
show etherchannel summaryDisplays basic info about EtherChannel] on the switch#switch
show interfaces interface-id switchportdisplays switchport mode and other info of specified interface#switch
show interfaces trunkdisplays which interfaces are configured as trunk ports, as well as which VLANs are allowed on each#switch
show ip routeshows the current routing table#switch
show spanning-tree {vlan vlan-id-number}Displays STP info and whether the switch is root. Optional VLAN specification, if omitted will display for all VLANs#switch
show vlan {brief}shows info about all VLANs configured on the device#switch
show vtp statusshows useful information about a switch’s [[DTP & VTP#VTP\VTP]] capabilities and configuration#
spanning-tree bpduguard enableenables [[STP#BPDU Guard\STP BPDU Guard]] on the interfaceif
spanning-tree mode modeChange the STP mode of the switch. Available modes: mst, pvst, rapid-pvstconfswitch
spanning-tree portfastenable [[STP#Portfast \STP Portfast]] on the interfaceif
spanning-tree portfast bpduguard defaultenables [[STP#BPDU Guard \STP BPDU Guard]] on all portfast-enabled interfacesconf
spanning-tree portfast defaultenable [[STP#Portfast \STP Portfast]] on all access portsconf
spanning-tree vlan vlan-number cost costManually configure the route cost of an interface. Value must be and integer between 1 and 2,000,000.ifswitch
spanning-tree vlan vlan-number port-priority priorityManually configure the port priority of the interface. Value must be between 0 and 224 in increments of 32.ifswitch
spanning-tree vlan vlan-number root primarySets the switch as the root by changing its STP priority to 24576 (or 4096 less than the lowest priority of any other switch on the network)confswitch
spanning-tree vlan vlan-number root secondarySets the switch as next-in-line to be root by changing its STP priority to 28672confswitch
switchport nonegotiateDisable [[DTP & VTP#DTP\DTP]] negotiation on the interfaceif
router ripEnter RIP configuration modeconfrouter
no auto-summaryDisables auto-conversion of networks the router advertises to classful networks. You need to use this to properly handle subnets on a RIP-enabled router. See RIP and EIGRProut (RIP/EIGRP)router
version version-numberSelect the version of RIP to be used. You probably want at least version 2 for subnetting support. See RIProut (RIP)router
network ip-addressOSPF: Same as EIGRP, see below. See OSPF

EIGRP: Works like in RIP (see below), although you can specify a netmask. Assumes classful address if no mask specified. See EIGRP#Configuration

RIP: Prompt RIP to look for interfaces with an IP address that are within the specified range, then activate any such interfaces it finds. It will also form adjacencies with connected RIP-enabled neighbors and advertise the network prefix of the interface (not the prefix of the address provided in this command, see below).

This command is classful. Whatever address you ender will be converted to a classful network address e.g. will be converted to Hence, you don’t need to specify a netmask.

rout (RIP/EIGRP)router
passive-interface interface-idTell the Dynamic Routing protocol that an interface does not have any RIP/EIGRP neighbors and advertisements should not be sent along that interface. The router will continue to advertise the connected network prefix to its RIP/EIGRP-enabled neighbors. See RIP and EIGRProut (RIP/EIGRP)router
default-information originateShares the router’s default route with RIP.rout (RIP)router
show ip protocolsShows information about current IP protocols, including the current Dynamic Routing protocol and related info.#router
maximum paths numberSet the maximum number of paths that RIP will use to load-balance traffic in ECMP. Default 4.rout (RIP)router
router eigrp numberEnter EIGRP configuration mode. The number denotes the Autonomous System (AS) number. The AS number must match between routers for them to form an adjacency.confrouter
router ospf process-IDEnter OSPF configuration mode. The process ID is locally significant; routers with different process IDs can still become OSPF neighbors. See OSPFconfrouter
show interface interface-IDShows some diagnostic info on a specific interface.#any
show ip ospf databaseDisplays the entire OSPF LSDB#router
show ip ospf neighborDisplays the router’s OSPF neighbors#router
show ip ospf interface [interface-ID]Displays OSPF information about interfaces. Add an interface ID for information on a specific interface, or leave blank for information about all interfaces.#router
auto-cost reference-bandwidth mbpsChange the OSPF reference bandwidth used for making cost calculations. The default is 100 Mbps. It is recommended to use a higher value than the default. Ideally, use a value higher than the fastest links in the network.rout (OSPF)router
bandwidth bandwidthChange the configured bandwidth of an interface. Doesn’t actually make the interface operate faster or slower, but this value is used in a number of calculations, including some Dynamic Routing Protocol’s metric calculations. If you want to change the speed at which the interface actually operates, use the speed command. Bandwidth is specified in kilobits-per-second.ifany
speed speedChanges the speed at which the interface operates.ifany
Abbreviations and Autocomplete
  • You never need to type out the entire command in a Cisco CLI; you only need enough letters that there’s only one possible meaning for the command
    • e.g. conf t will be interpreted as configure terminal
  • pressing tab while typing a word will autofill the completed keyword if there is only one command applicable