Cisco CLI Commands Cheat Sheet (IOS)
Cisco CLI Cheatsheet
General Commands
| Command | Description |
|---|---|
enable |
Enter privileged mode |
configure terminal |
Enter configuration mode |
exit |
Exit current mode |
show running-config |
View current configuration |
show startup-config |
View saved configuration |
write memory |
Save configuration |
show version |
System version info |
show interfaces |
View interfaces |
VLAN & Switching
| Command | Description |
|---|---|
vlan 10 |
Create VLAN 10 |
interface vlan 10 |
Configure VLAN interface |
switchport mode access |
Set port as access |
switchport access vlan 10 |
Assign VLAN to port |
show vlan brief |
View VLANs |
spanning-tree mode rapid-pvst |
Enable Rapid-PVST |
Routing
| Command | Description |
|---|---|
ip route 0.0.0.0 0.0.0.0 192.168.1.1 |
Add static route |
router ospf 1 |
Enable OSPF process 1 |
network 192.168.0.0 0.0.0.255 area 0 |
Add network to OSPF |
show ip route |
View routing table |
BGP
| Command | Description |
|---|---|
router bgp 65001 |
Enable BGP with ASN 65001 |
neighbor 192.168.1.2 remote-as 65002 |
Add BGP neighbor |
network 10.0.0.0 mask 255.0.0.0 |
Advertise network in BGP |
IP Services / Security
| Command | Description |
|---|---|
show access-lists |
View ACLs |
copy running-config startup-config |
Save configuration |
ping 8.8.8.8 |
Check host reachability |
traceroute 8.8.8.8 |
Trace route |