Skip to content

Instantly share code, notes, and snippets.

@sarrafgsarraf
Created November 30, 2021 14:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sarrafgsarraf/91b960610fb6d67b145d66ab9a734cb3 to your computer and use it in GitHub Desktop.
Save sarrafgsarraf/91b960610fb6d67b145d66ab9a734cb3 to your computer and use it in GitHub Desktop.
My CCNA CLI List
Goal Command
Enter privileged EXEC mode: enable
Global Configuration Mode: configure terminal / conf t
Check Interface Details sh ip interface brief
Show interface Status show interface status
Switch Interfaces interface fastethernet 0/0
Set IP Address ip address 10.255.255.254 255.0.0.0
Enable Interface no shutdown
Enable Password: enable password <password> [in conf t]
Show running configuration: show running-config
Show start-up configuration: show startup-config
Saving the configuration: write / write memory / copy running-config startup-config
Encrypt passwords: service password-encryption
Enable hashes: Enable secret <password>
Running commands as privileged: do
Delete any command no
Show MAC address in a device show mac address-table
Clearing the MAC Address Table clear mac address-table dynamic
Clearing the MAC Address Table of a device clear mac address-table dynamic address <mac-address>
Configuring speed speed 100
Configuring mode duplex full
Configuring multiple interfaces interface range f0/5 - 12
Show IP Routing Table show ip route
Configure Static Route ip route <destination-address> <mask> <next-hop or exit-interface>
Show existing VLANs sh vlan brief
Set interface as access port switchport mode access
Assign VLAN to port switchport access vlan 10
Change VLAN name vlan 10
name <name>
Check Trunk Ports show interface trunk
Configure Interface as trunk switchport mode trunk encapsulation dot1q
switchport mode trunk
Trunk configuration Switchport trunk allowed vlan <add | WORD | remove> <vlan number>
Configure ROAS Interface g0/0.10 (.10 can be anything, recommended same as vlan no.)
encapsulation dot1q <vlan no.>
ip addr <sub interface ip> <sub interface mask>
Enable Routing on L3 switch ip routing
Convert L3 switch port to router no switchport
Spanning Tree Portfast interface <interface no.>
spanning-tree portfast
Spanning Tree BPDU Guard interface <interface no.>
spanning-tree bpduguard enable
Configure primary root bridge spanning-tree vlan 1 root primary
Ping ping <ip address>
Show ARP Table arp -a
Set ip via DHCP ip dhcp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment