NET-126 Commands Cheat Sheet

A cheat sheet in English by Tamaranth

List of commands for exam prep

16,119 views 3,901 downloads 12 Apr 2018 History
3.8 avg · 1 rating

[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 passwo­rd-­enc­ryption
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.25­5.255.0
ip address [address] [subne­t-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 passwo­rd-­enc­ryption
 
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-s­ecurity
sw port max 2
switchport port-s­ecurity maximum 2
sw port mac st
switchport port-s­ecurity mac-ad­dress 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-l­abs.com
ip domain­-name [domain]
cry key gen rsa gen mod 1024
crypto key generate rsa genera­l-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
encaps­ulation dot1Q [vlan-­number]
desc Gateway for Students VLAN
descri­ption [text]
ip add 10.1.2.1 255.25­5.255.0
ip address [address] [subne­t-mask]
 
int g0/0.20
interface [subin­ter­face]
enc dot 20
encaps­ulation dot1Q [vlan-­number]
desc Gateway for Faculty VLAN
descri­ption [text]
ip add 10.1.3.1 255.25­5.255.0
ip address [address] [subne­t-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-­int­erface]
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.16­8.1.1 192.16­8.1.5
ip dhcp exclud­ed-­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 [netwo­rk-­add­ress] [subne­t-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-n­umber] permit [address]
ip nat pool CorpNet 209.165.200.10
209.165.200.13 net 255.25­5.255.0
ip nat pool [pool-­name] [first-IP] [last-IP] network [subne­t-mask]
ip nat in s list 10 pool CorpNet ov
ip nat inside source list [acl-n­umber] 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

Badges

Nice Cheat Sheet Good Cheat Sheet Downloaded from Unusual Locations × 4

Comments

No comments yet.

Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.