Comprehensive Cisco Networking Cheatsheet: Commands, Protocols & Best Practices

Introduction to Cisco Networking

Cisco networking encompasses the hardware, software, protocols, and methodologies used to design, implement, and maintain networks built with Cisco equipment. As the leading networking equipment manufacturer worldwide, Cisco provides a comprehensive ecosystem of routers, switches, wireless devices, security appliances, and software that form the backbone of many enterprise networks. Understanding Cisco networking is crucial for network engineers, administrators, and IT professionals who maintain critical infrastructure that connects modern businesses and organizations.

Core Networking Concepts and Principles

OSI and TCP/IP Models

OSI LayerFunctionTCP/IP EquivalentExample Protocols
7. ApplicationEnd-user processesApplicationHTTP, FTP, SMTP, DNS
6. PresentationData translationApplicationSSL/TLS, JPEG, ASCII
5. SessionSession managementApplicationNetBIOS, SIP
4. TransportEnd-to-end connectionsTransportTCP, UDP
3. NetworkLogical addressingInternetIP, ICMP, OSPF, EIGRP
2. Data LinkPhysical addressingNetwork AccessEthernet, PPP, HDLC
1. PhysicalMedia, signals, transmissionNetwork AccessRS-232, Ethernet PHY

Network Addressing

  • IPv4: 32-bit addresses (e.g., 192.168.1.1)

    • Classes: A (1-126), B (128-191), C (192-223), D (224-239), E (240-255)
    • Private ranges: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16
    • Subnet mask: Defines network/host portions (e.g., 255.255.255.0)
  • IPv6: 128-bit addresses (e.g., 2001:0db8:85a3:0000:0000:8a2e:0370:7334)

    • Address types: Unicast, Multicast, Anycast
    • Special addresses: Link-local (fe80::/10), Unique Local (fc00::/7)
  • MAC Addressing: 48-bit physical addresses (e.g., 00:0c:29:d1:81:6f)

    • OUI: First 24 bits identify manufacturer
    • NIC specific: Last 24 bits unique to device

Cisco IOS Command Structure

Access Modes

ModePrompt ExampleAccess MethodUsed For
User EXECRouter>Initial loginBasic status and diagnostics
Privileged EXECRouter#enable from User EXECAdvanced diagnostics, configurations
Global ConfigurationRouter(config)#configure terminal from PrivilegedSystem-wide parameters
Interface ConfigurationRouter(config-if)#interface type number from GlobalInterface specific settings
Line ConfigurationRouter(config-line)#line type number from GlobalTerminal line settings
Router ConfigurationRouter(config-router)#router protocol from GlobalRouting protocol configuration

Basic Navigation Commands

Router> enable                   // Enter privileged mode
Router# configure terminal       // Enter global configuration mode
Router(config)# exit             // Go back one level
Router# disable                  // Return to user mode
Router# show history             // Show command history
Ctrl+A                           // Move to beginning of line
Ctrl+E                           // Move to end of line
Ctrl+Z                           // Return to privileged mode

Context-Sensitive Help

Router# show ?                   // List available show commands
Router(config)# interface ?       // List available interfaces
command-word ?                   // Shows available options/parameters
command-word <TAB>               // Auto-completes command

Essential Cisco Device Configuration

Initial Device Setup

Router> enable
Router# configure terminal
Router(config)# hostname [name]
Router(config)# enable secret [password]
Router(config)# line console 0
Router(config-line)# password [password]
Router(config-line)# login
Router(config-line)# exit
Router(config)# line vty 0 4
Router(config-line)# password [password]
Router(config-line)# login
Router(config-line)# exit
Router(config)# service password-encryption
Router(config)# banner motd # [message] #
Router(config)# no ip domain-lookup         // Prevents DNS lookups on typos

Interface Configuration

Router(config)# interface [type][number]
Router(config-if)# description [text]
Router(config-if)# ip address [ip-address] [subnet-mask]
Router(config-if)# no shutdown
Router(config-if)# exit

// Ethernet interface example
Router(config)# interface GigabitEthernet0/0
Router(config-if)# ip address 192.168.1.1 255.255.255.0
Router(config-if)# no shutdown

