Cisco IOS Cheatsheet
#
Cisco IOS is the operating system used by Cisco devices, including routers and switches. This cheatsheet provides common commands and configurations for Cisco IOS.
Basic Commands
#
Command/Option | Example | Description |
---|
show version | show version | Display the IOS version and device info |
show running-config | show running-config | Display the current configuration |
show startup-config | show startup-config | Display the configuration saved to NVRAM |
configure terminal | configure terminal | Enter global configuration mode |
copy running-config startup-config | copy running-config startup-config | Save the running configuration to startup |
Interface Configuration
#
Command/Option | Example | Description |
---|
interface | interface GigabitEthernet0/1 | Enter interface configuration mode |
ip address | ip address 192.168.1.1 255.255.255.0 | Set IP address and subnet mask |
no shutdown | no shutdown | Enable the interface |
shutdown | shutdown | Disable the interface |
description | description Link to Data Center | Add a description to the interface |
VLAN Configuration
#
Command/Option | Example | Description |
---|
vlan | vlan 10 | Create VLAN with ID 10 |
name | name Sales | Name the VLAN |
interface vlan | interface vlan 10 | Enter VLAN interface configuration mode |
ip address | ip address 192.168.10.1 255.255.255.0 | Assign IP address to VLAN interface |
no vlan | no vlan 10 | Remove VLAN with ID 10 |
Routing Configuration
#
Command/Option | Example | Description |
---|
router ospf | router ospf 1 | Enter OSPF routing configuration mode |
network | network 192.168.1.0 0.0.0.255 area 0 | Configure OSPF network statement |
router bgp | router bgp 65001 | Enter BGP routing configuration mode |
neighbor | neighbor 192.168.1.2 remote-as 65002 | Configure BGP neighbor |
redistribute | redistribute ospf | Redistribute routes between protocols |
Access Control
#
Command/Option | Example | Description |
---|
access-list | access-list 100 permit ip 192.168.1.0 0.0.0.255 any | Create an access control list (ACL) |
ip access-group | ip access-group 100 in | Apply ACL to an interface |
username | username admin privilege 15 password mypass | Create a user with a specified privilege level |
NAT Configuration
#
Command/Option | Example | Description |
---|
ip nat inside source list | ip nat inside source list 1 interface FastEthernet0/1 overload | Configure NAT for inside source |
ip access-list | ip access-list standard 1 | Define NAT access list |
ip nat outside | ip nat outside | Set NAT to outside interface |
Troubleshooting
#
Command/Option | Example | Description |
---|
ping | ping 8.8.8.8 | Test connectivity to a remote host |
traceroute | traceroute 8.8.8.8 | Trace the route to a remote host |
show ip interface brief | show ip interface brief | Show a summary of IP interfaces |
show log | show log | Display system log |
Management
#
Command/Option | Example | Description |
---|
enable | enable | Enter privileged EXEC mode |
disable | disable | Exit privileged EXEC mode |
write memory | write memory | Save configuration to startup configuration |
reload | reload | Reboot the device |
This cheatsheet covers essential Cisco IOS commands for configuration, management, and troubleshooting of Cisco devices. For detailed command syntax and additional options, consult the Cisco documentation.