Show Menu
Cheatography

NET-126 Commands Cheat Sheet by

List of commands for exam prep

[Router] Basic Config­uration

Short Command
Full-L­ength Command
ho R1
hostname R1
no ip dom lo
no ip domain­-lookup
ena sec class
enable secret class
ser pass
service password-encryption
banner motd #Authorized access ONLY!#
banner motd #[Text]#
login blo 120 a 3 w 30
login block-for 120 attempts 3 within 30
 
lin con 0
line console 0
pass cisco
password cisco
login
login
logg sync
logging synchr­onous
exec-t 5 0
exec-t­imeout 5 0
 
lin vty 0 15
line vty 0 15
pass cisco
password cisco
login
login
logg sync
logging synchr­onous
exec-t 5 0
exec-t­imeout 5 0
 
int g0/0
interface [inter­face]
desc Connected to G0/0 on R2
descri­ption [text]
ip add 10.1.1.1 255.255.255.0
ip address [address] [subnet-mask]
no shut
no shutdown
exit
exit

[Switch] Basic Config­uration

Short Command
Full-L­ength Command
ho S1
hostname S1
no ip dom lo
no ip domain­-lookup
ena sec class
enable secret class
service password-e
service password-encryption
 
lin con 0
line console 0
pass cisco
password cisco
login
login
logg sync
logging synchr­onous
exec-t 5 0
exec-t­imeout 5 0
 
lin vty 0 15
line vty 0 15
pass cisco
password cisco
login
login
logg sync
logging synchr­onous
exec-t 5 0
exec-t­imeout 5 0
exit
exit

[Switch] VLAN Config­uration

Short Command
Full-L­ength Command
int vl 10
interface vlan [vlan-number]
na Students
name [vlan-­name]
exit
exit
 
int f0/5
interface [inter­face]
sw m a
switchport mode access
sw a v 10
switchport access vlan [vlan-number]
exit
exit

[Switch] Port Security

Short Command
Full-L­ength Command
sw port
switchport port-security
sw port max 2
switchport port-security maximum 2
sw port mac st
switchport port-security mac-address sticky
sw port v shut
switchport port-s­ecurity violation [mode]
* Only on access ports, not trunking ports!

[Switch] VLAN Trunking

Short Command
Full-L­ength Command
int f0/5
interface [inter­face]
sw m t
switchport mode trunking
sw t n v 30
switchport trunking native vlan 30
sw t a v 10,20,30
switchport trunking access vlan 10,20,30
sw non
switchport nonego­tiate

[Route­r/S­witch] SSH Config­uration

Short Command
Full-L­ength Command
usern admin sec cisco
username [name] secret [password]
ip dom n ccna-labs.com
ip domain-name [domain]
cry key gen rsa gen mod 1024
crypto key generate rsa general-keys modulus 1024
ip ssh v 2
ip ssh version 2
 
lin vty 0 15
line vty 0 15
login lo
login local
trans in ssh
transport input ssh

Router­-On­-A-­Stick Config­uration

Short Command
Full-L­ength Command
int g0/0.10
interface [subin­ter­face]
enc dot 10
encapsulation dot1Q [vlan-number]
desc Gateway for Students VLAN
descri­ption [text]
ip add 10.1.2.1 255.255.255.0
ip address [address] [subnet-mask]
 
int g0/0.20
interface [subin­ter­face]
enc dot 20
encapsulation dot1Q [vlan-number]
desc Gateway for Faculty VLAN
descri­ption [text]
ip add 10.1.3.1 255.255.255.0
ip address [address] [subnet-mask]
exit
exit
 
int g0/0
interface [inter­face]
no shut
no shutdown
exit
exit

RIP Config­uration

Short Command
Full-L­ength Command
ip route 0.0.0.0 0.0.0.0 s0/0/0
ip route 0.0.0.0 0.0.0.0 [exit-interface]
router rip
router rip
ver 2
version 2
no auto
no auto-s­ummary
net 192.16­8.1.0
network [netwo­rk-­add­ress]
pa g0/0
passiv­e-i­nte­rface [inter­face]
*
def o
defaul­t-i­nfo­rmation originate
* Only on router connected to internet
exit
exit

DHCP Config­uration

Short Command
Full-L­ength Command
--- DHCP Server ---
ip dhcp ex 192.168.1.1 192.168.1.5
ip dhcp excluded-address [first-IP] [last-IP]
ip dhcp pool R1_Pool
ip dhcp pool [pool-­name]
netw 192.16­8.1.0 255.25­5.255.0
network [network-address] [subnet-mask]
def 192.16­8.1.1
defaul­t-r­outer [defau­lt-­gat­ewa­y-IP]
exit
exit
 
--- Relay Router ---
int g0/0
interface [inter­face]
ip dhcp help [serve­r-IP]
ip dhcp helper­-ad­dress [serve­r-IP]
exit
exit

NAT Config­uration

Short Command
Full-L­ength Command
acc s 10 p 192.16­8.1.0
access-list standard [acl-number] permit [address]
ip nat pool CorpNet 209.165.200.10
209.165.200.13 net 255.255.255.0
ip nat pool [pool-name] [first-IP] [last-IP] network [subnet-mask]
ip nat in s list 10 pool CorpNet ov
ip nat inside source list [acl-number] pool [pool-name] overload
no auto
no auto-s­ummary
pass g0/0
passiv­e-i­nte­rface g0/0
 
int g0/0
interface [inter­face]
ip nat in
ip nat inside
int s0/0/0
interface [inter­face]
ip nat out
ip nat outside
exit
exit
                       
 

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          Cisco Switch Configuration Cheat Sheet

          More Cheat Sheets by Tamaranth

          Basic Cisco IOS Commands Cheat Sheet
          Minecraft Item IDs Cheat Sheet