// Serial interface example
Router(config)# interface Serial0/0/0
Router(config-if)# ip address 10.0.0.1 255.255.255.252
Router(config-if)# clock rate 64000         // DCE side only
Router(config-if)# no shutdown

VLAN Configuration (Switches)

// Creating VLANs
Switch(config)# vlan 10
Switch(config-vlan)# name Finance
Switch(config-vlan)# exit

// Assigning ports to VLANs (access mode)
Switch(config)# interface GigabitEthernet0/1
Switch(config-if)# switchport mode access
Switch(config-if)# switchport access vlan 10

// Configuring trunk ports
Switch(config)# interface GigabitEthernet0/24
Switch(config-if)# switchport mode trunk
Switch(config-if)# switchport trunk allowed vlan 10,20,30
Switch(config-if)# switchport trunk native vlan 1

Saving and Managing Configurations

Router# copy running-config startup-config  // Save config
Router# show running-config                 // View current config
Router# show startup-config                 // View saved config
Router# erase startup-config                // Erase saved config
Router# reload                              // Reboot the device
Router# show flash:                         // View files in flash

// Backup to TFTP server
Router# copy running-config tftp://10.1.1.1/router-backup.cfg

Routing Protocols and Configuration

Static Routing

Router(config)# ip route [destination-network] [subnet-mask] [next-hop-ip|exit-interface] [distance]

// Examples
Router(config)# ip route 192.168.2.0 255.255.255.0 10.0.0.2
Router(config)# ip route 0.0.0.0 0.0.0.0 203.0.113.1    // Default route

Dynamic Routing Protocols Comparison

ProtocolTypeMetricADArea SupportVLSM SupportUpdate Method
RIPDistance VectorHop Count120NoRIPv2 onlyPeriodic (30s)
EIGRPAdvanced DVComposite90NoYesTriggered
OSPFLink StateCost (bandwidth)110YesYesTriggered
IS-ISLink StateCost115YesYesTriggered
BGPPath VectorPath Attributes20/200NoYesIncremental

RIP Configuration

Router(config)# router rip
Router(config-router)# version 2
Router(config-router)# no auto-summary
Router(config-router)# network 192.168.1.0
Router(config-router)# network 10.0.0.0

EIGRP Configuration

Router(config)# router eigrp 100              // 100 is the AS number
Router(config-router)# no auto-summary
Router(config-router)# network 192.168.1.0 0.0.0.255
Router(config-router)# network 10.0.0.0 0.0.0.3

// Named mode (newer method)
Router(config)# router eigrp MYEIGRP
Router(config-router)# address-family ipv4 autonomous-system 100
Router(config-router-af)# network 192.168.1.0 0.0.0.255
Router(config-router-af)# network 10.0.0.0 0.0.0.3

OSPF Configuration

Router(config)# router ospf 1                // 1 is the process ID
Router(config-router)# network 192.168.1.0 0.0.0.255 area 0
Router(config-router)# network 10.0.0.0 0.0.0.3 area 0
Router(config-router)# router-id 1.1.1.1

// Interface specific OSPF
Router(config)# interface GigabitEthernet0/0
Router(config-if)# ip ospf 1 area 0
Router(config-if)# ip ospf priority 100     // For DR/BDR election

BGP Configuration

Router(config)# router bgp 65001            // Local AS number
Router(config-router)# neighbor 203.0.113.2 remote-as 65002
Router(config-router)# network 192.168.1.0 mask 255.255.255.0

Switching Technologies and Spanning Tree

Spanning Tree Protocol (STP) Modes

ModeIEEE StandardFeatures
STP802.1DOriginal STP (slow convergence, ~50s)
PVST+Cisco ProprietaryPer-VLAN STP
RSTP802.1wRapid STP (faster convergence, ~6s)
Rapid PVST+Cisco ProprietaryPer-VLAN RSTP
MSTP802.1sMultiple STP (multiple instances)

STP Port States

Legacy STPRSTPDescription
DisabledDiscardingPort is administratively down
BlockingDiscardingPort does not forward frames but listens to BPDUs
ListeningDiscardingTransitory state (no longer used in RSTP)
LearningLearningPort learns MAC addresses but doesn’t forward frames
ForwardingForwardingPort fully operational, forwards frames

STP Configuration

// Enable PVST+
Switch(config)# spanning-tree mode pvst

// Configure root bridge manually
Switch(config)# spanning-tree vlan 10 root primary
Switch(config)# spanning-tree vlan 20 root secondary

// Port configuration
Switch(config)# interface GigabitEthernet0/1
Switch(config-if)# spanning-tree portfast     // For access ports only
Switch(config-if)# spanning-tree bpduguard enable

// Rapid PVST+
Switch(config)# spanning-tree mode rapid-pvst

EtherChannel Configuration

// Port Channel using LACP
Switch(config)# interface range GigabitEthernet0/1-2
Switch(config-if-range)# channel-protocol lacp
Switch(config-if-range)# channel-group 1 mode active
Switch(config-if-range)# exit
Switch(config)# interface Port-channel 1
Switch(config-if)# switchport mode trunk

// Port Channel using PAgP
Switch(config)# interface range GigabitEthernet0/3-4
Switch(config-if-range)# channel-protocol pagp
Switch(config-if-range)# channel-group 2 mode desirable

Network Security Features

Access Control Lists (ACLs)

// Standard ACL (filters by source IP only)
Router(config)# access-list 10 permit 192.168.1.0 0.0.0.255
Router(config)# access-list 10 deny any
Router(config)# interface GigabitEthernet0/0
Router(config-if)# ip access-group 10 in

// Extended ACL (filters by source, destination, protocol, port)
Router(config)# access-list 100 permit tcp 192.168.1.0 0.0.0.255 any eq 80
Router(config)# access-list 100 permit tcp 192.168.1.0 0.0.0.255 any eq 443
Router(config)# interface GigabitEthernet0/0
Router(config-if)# ip access-group 100 out

// Named ACLs (more readable)
Router(config)# ip access-list extended WEB-TRAFFIC
Router(config-ext-nacl)# permit tcp 192.168.1.0 0.0.0.255 any eq 80
Router(config-ext-nacl)# permit tcp 192.168.1.0 0.0.0.255 any eq 443
Router(config-ext-nacl)# deny ip any any
Router(config-ext-nacl)# exit
Router(config)# interface GigabitEthernet0/0
Router(config-if)# ip access-group WEB-TRAFFIC out

Port Security (Switches)

Switch(config)# interface GigabitEthernet0/1
Switch(config-if)# switchport mode access
Switch(config-if)# switchport port-security
Switch(config-if)# switchport port-security maximum 2
Switch(config-if)# switchport port-security mac-address sticky
Switch(config-if)# switchport port-security violation shutdown

AAA Configuration

// Enable AAA
Router(config)# aaa new-model

// Configure local authentication
Router(config)# aaa authentication login default local
Router(config)# username admin privilege 15 secret Str0ngP@ssw0rd

// RADIUS authentication
Router(config)# radius-server host 192.168.1.100 key RadiusSecret
Router(config)# aaa authentication login default group radius local

Network Address Translation (NAT)

NAT Types

  • Static NAT: 1:1 mapping of inside to outside addresses
  • Dynamic NAT: Many-to-many mapping using address pools
  • PAT/NAT Overload: Many-to-one mapping (most common)

NAT Configuration

// Define inside and outside interfaces
Router(config)# interface GigabitEthernet0/0
Router(config-if)# ip nat inside
Router(config-if)# exit
Router(config)# interface GigabitEthernet0/1
Router(config-if)# ip nat outside

// Static NAT
Router(config)# ip nat inside source static 192.168.1.10 203.0.113.5

// Dynamic NAT
Router(config)# ip nat pool NAT-POOL 203.0.113.10 203.0.113.20 netmask 255.255.255.0
Router(config)# access-list 1 permit 192.168.1.0 0.0.0.255
Router(config)# ip nat inside source list 1 pool NAT-POOL

// PAT (NAT Overload) - Most commonly used
Router(config)# access-list 1 permit 192.168.1.0 0.0.0.255
Router(config)# ip nat inside source list 1 interface GigabitEthernet0/1 overload

DHCP Configuration

Router as DHCP Server

