Technology Intelligence
Networking

Essential Cisco IOS Commands for Network Configuration and Troubleshooting

IT Club12 minutes read30 July 2026
Essential Cisco IOS Commands for Network Configuration and Troubleshooting

A current Cisco IOS command cheat sheet for inspecting, configuring, securing and troubleshooting routers and switches.

Cisco IOS is controlled through a hierarchical command-line interface. The same command may work only in a particular mode, require elevated privileges, affect the live configuration immediately, need to be saved before it survives a restart, or behave differently across IOS and IOS XE platforms.

A useful Cisco command reference therefore needs to explain more than command syntax. It should also show which mode the command belongs in, whether it changes configuration, whether it is disruptive, how to verify the result and how to save or reverse the change.

The safest Cisco command is one you understand, verify and can reverse.

This guide is written for technically competent administrators. It prioritises secure modern practices and clearly marks legacy or insecure methods where they appear. Commands and descriptions have been verified against current Cisco IOS and IOS XE documentation. Last checked: 30 July 2026.

Before you start: editorial warning

Cisco configuration changes can interrupt connectivity, lock out administrators or expose the network if applied incorrectly. Before changing a production device: confirm you have an approved backup, confirm out-of-band or console access, record the existing configuration, understand the rollback method, use a maintenance window where appropriate, verify the exact platform and software release, and avoid pasting unreviewed commands into a live device. A command that is correct on one Cisco platform may behave differently on another.

Placeholder convention

Angle-bracket values in this guide are placeholders that must be replaced with the correct value for your environment. They must never be pasted literally into a device. No real credentials, public IP addresses or customer information appear anywhere in this guide.

PlaceholderRepresents
<HOSTNAME>A unique device name for this device
<INTERFACE>The specific interface name, e.g. GigabitEthernet0/1
<IP-ADDRESS>An IPv4 address appropriate for this interface or pool
<SUBNET-MASK>The subnet mask in dotted decimal
<VLAN-ID>A VLAN number, e.g. 10
<VLAN-NAME>A descriptive label for the VLAN
<USERNAME>A named administrator account
<STRONG-UNIQUE-SECRET>A strong, unique passphrase — never a real value here
<ACL-NAME>A descriptive name for an access control list
<NETWORK>A network address, e.g. from the RFC 5737 documentation range 192.0.2.0
<WILDCARD-MASK>ACL wildcard mask — the inverse of the subnet mask
<SYSLOG-SERVER>IP or hostname of the remote syslog server
<NTP-SERVER>IP or hostname of the NTP time source
<RADIUS-SERVER>IP or hostname of the RADIUS server
<TACACS-SERVER>IP or hostname of the TACACS+ server

The quick answer

Most commonly needed commands

