Cisco CLI Commands

Essential Cisco IOS commands for network device configuration and management.

CiscoNetworkingCLIIOS

Basic Commands

Quick Reference

The most commonly used commands for basic Cisco device management.

System Access

cisco
enable                              # Enter privileged EXEC mode
configure terminal                  # Enter global configuration mode
end                                # Return to privileged EXEC mode
exit                               # Exit current mode

Configuration Management

cisco
write memory                       # Save configuration
copy running-config startup-config # Alternative way to save configuration
reload                            # Restart the device
show running-config               # View current configuration
show startup-config               # View saved configuration

Interface Configuration

Interface Types

Common interface types include:
  • FastEthernet (Fa)
  • GigabitEthernet (Gi)
  • Serial (Se)

Basic Interface Commands

cisco
interface GigabitEthernet 0/1     # Enter interface configuration mode
ip address 192.168.1.1 255.255.255.0  # Set IP address
no shutdown                       # Enable interface
shutdown                          # Disable interface
description [text]                # Add interface description

Interface Status

cisco
show interfaces                   # Show all interfaces
show ip interface brief          # Show IP interface summary
show interface status            # Show interface status

VLAN Configuration

Best Practice

Always verify VLAN configurations before implementing in production.

VLAN Management

cisco
vlan [vlan-id]                   # Create VLAN
name [vlan-name]                 # Name the VLAN
show vlan brief                  # Show VLAN summary

Port Configuration

cisco
switchport mode access           # Set port to access mode
switchport access vlan [vlan-id] # Assign port to VLAN
switchport mode trunk            # Set port to trunk mode
switchport trunk allowed vlan [vlan-list]  # Specify allowed VLANs

Routing Configuration

Static Routing

cisco
ip route [destination network] [subnet mask] [next-hop IP address]  # Configure static route

OSPF Routing

cisco
router ospf [process ID]         # Enable OSPF
network [network address] [wildcard mask] area [area ID]  # Assign network to OSPF area

Access Control Lists (ACL)

Standard ACL

cisco
access-list [ACL number] permit [source] [wildcard mask]  # Create standard ACL

Extended ACL

cisco
access-list [ACL number] permit [protocol] [source] [wildcard mask] [destination] [wildcard mask]  # Create extended ACL

Apply ACL to Interface

cisco
ip access-group [ACL number] [in|out]  # Apply ACL to interface

Network Address Translation (NAT)

NAT Inside Source

cisco
ip nat inside source list [ACL number] interface [interface] overload  # Configure NAT inside source

Designate NAT Interfaces

cisco
interface [interface]
ip nat inside  # Designate NAT inside interface

interface [interface]
ip nat outside  # Designate NAT outside interface

Monitoring and Troubleshooting

Monitoring Note

Regularly monitor device status to ensure network health.

Display Commands

cisco
show running-config     # Display running configuration
show ip interface brief # Display IP interface summary
show ip route          # Display routing table
show ip ospf neighbor  # Display OSPF neighbors

Connectivity Testing

cisco
ping [IP address]       # Ping host
traceroute [IP address] # Traceroute to host