Router(config)# ip dhcp excluded-address 192.168.1.1 192.168.1.10
Router(config)# ip dhcp pool LAN-POOL
Router(dhcp-config)# network 192.168.1.0 255.255.255.0
Router(dhcp-config)# default-router 192.168.1.1
Router(dhcp-config)# dns-server 8.8.8.8 8.8.4.4
Router(dhcp-config)# lease 7

DHCP Relay

Router(config)# interface GigabitEthernet0/0
Router(config-if)# ip helper-address 10.1.1.100

Common Troubleshooting Commands

Connectivity Testing

Router# ping 192.168.1.1
Router# traceroute 8.8.8.8
Router# telnet 192.168.1.1 80

Interface and Status Verification

Router# show interfaces
Router# show interfaces status
Router# show interfaces GigabitEthernet0/0
Router# show ip interface brief
Router# show controllers serial0/0/0    // Check DTE/DCE, cable

Routing Information

Router# show ip route
Router# show ip route 192.168.1.0
Router# show ip protocols
Router# show ip ospf neighbor
Router# show ip ospf database
Router# show ip eigrp neighbors
Router# show ip eigrp topology
Router# show ip bgp summary
Router# show ip bgp

Switching Information

Switch# show mac address-table
Switch# show vlan brief
Switch# show spanning-tree
Switch# show spanning-tree vlan 10
Switch# show etherchannel summary
Switch# show cdp neighbors
Switch# show cdp neighbors detail

Debug Commands

Router# debug ip packet            // Very high overhead - use with caution
Router# debug ip routing
Router# debug ip ospf events
Router# debug ip eigrp packets
Router# undebug all                // Turn off all debugging

Common Challenges and Solutions

Connectivity Issues

  • Problem: No IP connectivity
  • Solutions:
    • Verify physical connectivity (check cables, interface status)
    • Confirm IP addressing and subnet masks
    • Check for ACLs that might be blocking traffic
    • Verify routing table entries
    • Check NAT configuration if crossing address spaces

Routing Problems

  • Problem: Routes not appearing in routing table
  • Solutions:
    • Verify network statements match local interface networks
    • Check for redistribution issues between protocols
    • Confirm that routes aren’t filtered by distribute-lists
    • Verify neighbor relationships are established
    • Check authentication if configured

Spanning Tree Issues

  • Problem: Network loops or blocked ports
  • Solutions:
    • Map out the physical topology
    • Verify root bridge placement is optimal
    • Check for unidirectional link failures
    • Consider using UDLD to detect one-way connections
    • Implement loop prevention with BPDU Guard and Root Guard

Performance Degradation

  • Problem: Slow network performance
  • Solutions:
    • Check for duplex mismatches
    • Monitor interface utilization
    • Look for excessive collisions on half-duplex segments
    • Verify QoS configurations
    • Check for oversubscription of links

Best Practices and Practical Tips

Network Design Principles

  • Follow a hierarchical design (Core, Distribution, Access)
  • Implement redundancy at critical points
  • Segment broadcast domains appropriately
  • Plan for scalability from the beginning
  • Document everything!

Security Best Practices

  • Use strong passwords and encryption
  • Implement least privilege principles
  • Disable unused ports and services
  • Use port security and DHCP snooping
  • Keep device firmware and IOS updated
  • Use dedicated management interfaces or VLANs
  • Implement robust logging and monitoring

Configuration Management

  • Backup configurations regularly
  • Use standardized configuration templates
  • Maintain change control procedures
  • Test changes in lab environments first
  • Use configuration versioning
  • Consider automated configuration management tools

Performance Optimization

  • Implement QoS for sensitive traffic
  • Configure appropriate buffer sizes
  • Use hardware switching where possible
  • Optimize routing protocol timers for stability
  • Consider link aggregation for bandwidth needs
  • Monitor CPU and memory utilization

Resources for Further Learning

Official Cisco Resources

Certification Resources

  • CCNA: Cisco Certified Network Associate
  • CCNP: Cisco Certified Network Professional (Enterprise, Security, etc.)
  • CCIE: Cisco Certified Internetwork Expert

Books

  • “Cisco Press – CCNA 200-301 Official Cert Guide”
  • “Routing TCP/IP, Volume 1” by Jeff Doyle
  • “Cisco Routers for the Desperate” by Michael W. Lucas
  • “Network Warrior” by Gary A. Donahue

Online Training

Scroll to Top