Last edit: May 28, 2017 12:56:42 PM CDT
List of all cheatsheets
Running Config: RAM
Startup Config: NVRAM
Long Term Storage: Flash
Flash is the default file system.
Startup configuration is used during system boot.
Running configure is the current configuration of the software. Will clear on reboot.
IOS Software Lifecycle
FCS: Initial release
EOS: End of sale
EoSW: End of software maintenance
Last Day of Support: Last date for Cisco support. Once passed, OS is considered obsolete
FCS > {up to 3 years} > EoS > {up to 1 year} > EoSW > Last Date of Support
Type/Slot/Port e.g. gi0/48
Trunks and Access Ports
Access Ports: belong to only one VLAN
Trunk Ports: belong to multiple VLANs; meant for switch to switch/router connections
Full-duplex: stations at each end can send and receive at the same time; gig ports should always be full
Portfast: Puts switch in forwarding state, bypassing STP checks. Don't use a port connected to another switch
- VLANs are local to a switch and the information is not shared between switches (by default)
- Trunk link provides0 VLAN tags for frames between switches
- Trunks carry traffic from all VLANs
- A trunk port is a member of all VLANs on the switch
- Access ports belong only to a single VLAN and carry traffic from only that VLAN
- Trunking must be enabled and of the same type on both ends of the link
Switch OS Images
LANBase: Layer 2 + ACLs + QoS
IPBasE: LANBase+ Edge IP Routing
IP Services: IPBase + Full IP Routing
Cisco Date Code (What Year was a Switch Produced?)
The serial number will be in the format: ‘LLLYYWWSSSS’. “YY” is the year of manufacture and “WW” is the week of manufacture. The date code can be found in the 4 middle digits of the serial number.
Manufacturing Year Codes:
01 = 1997 06 = 2002 11 = 2007 16 = 2012
02 = 1998 07 = 2003 12 = 2008 17 = 2013
03 = 1999 08 = 2004 13 = 2009 18 = 2014
04 = 2000 09 = 2005 14 = 2010 19 = 2015
05 = 2001 10 = 2006 15 = 2011 20 = 2016
Manufacturing Week Codes:
1-5 : January 15-18 : April 28-31 : July 41-44 : October
6-9 : February 19-22 : May 32-35 : August 45-48 : November
10-14 : March 23-27 : June 36-40 : September 49-52 : December
Escape sequence: CTRL+SHIFT+6
Files and File Systems
Equivalent of ls
dir
Equivalent of grep
begin | include
See available filesystems
#sho file systems
Get information about a file
sho file information /path/to/file
View the contents of a file
more {/ascii, /binary} /path/to/file
Delete a file or folder
delete {/force /recursive}
View the contents of a tar file
archive tar /table [source]
Extract files from a tar
archive tar /xtract [source] [destination]
Create a tar
archive tar /create [destination] [source]
Copy Operations
copy [source] [destination]
Copy config to server — #copy system: running-config|startup-config tftp:[IP]
Copy config from server into NVRAM or RAM — #copy tftp:ip/path system:running-config|startup-config
Copy current configuration to NVRAM — #copy run start
Copy startup configuration into RAM — #copy start run
Copy running config to TFP server — #copy run tftp
Configuration Files
What's the startup configuration (in NVRAM)
sho startup-config | sho config
What's the running configuration (in RAM)
sho run
What's the running configuration for a single interface
#sho run int [int]
Get Info
Get uptime (part of system profile)
sho version
See system time
sho clock
Display basic hardware diagnostic information
sho env all
See hardware information
sho inventory
See power information
sho env temp status
Show switch's internal temperature
sho power inline
Display boot information
sho boot
See license information
sho license
What users are configured on the switch
sho users
Display previously entered commands
sho history
See the ARP table
sho ip arp
See the routing table
sho ip route
See the mac-table
sho mac address-table
See what the MAC of the device connected to a port is
sho mac address-table | include [port]
See what the port a device is connected to by it's MAC
sho mac address-table | include [MAC]
Display devices switch/router is connected to
sho cdp neighbors
Display full details for neighbors
sho cdp neighbors detail, including IP address
Display detailed information about a specific neighbor
sho cdp entry [neighbors name | * for all]
Display the cdp information for a particular interface
sho cdp int [int]
See which VLAN(S) a port is in
sho vlan OR sho vlan brief
VLAN 1 is the default for interfaces. Might be a part of two VLANs if a computer is connected through a VOIP phone
See the status for all interfaces, including error state
sho int status
See status and configuration for all interfaces
sho int
Display capabilities of interfaces
sho int capabilities
Display administrative and operational status of all non-routing ports
sho int switchports
Display the usability status of all interfaces configured for IP
sho ip interface
Display the IP addresses configured on a switch or router
sho ip interface brief
See input and output statistics
sho int stats
Display input and output statistics
sho int counters
Port Security details for the device
sho port-security
Port Security details for an interface
sho port-security int [int]
Spanning Tree details
sho spanning-tree
Configuration
Change Configurations
>: access
#: EXEC
config#: Terminal
config-if#: Interface Terminal
End stops all interface configuration
Reset switchport to defaults
#>conf t>default interface [int]
Turn off|on a port
#>conf t>int [int]> shutdown|noshutdown
Configure a range of interfaces at one time
#>conf t>int range [range]
See interface configuration details while in terminal
do sho run | include [int]
Clear interface counters
#clear counters
Configure port speed settings
#>conf t>int> speed 10|100|1000|auto
Configure port duplex settings
#>conf t>int> duplex auto|full|half
Assign a port to a VLAN
#>conf t>int> switchport access vlan [vlan ID]
Set port mode
#>conf t>int> switchport mode access|trunk|dynamic {auto|desirable}
Dynamic: advertise that it can be a trunk; if remote end is a trunk or desirable, then set to trunk
Set Portfast
#>conf t>spanning-tree portfast
Edit a range of switchports simultaneously
#>int range GigabitEthernet4/24-34
Procedures
Configuration for most ports
Enable>conf t> int [int]>
duplex full|auto
speed 1000|auto
switchport mode access
switchport access vlan [number]
description [desc]
no shutdown
end
Locate which switchport a host is plugged into by its IP address
1. Use traceroute to determine host's router
2. Connect to router and dump ARP table
sho arp | include [ip]
3. With MAC address, dump MAC table to get port
sho mac address-table address [MAC]
4. With port value returned:
- If host is directly connected to router, then all set
- If host is connected to another switch, keep tracing
sho run int [int]
This will return the next device in the chain
sho cdp neighbors detail will return more information about the next device
5. Connect to next switch, then
sho mac address-table address [MAC]
6. Get detailed information on port
sho run int [int]
Get the IP for a device on a particular port
1. sho cdp neighbors to get port interface number
2. sho mac address-table | include [int]
3. With the returned MAC, sho ip arp | include [MAC]
Subnetting workflow
1. Draw out powers of two/mask decimal table
2. Figure out number of hosts
3. Figure out number of subnets
4. Write out IP in x.x.(binary)
5. Write out mask in x.x.(binary)
6. Logical AND IP and Mask to get network
7. Figure out first and last based on network and number of hosts ∓ subnets
Detailed Example PDF