Show Menu

Cisco Switch Configuration Cheat Sheet by

NET-126 Configuration commands for Cisco switches


swi­tchport mode access
port must be in access mode before port-s­ecurity can be configured
switchport port-security
enables port security on that interface
swi­tchport port-s­ecurity maximum 2
sets maximum MAC addresses to 2
swi­tchport port-s­ecurity violat­ion shutdown
sets violation mode to shutdown
(shutdown is default)
switchport port-security mac-address
specified MAC is made sticky
swi­tchport port-s­ecurity mac-ad­dress sticky
converts all dynami­cal­ly-­learned MACs to sticky

VLAN Config­uration

Short Command
Full Command
sw m t
switc­hport mode trunking
sw t n v 99
switchport trunking native
vlan 99
sw t a v 2,10,99
switc­hport trunking access
vlan 2,10,99
sw non
switc­hport nonego­tiate
sw a v 10
switc­hport access vlan 10

Spanning Tree Config­uration


Show Commands

Short Command
Full Command
What It Displays
sh port [int f0/5]
show port-security
[interface f0/5]
secure MACs configured on all (or specified) interface/s
sh int f0/6 sw
show int f0/6
port configuration (mode, trunking, VLANs, etc)
sh vl br
show vlan brief
VLAN numbers, names, status, & ports
sh vl na name
show vlan name name
VLAN number, status, & ports
sh vl sum
show vlan summary
number of existing VLANs
(Doesn't work on PT)
sh int tru
show int trunk
trunk ports, native­/mgmt VLANs, & allowed VLANs
show sdm pre
sh sdm prefer
max # of secure MACs that can be configured

Help Us Go Positive!

We offset our carbon usage with Ecologi. Click the link below to help us!

We offset our carbon footprint via Ecologi


Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          NET-126 Commands Cheat Sheet
          Cisco Device Security Cheat Sheet

          More Cheat Sheets by Tamaranth

          Minecraft Item IDs Cheat Sheet