Cisco Packet Tracer 8.2.0 Cheat Sheet

Basic Switch Configuration

Entering Configuration Modes

# Enter privileged EXEC mode
Switch> enable

# Enter global configuration mode
Switch# configure terminal
Switch(config)#

# Exit configuration mode
Switch(config)# exit
Switch(config)# end

Setting Hostname

# Set switch hostname
Switch(config)# hostname Switch1
Switch1(config)#

Password Configuration

# Set enable password (encrypted)
Switch1(config)# enable secret enable

# Set console password
Switch1(config)# line console 0
Switch1(config-line)# password console123
Switch1(config-line)# login
Switch1(config-line)# exit

SSH Configuration

Basic SSH Setup

# Set domain name
Switch1(config)# ip domain-name nasa.com

# Generate RSA key pair
Switch1(config)# crypto key generate rsa
# Choose key size (recommended: 1024 or 2048 bits)

# Set SSH version
Switch1(config)# ip ssh version 2

VTY Line Configuration

# Configure VTY lines 0-4 for SSH only
Switch1(config)# line vty 0 4
Switch1(config-line)# transport input ssh
Switch1(config-line)# login local
Switch1(config-line)# exit

# Disable VTY lines 5-15
Switch1(config)# line vty 5 15
Switch1(config-line)# transport input none
Switch1(config-line)# exit

User Account Management

# Create user with highest privilege
Switch1(config)# username admin privilege 15 secret nasa2025

# Create regular user
Switch1(config)# username user1 privilege 1 secret userpass

VLAN Configuration

Creating VLANs

# Create VLAN and assign name
Switch1(config)# vlan 10
Switch1(config-vlan)# name VLAN10
Switch1(config-vlan)# exit

Assigning Ports to VLANs

# Assign single port to VLAN
Switch1(config)# interface FastEthernet0/1
Switch1(config-if)# switchport mode access
Switch1(config-if)# switchport access vlan 10
Switch1(config-if)# exit

# Assign multiple ports to same VLAN
Switch1(config)# interface range fa0/1-5
Switch1(config-if-range)# switchport mode access
Switch1(config-if-range)# switchport access vlan 10
Switch1(config-if-range)# exit

Trunk Configuration

# Configure trunk port
Switch1(config)# interface GigabitEthernet0/1
Switch1(config-if)# switchport mode trunk
Switch1(config-if)# switchport trunk allowed vlan 10,20,99
Switch1(config-if)# exit

# Set native VLAN (optional)
Switch1(config-if)# switchport trunk native vlan 99

LACP Configuration

# Configure EtherChannel with LACP
Switch1(config)# interface range GigabitEthernet0/1-2
Switch1(config-if-range)# shutdown
Switch1(config-if-range)# switchport mode trunk
Switch1(config-if-range)# channel-group 1 mode active
Switch1(config-if-range)# exit

# Configure port-channel interface
Switch1(config)# interface port-channel 1
Switch1(config-if)# switchport mode trunk
Switch1(config-if)# exit

# Re-enable interfaces
Switch1(config)# interface range GigabitEthernet0/1-2
Switch1(config-if-range)# no shutdown
Switch1(config-if-range)# exit

SNMP Configuration

Basic SNMP Setup

# Configure SNMP community string (read-only)
Switch0(config)# snmp-server community monitor ro

# Configure SNMP community string (read-write)
Switch0(config)# snmp-server community admin rw

# Set SNMP location and contact
Switch0(config)# snmp-server location "Building A, Floor 2"
Switch0(config)# snmp-server contact "admin@company.com"

Interface Configuration

Basic Interface Commands

# Enter interface configuration
Switch1(config)# interface FastEthernet0/1
Switch1(config-if)#

# Enable/disable interface
Switch1(config-if)# no shutdown  # Enable
Switch1(config-if)# shutdown     # Disable

Interface Range Commands

# Configure multiple interfaces simultaneously
Switch1(config)# interface range fa0/1-10
Switch1(config-if-range)# switchport mode access
Switch1(config-if-range)# switchport access vlan 10
Switch1(config-if-range)# exit

Show Commands (Verification)

General Information

# Show running configuration
Switch1# show running-config

# Show startup configuration
Switch1# show startup-config

# Show version information
Switch1# show version

# Show interfaces status
Switch1# show interfaces status

VLAN Information

# Show VLAN information
Switch1# show vlan brief
Switch1# show vlan

# Show interfaces and their VLAN assignments
Switch1# show interfaces switchport

EtherChannel Information

# Show EtherChannel summary
Switch1# show etherchannel summary

# Show port-channel information
Switch1# show interfaces port-channel 1

SSH and Security

# Show SSH connections
Switch1# show ssh

# Show users currently logged in
Switch1# show users

# Show crypto key information
Switch1# show crypto key mypubkey rsa

Saving Configuration

Save Commands

# Save running config to startup config
Switch1# copy running-config startup-config
Switch1# write memory  # Alternative command
Switch1# wr           # Shortest form

# Copy config to TFTP server
Switch1# copy running-config tftp