These are the read-only inspection commands used most often. All run in Privileged EXEC mode (prompt ends with #) and do not change configuration.

CommandPurpose
enableEnter Privileged EXEC mode from User EXEC mode
configure terminalEnter Global Configuration mode
show versionPlatform, software release, uptime and hardware
show running-configActive configuration in RAM (sensitive output)
show startup-configSaved configuration in NVRAM (sensitive output)
show ip interface briefCompact view of all interface addresses and status
show interfaces statusSwitch port state, VLAN, duplex and speed
show vlan briefVLANs and port membership
show interfaces trunkActive trunks and permitted VLANs
show spanning-treeSpanning Tree status and topology
show ip routeRouting table
show access-listsACLs and hit counters
show loggingBuffered device logs
show usersActive management sessions
copy running-config startup-configSave running configuration to NVRAM

Destructive commands are not listed in this panel. They appear in a separate clearly marked section.

Understanding Cisco IOS command modes

Every Cisco IOS command must be entered in the correct mode. Entering a command in the wrong mode either produces an error or does nothing. The mode is visible from the prompt.

ModePromptHow to enterPurpose
User EXEChostname>Default on loginLimited monitoring commands only
Privileged EXEChostname#enableFull inspection, diagnostics and entry to configuration mode
Global Configurationhostname(config)#configure terminalDevice-wide configuration changes
Interface Configurationhostname(config-if)#interface <INTERFACE>Per-interface settings
Line Configurationhostname(config-line)#line vty 0 4 or line con 0Console and VTY access settings
Router Configurationhostname(config-router)#router <ROUTING-PROTOCOL>Routing protocol settings
VLAN Configurationhostname(config-vlan)#vlan <VLAN-ID>VLAN name and configuration

exit moves back one level in the hierarchy. end or Ctrl+Z generally returns to Privileged EXEC mode from any configuration sub-mode. These shortcuts may vary by platform — do not overstate their behaviour.

Tab auto-completes partial commands where the input is unambiguous. ? displays available commands or options at the current mode. Up and down arrow keys cycle through command history, or use show history to review it.

Essential inspection commands

Always inspect before changing. These commands are read-only, though their output may contain sensitive information that should be treated carefully.

CommandModePurposeWhat to check
show versionPrivileged EXECPlatform, software release, uptime and hardwareIOS or IOS XE version, uptime, configuration register
show running-configPrivileged EXECActive configuration in RAMFull device configuration — output is sensitive; store securely
show startup-configPrivileged EXECSaved configuration in NVRAMConfirm it matches running-config after a save
show ip interface briefPrivileged EXECAll interface addresses and up/down statusStatus and protocol columns; expect up/up for active interfaces
show interfacesPrivileged EXECDetailed statistics and counters for all interfacesInput/output errors, CRC, resets, flaps
show interfaces statusPrivileged EXECSwitch port state, VLAN, duplex and speedConnected/notconnect, VLAN assignment, speed and duplex
show vlan briefPrivileged EXECVLAN list and port membershipWhich VLANs exist and which ports belong to each
show interfaces trunkPrivileged EXECActive trunks and permitted VLANsEncapsulation, native VLAN, VLANs in spanning tree
show spanning-treePrivileged EXECSTP status and topologyRoot bridge, port roles (Root, Designated, Blocked)
show ip routePrivileged EXECRouting tableConnected (C), static (S), OSPF (O), EIGRP (D), BGP (B) routes
show mac address-tablePrivileged EXECLearned MAC addresses and portsWhich port a MAC has been learned on
show cdp neighbors detailPrivileged EXECDirectly connected Cisco devices (where CDP is enabled)Connected device model, platform, IOS version and IP
show lldp neighbors detailPrivileged EXECConnected devices via LLDP (vendor-neutral where supported)More useful where non-Cisco devices are present
show loggingPrivileged EXECBuffered device logsRecent events, errors, authentication failures, line changes
show usersPrivileged EXECActive management sessionsWho is currently logged in and from where
show clockPrivileged EXECDevice timeConfirm time is correct for log interpretation
show ntp associationsPrivileged EXECNTP synchronisation status where supportedWhether the device is synchronised to a reliable time source
show access-listsPrivileged EXECAll ACLs and match countersHit counts confirm whether rules are matching traffic
show ip sshPrivileged EXECSSH version and status where supportedSSH version 2, enabled, encryption parameters

Output from show running-config, show startup-config, show tech-support and configuration backups may contain usernames, password hashes, shared secrets, SNMP credentials, VPN configuration, ACLs and infrastructure details. Treat this output as sensitive and store or transmit it securely.

Basic device configuration

Begin any configuration session by confirming which device you are on, reviewing the current configuration and confirming your rollback options.

Hostname

configure terminal
hostname <HOSTNAME>

Choose a unique, descriptive hostname for each device. The hostname appears in every prompt and is required before RSA keys for SSH can be generated.

Enable secret

enable secret <STRONG-UNIQUE-SECRET>

Use enable secret rather than enable password. The enable secret command stores a hashed version of the password; enable password stores a weakly obfuscated or plaintext value and should not be used where enable secret is available. The exact hashing algorithm depends on the IOS and IOS XE version.

service password-encryption obscures certain plaintext passwords in the configuration output but is not equivalent to strong hashing or modern credential security. It provides limited protection against casual display. Prefer secret-based configuration commands throughout.

Timestamps and time

service timestamps log datetime msec
clock timezone GMT 0
ntp server <NTP-SERVER>

Accurate timestamps make logs meaningful. A Cisco device without NTP may have a clock that has drifted significantly from real time, making incident investigation and correlation with other log sources unreliable. Verify NTP synchronisation with show ntp associations.

Access banners

banner login #Authorised access only. Activity may be monitored.#

The character immediately after banner login is the delimiter. Any character not appearing in the banner text can be used. Banners serve a legal and operational function by making clear that access is controlled — but the specific wording should be approved by the organisation where legal considerations apply. Do not assume a particular banner text provides guaranteed legal protection in all circumstances.

Interface and IP configuration

Interface names differ between devices and software releases. Always verify the exact name with show ip interface brief or show interfaces status before attempting to configure an interface.

interface <INTERFACE>
 description <PURPOSE>
 ip address <IP-ADDRESS> <SUBNET-MASK>
 no shutdown

no shutdown enables an interface that is administratively down. shutdown disables it. These are potentially disruptive on active production interfaces — verify the interface is not carrying active traffic before shutting it down. Changing a management interface can disconnect the administrator, so confirm out-of-band or console access first.

Layer 2 switch ports do not accept an IP address directly. Switch management commonly uses a Switched Virtual Interface (SVI):

interface vlan <VLAN-ID>
 ip address <IP-ADDRESS> <SUBNET-MASK>
 no shutdown

An SVI will not come up unless the corresponding VLAN exists and at least one active Layer 2 port is assigned to it. The SVI also requires a valid default gateway on the device if management traffic needs to cross subnets. Verify with show ip interface brief after configuration.

VLAN and switch-port configuration

VLANs segment Layer 2 traffic. Creating a VLAN does not provide inter-VLAN routing — that requires a router or a Layer 3 switch with routed interfaces or SVIs.

Creating a VLAN

configure terminal
vlan <VLAN-ID>
 name <VLAN-NAME>

Use meaningful VLAN names such as Staff-LAN, Voice, Management or CCTV. Create the VLAN before assigning ports to it. Avoid using VLAN 1 for sensitive management traffic where your security policy requires separation.

Assigning an access port

interface <INTERFACE>
 switchport mode access
 switchport access vlan <VLAN-ID>

An access port carries one untagged VLAN. Voice VLAN configurations may require additional commands. Do not move a port between VLANs without understanding what device is connected and what traffic will be affected.

Verify with show vlan brief and show interfaces status. The port should appear under the correct VLAN in the VLAN table and show the correct VLAN number in the interfaces status output.

Trunk ports

Trunk ports carry tagged traffic from multiple VLANs, typically between switches or between a switch and a router. Trunk configuration syntax and encapsulation options vary by platform.

interface <INTERFACE>
 switchport mode trunk
 switchport trunk native vlan <VLAN-ID>
 switchport trunk allowed vlan <VLAN-LIST>

Trunk modifications are potentially disruptive. A native VLAN mismatch between two ends of a trunk causes operational and security problems. The switchport trunk allowed vlan command replaces the entire permitted list — use switchport trunk allowed vlan add <VLAN-LIST> to add VLANs without accidentally removing existing ones. Trunk changes can disconnect multiple networks simultaneously. Always inspect with show interfaces trunk before and after.

Spanning Tree

Spanning Tree Protocol prevents Layer 2 loops by blocking redundant paths. It is enabled by default on Cisco switches for all VLANs. An incorrect STP configuration can cause network loops that flood and saturate the network.

Use these read-only commands first to understand the current topology before considering any STP changes:

show spanning-tree
show spanning-tree vlan <VLAN-ID>
show spanning-tree interface <INTERFACE> detail

On many IOS and IOS XE switches, Rapid PVST+ (spanning-tree mode rapid-pvst) is available and provides faster convergence than classic PVST+. However, the correct STP mode depends on the existing design, all connected switches and the platform. Do not change STP mode without understanding the current topology and confirming support across the entire switching domain.

PortFast should be configured only on access ports connected to a single end device, never on ports connected to other switches. BPDU Guard automatically error-disables a PortFast port that receives a BPDU, protecting against accidentally connected switches. Plan root bridge placement deliberately rather than allowing it to be determined by default bridge priority.

Routing and connectivity

Inspect the routing table before considering any changes. The source of each route is identified by a code in the routing table output.

show ip route
show ip route connected
show ip route static

ping and traceroute test connectivity. On many platforms, a source interface can be specified for more accurate path testing:

ping <DESTINATION>
traceroute <DESTINATION>

A static route adds a specific path for traffic to a network. Static routes can cause traffic black-holing if the next-hop becomes unreachable and administrative distance is lower than a dynamic route.

ip route <NETWORK> <SUBNET-MASK> <NEXT-HOP>

Before adding a static route, verify next-hop reachability, confirm the reverse path exists and understand whether any existing dynamic routing protocol already covers this network. Static routes persist across restarts once saved.

This article does not cover complete OSPF, EIGRP or BGP configuration. Dynamic routing protocol configuration requires dedicated coverage appropriate to the specific protocol, design and platform.

DHCP

On many IOS and IOS XE routers, a basic DHCP server can be configured locally. Before configuring a DHCP pool, confirm that no existing DHCP service is already operating on the same segment to avoid address conflicts.

ip dhcp excluded-address <IP-ADDRESS>
ip dhcp pool <POOL-NAME>
 network <NETWORK> <SUBNET-MASK>
 default-router <IP-ADDRESS>
 dns-server <IP-ADDRESS>
 domain-name <DOMAIN>
 lease <DAYS>

Always exclude the gateway address and any other statically assigned addresses from the pool using ip dhcp excluded-address before defining the pool. On switched networks where the DHCP server is on a different segment, ip helper-address on the interface facing clients forwards DHCP broadcast requests to the server:

interface <INTERFACE>
 ip helper-address <IP-ADDRESS>

Verify with show ip dhcp binding to see current leases and show ip dhcp conflict to check for detected address conflicts. A rogue DHCP server on the network can redirect or intercept client traffic. DHCP snooping on switches provides protection against rogue servers.

NAT

Network Address Translation allows devices with private addresses to access the internet through one or more public addresses. Inspect the current NAT state before making any changes, and understand the existing firewall or edge-router design before modifying translation rules.

show ip nat translations
show ip nat statistics

NAT requires interfaces to be designated as inside or outside. Port Address Translation (PAT or NAT overload) uses a single public address for many private addresses. Detailed NAT configuration examples appear in the Administrator Technical Note below.

Access control lists

ACLs filter traffic based on source or destination addresses, protocol and port. They are applied to an interface in a specified direction. Standard ACLs match only on source address; extended ACLs match on source, destination, protocol and port.

Every ACL has an implicit deny-all rule at the end. Traffic not explicitly permitted is silently discarded. Rule order matters: the first matching entry is applied and the rest are not evaluated. Wildcard masks are the bitwise inverse of subnet masks: for a /24 network, the wildcard is 0.0.0.255.

The following example uses only addresses from the RFC 5737 documentation range, which is reserved for documentation and must not appear in a live configuration:

ip access-list extended <ACL-NAME>
 permit tcp 192.0.2.0 0.0.0.255 any eq 443
 deny   ip any any log

To apply an ACL to an interface:

interface <INTERFACE>
 ip access-group <ACL-NAME> in

Verify with show access-lists (to see hit counters) and show ip interface <INTERFACE> (to confirm the ACL is applied and in which direction).

An incorrectly applied ACL can immediately block legitimate users, management access or business traffic. Before applying an ACL: add an explicit rule permitting management access, verify console or out-of-band access, use sequence numbers where supported, document the intended traffic, test during a change window, confirm hit counters after applying and retain the rollback commands ready.

Secure SSH access

All interactive administrative access should use SSH version 2. Telnet transmits everything in plaintext, including credentials, and should not be used for administration. Where transport input commands are configured, prefer transport input ssh.

A typical SSH configuration sequence on IOS and IOS XE. Verify support for each element against the exact device and software release:

hostname <HOSTNAME>
ip domain name <DOMAIN>
crypto key generate rsa modulus 2048
ip ssh version 2
username <USERNAME> privilege 15 secret <STRONG-UNIQUE-SECRET>
line vty 0 4
 login local
 transport input ssh
 exec-timeout 10 0

A hostname and domain name must be configured before RSA keys can be generated. RSA key size requirements evolve with cryptographic guidance — verify current Cisco recommendations for the specific platform and software release. Cisco guidance has historically recommended 2048 bits as a minimum for RSA for SSH; newer guidance may prefer larger keys or different algorithms on IOS XE.

SSH protects the connection; it does not by itself make the account secure.

Additional controls that improve SSH security: restrict VTY access by source IP using an ACL applied to the VTY lines; use a dedicated management VLAN or VRF; create named individual accounts rather than sharing a single administrator account; configure an idle session timeout; enable logging of authentication events; and consider centralised AAA where the number of devices or administrators makes local account management impractical.

Verify with show ip ssh, show users and show running-config | section line vty.

Local users and AAA

Local user accounts should use the secret-based syntax, which stores a hashed representation rather than an obfuscated plaintext value. Available hashing algorithms and exact syntax vary by IOS and IOS XE version:

username <USERNAME> privilege <LEVEL> secret <STRONG-UNIQUE-SECRET>

Privilege 15 is full administrative access. Privilege 1 is limited. Named accounts improve accountability and auditability. Shared administrator accounts remove the ability to attribute actions to individuals and should be avoided where possible.

Inspect and manage local accounts:

show running-config | include username
show users
no username <USERNAME>

Do not remove the local account you are currently using without first confirming that another account can authenticate. Remove the account no username <USERNAME> only after verifying a working fallback.

AAA (Authentication, Authorisation and Accounting) centralises access control. aaa new-model enables the AAA framework on the device. Authentication determines who can log in. Authorisation determines what they can do. Accounting records what they did.

RADIUS and TACACS+ allow administrators to authenticate against a central directory rather than local accounts on each device. TACACS+ is commonly preferred for network device administration because it separates authentication from authorisation and provides per-command accounting. Centralised AAA improves scalability, consistency and audit quality.

Incorrect AAA configuration can lock every administrator out of the device. Always retain a working local fallback account, test authentication before ending the current session and confirm console access before applying AAA changes. Detailed AAA configuration appears in the Administrator Technical Note.

Port security

Switch port security limits the MAC addresses allowed on an access port. It can protect against unknown devices connecting to the network but has significant operational limitations in modern environments.

interface <INTERFACE>
 switchport mode access
 switchport port-security
 switchport port-security maximum <NUMBER>
 switchport port-security mac-address sticky
 switchport port-security violation restrict

Violation modes determine what happens when an unauthorised MAC is seen: protect silently drops unauthorised frames; restrict drops them and increments a counter; shutdown error-disables the port and requires manual recovery. Sticky MAC learning records MAC addresses seen on the port into the running configuration.

Inspect with show port-security and show port-security interface <INTERFACE>.

Port security has important limitations. MAC addresses can be spoofed. Phones with built-in switches, downstream switches, wireless access points presenting multiple clients, and docking stations all complicate MAC limits. Sticky address entries require operational management when devices change. 802.1X port-based network access control is a more capable solution for environments where stronger access control is required.

Logging, time and monitoring

Accurate logging depends on accurate time. Configure NTP before relying on any log output for incident investigation.

logging host <SYSLOG-SERVER>
logging trap informational
service timestamps log datetime msec

Logs held only in the device’s memory buffer are lost when the device restarts. Central logging to a syslog server preserves events, allows correlation across devices and improves investigation. terminal monitor sends a copy of syslog output to the current interactive session — useful for real-time observation but should not be left enabled unnecessarily as it can expose information to the current session.

Debug commands can generate very high volumes of output and may affect device performance. Use debug commands only for targeted diagnostics, during a maintenance window where possible, and disable them promptly with no debug <COMMAND> or undebug all.

SNMP and monitoring

SNMPv3 is strongly preferred over SNMPv1 and SNMPv2c. SNMPv1 and SNMPv2c use community strings transmitted in plaintext, providing no encryption and weak authentication. Community strings from a network scan can expose the string and potentially allow unauthenticated read or read-write access depending on configuration.

If legacy SNMPv1 or SNMPv2c community strings must be used in an existing environment, treat them as sensitive credentials, restrict SNMP access by source address using an ACL, use read-only community strings unless write access is required and plan migration to SNMPv3.

SNMPv3 provides authentication and encryption. Exact SNMPv3 configuration syntax varies by platform. Configuration details appear in the Administrator Technical Note.

Saving and backing up configuration

Understanding the difference between running configuration and startup configuration is essential:

ConfigurationWhere storedWhen loadedEffect of changes
Running configurationRAMAfter device bootsChanges take effect immediately but are lost if the device restarts without saving
Startup configurationNVRAMOn device restartLoaded at boot; not affected by runtime changes until explicitly saved

Save the running configuration to startup after verifying a change:

copy running-config startup-config

Verify with show startup-config after saving. A safe configuration change workflow:

  1. 1Record the current configuration with show running-config.
  2. 2Make the approved change.
  3. 3Verify the result using the relevant show commands.
  4. 4Monitor for unexpected impact.
  5. 5Save the configuration only after verification.
  6. 6Store a secure external backup.
  7. 7Document the change.

SCP or a protected network configuration-management platform is preferred for secure configuration export where supported. TFTP and FTP transfer configuration without encryption and should be used only where formally accepted and in isolated environments:

TFTP and FTP are legacy and unencrypted — use only where formally accepted and isolated.

Configuration files may contain usernames, password hashes, shared secrets, SNMP credentials, VPN configuration, IP addressing and ACLs. Treat configuration backups as sensitive documents and store and transmit them with appropriate protection.

Commands to treat with extreme caution

The following commands can erase configuration, restart the device, replace configuration from a file, disrupt active interfaces or remove VLANs and associated port connectivity. Do not run any of these without a current verified backup, confirmed console or out-of-band access, an approved change plan, a maintenance window and a tested rollback procedure.

CommandRiskWhat it does
write erase / erase startup-configCRITICALDeletes the saved startup configuration; device will boot to defaults on next restart
reloadCRITICALRestarts the device, losing any unsaved running configuration
configure replaceCRITICALReplaces the running configuration from a file; can cause significant disruption
copy startup-config running-configHIGHMerges startup configuration into running configuration; may have unexpected results
default interface <INTERFACE>HIGHResets an interface to factory defaults, removing all interface configuration
no vlan <VLAN-ID>HIGHRemoves a VLAN; ports assigned to it lose their VLAN membership
shutdown (on an active interface)HIGHAdministratively disables the interface; disconnects active users or devices
no commands removing routing or ACLHIGHRemoving routes or ACLs may immediately disrupt traffic or expose the network

Troubleshooting workflows

Troubleshooting should move from physical state, to interface state, to addressing, to VLANs, to routing, to policy.

Scenario 1: a device cannot reach another subnet

  1. 1Check interface state: show ip interface brief — confirm the relevant interface is up/up.
  2. 2Check IP address and mask: confirm the address and subnet mask are correct for the intended subnet.
  3. 3Check default gateway: confirm the device has a valid default gateway or route.
  4. 4Check VLAN assignment: show vlan brief — confirm the port is in the correct VLAN.
  5. 5Check trunk VLAN list: show interfaces trunk — confirm the VLAN is allowed across the trunk.
  6. 6Check the routing table: show ip route — confirm a route to the destination subnet exists.
  7. 7Check ACLs: show access-lists — confirm no ACL is blocking the traffic.
  8. 8Check NAT where relevant: show ip nat translations.
  9. 9Test with ping and traceroute from the device.
  10. 10Verify the return route exists at the far end.

Scenario 2: a switch port is down

  1. 1Check physical connection: cable, SFP, port LED and connected device.
  2. 2Check administrative state: show interfaces status — notconnect or err-disabled.
  3. 3Check errors: show interfaces <INTERFACE> — look for input errors, CRC, flaps.
  4. 4Check speed and duplex: mismatches cause errors and flapping.
  5. 5Check err-disabled state: if the port is err-disabled, identify the cause from show logging before re-enabling.
  6. 6Check port security: show port-security interface <INTERFACE>.
  7. 7Check Spanning Tree: show spanning-tree interface <INTERFACE> detail.
  8. 8Check PoE where relevant: power budget may prevent the port from coming up.

Scenario 3: a VLAN is not passing across a trunk

  1. 1Confirm the VLAN exists on both switches: show vlan brief.
  2. 2Confirm the port is trunking: show interfaces trunk.
  3. 3Confirm the VLAN is in the allowed list: check VLANs allowed and active in spanning tree column.
  4. 4Check the native VLAN: confirm it matches at both ends of the trunk.
  5. 5Check STP state: the VLAN may be blocked by Spanning Tree.
  6. 6Verify configuration at both ends of the trunk.

Scenario 4: SSH access fails

  1. 1Check IP reachability: can you ping the management address from the connecting host?
  2. 2Confirm hostname and domain name are set: required for RSA key generation.
  3. 3Confirm RSA keys exist: show ip ssh should show SSH enabled.
  4. 4Confirm SSH version 2: show ip ssh.
  5. 5Confirm a local user exists or AAA is configured: show running-config | include username.
  6. 6Check VTY configuration: show running-config | section line vty — transport input must permit ssh.
  7. 7Check for an ACL restricting VTY access that may be blocking the source address.
  8. 8Verify routing: the device must be able to route back to the connecting host.
  9. 9Where AAA authentication is in use, check NTP synchronisation if time-based tokens are involved.

Scenario 5: configuration disappeared after restart

  1. 1Compare show running-config with show startup-config — if they differ significantly, the configuration was not saved before the restart.
  2. 2Check show version for last restart reason — power failure, crash or a deliberate reload.
  3. 3Restore from a configuration backup where one exists.
  4. 4If no backup exists and the configuration is lost, reconstruct from documentation and change records.

Scenario 6: unexpected configuration changes appear

  1. 1Check administrator accounts: show running-config | include username.
  2. 2Check current sessions: show users.
  3. 3Review device logs: show logging.
  4. 4Check AAA accounting where configured.
  5. 5Check central monitoring and SIEM for login events.
  6. 6Check whether automation or scripted configuration management may have applied the change.
  7. 7Review recent change records.
  8. 8Assess whether account compromise may be involved.

Practical business implications

Configuration changes can cause downtime. One incorrect VLAN, route, ACL or trunk command can affect many users simultaneously. Test changes during an approved maintenance window and retain rollback commands.

Unsaved configuration creates hidden risk. A device may appear to be running correctly until the next restart reveals that changes made during an incident response were never saved.

Shared accounts reduce accountability. Named accounts and centralised AAA allow changes to be attributed to specific administrators and reviewed after the fact.

Logging needs accurate time. A timestamp is useful only when the device clock is correct and synchronised to a reliable time source.

Configuration backups are sensitive. Network configuration files must be protected like other privileged information. They may contain credentials, ACLs, shared secrets and infrastructure details that could assist an attacker.

Legacy protocols create avoidable risk. Telnet, insecure SNMP communities and unencrypted configuration transfers should be removed where practical. This is rarely a major project — it is usually a configuration change during a maintenance window.

Documentation matters. The command alone does not explain why the configuration exists. An interface description, a VLAN name and a change record collectively make a network understandable to the next administrator.

The IT Club view

Cisco IOS is powerful partly because small commands can make substantial changes. That makes a command cheat sheet useful, but also potentially dangerous. An administrator who arrives at a device with a list of commands and no plan is more likely to cause an incident than resolve one.

The right questions before running any command are not only “What command do I type?” but also: Which mode am I in? What device and software version is this? What will the command change? How will I verify it? Could it disconnect me? What is the rollback? Has the configuration been backed up? Should this change be saved immediately?

Knowing the command is not the same as understanding the change.

IT Club recommends: inspect before changing, record before and after state, use secure management, preserve console access, avoid shared credentials, centralise logs, back up configuration securely, test restoration, review legacy protocols and maintain a change record.

A good Cisco command reference helps you work faster. A good operational process stops speed becoming downtime.

Related business questions

What is Cisco IOS?

Cisco IOS (Internetwork Operating System) is the operating system that runs on most Cisco routers and many Cisco switches. It provides a hierarchical command-line interface for configuration, inspection and management. IOS XE is a later platform that shares many commands but has architectural differences. The exact features and syntax available depend on the device model and software release.

What is the difference between IOS and IOS XE?

IOS XE is a newer software platform running on many current Cisco Catalyst and ASR devices. It runs IOS as a process on a Linux-based kernel, providing improvements in stability, modularity and support for modern features such as YANG/NETCONF/RESTCONF programmability. Many CLI commands are identical or similar between IOS and IOS XE, but some features, syntax options, configuration archive behaviour, AAA, SNMP and NTP commands may differ. Always verify against the specific platform and release.

How do I enter Cisco configuration mode?

From User EXEC mode (prompt ends in >), type enable to enter Privileged EXEC mode (prompt ends in #). From Privileged EXEC mode, type configure terminal to enter Global Configuration mode (prompt includes (config)#). To exit, type end or press Ctrl+Z to return to Privileged EXEC, or exit to go back one level.

What is the difference between running-config and startup-config?

The running configuration is the active configuration currently in RAM. Changes take effect immediately but are lost if the device restarts without saving. The startup configuration is stored in NVRAM and is loaded when the device boots. They may be identical if the device has been saved, or they may differ if changes have been made since the last save.

How do I save a Cisco configuration?

Use copy running-config startup-config in Privileged EXEC mode. Verify the save was successful with show startup-config. Only save after verifying that the current running configuration is correct — saving a misconfigured state makes rollback harder.

How do I display all Cisco interfaces?

show ip interface brief provides a compact summary of all interfaces with their addresses and up/down status. show interfaces provides full detail and statistics. show interfaces status shows switch-port state, VLAN assignment, duplex and speed on many platforms.

How do I check a switch-port status?

show interfaces status shows the state (connected, notconnect, err-disabled), VLAN, duplex and speed for switch ports. show interfaces <INTERFACE> shows detailed statistics including errors and input/output counters for a specific port.

How do I create a VLAN?

In Global Configuration mode: vlan <VLAN-ID> enters VLAN configuration mode, then name <VLAN-NAME> assigns a descriptive label. Verify with show vlan brief. Creating a VLAN does not enable inter-VLAN routing — that requires a Layer 3 switch with routed interfaces or SVIs, or a router.

How do I assign a switch port to a VLAN?

Enter interface configuration for the port: interface <INTERFACE>. Set it as an access port: switchport mode access. Assign the VLAN: switchport access vlan <VLAN-ID>. Verify with show vlan brief and show interfaces status. Ensure the VLAN exists before assigning a port to it.

How do I check trunk ports?

show interfaces trunk displays which ports are trunking, the encapsulation type, native VLAN, VLANs allowed on the trunk and VLANs active in spanning tree. Check both ends of a trunk link for consistency, particularly the native VLAN.

How do I check the routing table?

show ip route displays the full IPv4 routing table. Route sources are identified by a letter code: C for connected, S for static, O for OSPF, D for EIGRP, B for BGP and others. show ip route connected shows only directly connected routes. show ip route static shows only static routes.

How do I test connectivity from a Cisco device?

ping <DESTINATION> sends ICMP echo requests. traceroute <DESTINATION> shows the path and per-hop latency. Both commands run in Privileged EXEC mode. Where the device has multiple interfaces, a source interface can often be specified to test connectivity from a specific address.

How do I see which MAC address is connected to a port?

show mac address-table displays the MAC address table showing which MAC addresses have been learned on which ports and in which VLAN. You can filter by interface or VLAN on many platforms.

How do I configure SSH on a Cisco switch or router?

Configure a hostname and domain name, generate RSA keys with crypto key generate rsa modulus 2048, enable SSH version 2 with ip ssh version 2, create a local user with username <USERNAME> privilege 15 secret <STRONG-UNIQUE-SECRET>, then configure the VTY lines with login local and transport input ssh. Verify with show ip ssh.

Why should Telnet be disabled?

Telnet transmits all traffic including credentials in plaintext. Anyone with access to the network path between the administrator and the device can capture the session and read everything, including usernames, passwords and configuration commands. SSH encrypts the session. Where VTY lines are configured with transport input ssh, Telnet connections to those lines are rejected.

What is an ACL?

An Access Control List is an ordered set of permit and deny rules applied to an interface in a specific direction. Standard ACLs match on source IP address only. Extended ACLs match on source, destination, protocol and port. Rules are evaluated from top to bottom; the first match is applied. Every ACL ends with an implicit deny-all rule.

What does the implicit deny rule mean?

Every Cisco IOS ACL has an unwritten deny-all rule at the bottom. Traffic that does not match any explicit permit or deny rule in the ACL is silently discarded. A common mistake is creating a new ACL without a final permit rule for traffic that should continue to pass, accidentally blocking all unmatched traffic when the ACL is applied.

How do I back up a Cisco configuration?

Save the running configuration to startup first with copy running-config startup-config. For external backup, SCP or a network configuration-management platform is preferred where supported, as these provide transport encryption. TFTP (copy running-config tftp) and FTP are legacy, unencrypted methods that remain in use in some environments but should not be treated as secure backup solutions.

Is TFTP secure?

No. TFTP transfers data without any authentication or encryption. Configuration files transferred via TFTP are transmitted in plaintext and can be intercepted on the network. TFTP should be used only where formally accepted in an isolated environment. SCP or a protected configuration-management platform is preferred for secure configuration export.

What is Cisco AAA?

AAA stands for Authentication, Authorisation and Accounting. Authentication confirms who is logging in. Authorisation determines what they are permitted to do after authentication. Accounting records what they did and when. The aaa new-model command enables the AAA framework. RADIUS and TACACS+ are the two common protocols used to connect Cisco devices to a centralised authentication server.

What is port security?

Port security limits the MAC addresses permitted on a switch access port. Violations — a new unknown MAC appearing — can trigger the port to drop the frame (protect), drop and log it (restrict) or shut the port down (shutdown). Sticky MAC learning records observed MAC addresses into the configuration. Port security is limited by the fact that MAC addresses can be spoofed, and it does not provide strong access control in complex environments.

Why did my Cisco configuration disappear after restart?

The most common reason is that changes to the running configuration were never saved to the startup configuration using copy running-config startup-config. When the device restarts, it loads the startup configuration from NVRAM, not the last running state. Other possible causes include a corrupted NVRAM, an intentional erase startup-config or a reload without saving.

What does administratively down mean?

An interface that shows administratively down in show ip interface brief has been explicitly disabled with the shutdown command. It will not pass traffic regardless of the physical connection state. To re-enable it, enter interface configuration for that interface and use no shutdown.

How do I see who is logged into a Cisco device?

show users displays the currently active management sessions including the line in use, the username where known and the remote address. This is useful for confirming who else is connected before making changes that may disrupt other sessions.

How do I review Cisco configuration changes?

show logging reviews buffered device logs for configuration events. Where AAA accounting is configured, change records may be stored on the AAA server. Central syslog and SIEM platforms provide a more complete and tamper-resistant record than the device’s own buffer, which is lost on restart.

Which Cisco commands are safe to run?

Read-only show commands are generally safe to run at any time. They do not change configuration and do not affect traffic. Examples include show version, show running-config, show ip interface brief, show vlan brief, show interfaces trunk and show ip route. The output may be sensitive but the commands themselves are not disruptive.

Which Cisco commands can cause an outage?

Commands that change interface state (no shutdown, shutdown), modify trunks, alter VLANs, replace ACLs, change routing or modify AAA can all affect traffic or administrator access immediately. Destructive commands including reload, write erase, erase startup-config, configure replace and default interface can cause significant disruption or loss of configuration. Always back up the configuration, preserve console access and retain rollback commands before running these in production.

Administrator technical note

Administrator Technical Note

Management-plane protection: restrict administrative access using an ACL applied to VTY lines and consider a dedicated management VRF (Management VRF or VRF-Lite) where the platform supports it to isolate management traffic from production data. Control-plane policing (CoPP) limits the rate of traffic directed at the device’s CPU, reducing the impact of denial-of-service conditions or scans targeting the management plane. These are features of many Catalyst and ISR platforms running IOS XE.

AAA design: enable AAA with aaa new-model before configuring any other AAA commands. Use TACACS+ for device administration where available — it separates authentication from authorisation and provides per-command accounting, making it more suitable than RADIUS for network device privilege management. RADIUS remains appropriate for 802.1X port authentication. Configure a local fallback in all AAA authentication lists so that console access remains available if the AAA server is unreachable. Use a break-glass local account with a strong secret stored securely offline for emergency access. Test authentication before ending the current session. Use placeholders: radius-server host <RADIUS-SERVER> and tacacs-server host <TACACS-SERVER> with key <SHARED-SECRET-PLACEHOLDER>.

SNMPv3 configuration: prefer authPriv security level where the platform supports it. This provides both message authentication (HMAC-MD5 or HMAC-SHA) and privacy encryption (AES). SHA and AES are preferred over MD5 and DES. Example structure: snmp-server group <GROUP-NAME> v3 priv, snmp-server user <USER-NAME> <GROUP-NAME> v3 auth sha <AUTH-SECRET> priv aes 128 <PRIV-SECRET>. Restrict SNMP access by source address. Do not expose SNMP to untrusted networks.

Secure configuration transfer: SCP (Secure Copy Protocol) uses SSH transport for encrypted file transfer. SCP must be enabled on the device (ip scp server enable where supported) and requires SSH and a local user account. On IOS XE, configuration archiving is available using the archive command, allowing automatic backup to a specified URL and configuration rollback. Confirm platform support before relying on these features.

NAT configuration example using documentation addresses only: designate inside and outside interfaces with ip nat inside and ip nat outside, create a standard ACL identifying inside local addresses, then: ip nat inside source list <ACL-NAME> interface <OUTSIDE-INTERFACE> overload for PAT. Static NAT: ip nat inside source static <INSIDE-LOCAL-ADDRESS> <INSIDE-GLOBAL-ADDRESS>. Verify with show ip nat translations and show ip nat statistics. Do not modify production NAT rules without understanding the existing traffic flow, ACL selection and any upstream NAT from the ISP.

Spanning Tree safeguards: PortFast should be applied only to switch ports connected to a single end device (switchport mode access, then spanning-tree portfast). BPDU Guard automatically error-disables a PortFast port that receives a BPDU: spanning-tree bpduguard enable on the interface, or spanning-tree portfast bpduguard default globally. Root Guard (spanning-tree guard root) prevents a connected switch from becoming the root bridge. Storm control limits broadcast, multicast and unknown-unicast traffic rates on ports, protecting against Layer 2 storms.

DHCP snooping, Dynamic ARP Inspection and IP Source Guard: DHCP snooping (ip dhcp snooping) identifies trusted ports (connected to DHCP servers or uplinks) and untrusted ports, blocking DHCP server responses from untrusted ports. Dynamic ARP Inspection validates ARP packets against the DHCP snooping binding table, protecting against ARP poisoning. IP Source Guard restricts IP traffic on untrusted ports to addresses assigned by DHCP snooping. These features are available on many Catalyst platforms and are valuable in multi-tenant or higher-risk environments.

Unused port security: administratively shut down unused access ports. Assign them to a dedicated unused VLAN. Disable CDP and LLDP on edge ports where discovery protocol information should not be shared. Do not leave unknown ports active without a defined purpose.

Password hashing: IOS and IOS XE support multiple hashing types for enable secret and username secret commands. The available algorithm depends on the software version. IOS XE supports type 8 (PBKDF2-SHA-256) and type 9 (scrypt) in more recent releases, which are strongly preferred over the older type 5 (MD5). Verify the supported types with the platform documentation before assuming availability.

Software support and patching: check the Cisco Software Checker and Cisco Security Advisories regularly for the specific IOS or IOS XE release running on each device. Unsupported software releases may not receive security fixes. Cisco publishes security advisories when vulnerabilities are found, and some may be rated Critical. Plan IOS and IOS XE upgrades as a normal operational activity rather than a response to an incident.

Configuration compliance: consider a network configuration management tool that compares running and startup configurations against a defined baseline, alerts on unauthorised changes, manages configuration archives and enforces approved templates. Manual review of configuration drift across many devices is not reliable at scale. Refer to official Cisco hardening guides (CIS Cisco IOS benchmarks, Cisco security configuration guides) for a full hardening reference.

The operational heartbeat

Network configuration drifts as administrators change, VLANs are added, ports are repurposed, temporary ACLs remain in place, old accounts survive staff departures, firmware becomes unsupported, logging stops forwarding, NTP loses its source, configuration backups fail silently, SNMP communities remain from previous deployments, trunks accumulate unnecessary VLANs, unused ports stay active, local passwords are shared and undocumented static routes accumulate.

A recurring review should check: current running configuration, saved startup configuration, secure external backup, restore testing, administrator accounts, AAA, SSH configuration, Telnet disabled, SNMP version, central logging, NTP synchronisation, ACL review, VLAN list, trunk configurations, unused ports, Spanning Tree topology, DHCP protections, firmware version and support status, configuration drift, change records and next review date.

Network configuration needs an operational heartbeat: access, software, logging, backups, VLANs, routes and security controls should be reviewed rather than assumed to remain correct.

Related reading: Are You Sure Your Windows Backup Settings Are Protecting Your Files?

Plain-English Takeaway

Cisco IOS commands can inspect, configure and troubleshoot routers and switches, but they must be used in the correct mode and verified against the exact device and software release. Back up the current configuration, preserve console access, prefer secure management methods and confirm the result before saving any production change.

Need the practical steps?

A short, instruction-led version of this topic is available in the Knowledge Centre.

View the Knowledge Centre Guide

Enjoyed this article?

Follow The IT Club Briefing on WhatsApp for short daily technology updates and practical business insights.

Have a question we should answer?

Ask the IT Club Advisor