Useful Cisco Commands

Connected Devices Information

show cdp neighbors
show cdp neighbors g3/0/20 detail

Switch: PoE commands (Ref: Cisco: Troubleshooting Power over Ethernet (PoE))

show power inline
show power inline | count [regular expression]

debug ilpower port
debug ilpower powerman
debug ilpower event

Scheduled Config Backup to TFTP server

kron occurrence Backup at 23:00 Thu recurring
 policy-list Backup
!
kron policy-list Backup
 cli show run | redirect tftp://<IP Address>/<Path>/<Filename>
!

Service Email Configuration (Ref: ASA Smart Service Call-Home)

To email configuration backup

* Export Full includes all the following commands

  • show call-home registered-module status | exclude disabled
  • show running-config
  • show startup-config
  • show access-list | include elements
hostname (config)# service call-home
hostname (config)# call-home
hostname (cfg-call-home)# contact-email-addr customer@mail.server

hostname (cfg-call-home)# mail-server 192.168.1.100 priority 1
hostname (cfg-call-home)# profile ConfigBackup-1
hostname (cfg-call-home-profile)# destination address email admin@mydomain.com
hostname (cfg-call-home-profile)# destination transport-method email
hostname (cfg-call-home-profile)# subscribe-to-alert-group configuration export full periodic monthly

To email a snapshot of the router

hostname (config)# service call-home
hostname (config)# call-home
hostname (cfg-call-home)# contact-email-addr customer@mail.server

hostname (cfg-call-home)# mail-server 192.168.1.100 priority 1

hostname (cfg-call-home)# alert-group-config snapshot

hostname (cfg-call-home-snapshot)# add-command "show traffic"
hostname (cfg-call-home-snapshot)# add-command "show interface detail"
hostname (cfg-call-home-snapshot)# add-command "show perfmon"

hostname (cfg-call-home-snapshot)# add-command "show conn count"
hostname (cfg-call-home-snapshot)# add-command "show xlate count"

hostname (cfg-call-home-snapshot)# add-command "show service-policy"

hostname (cfg-call-home)# profile NetworkProfiling-1
hostname (cfg-call-home-profile)# destination address email admin@mydomain.com
hostname (cfg-call-home-profile)# destination transport-method email
hostname (cfg-call-home-profile)# subscribe-to-alert-group snapshot periodic interval 120

To email CPU Utilization Information

hostname (config)# service call-home
hostname (config)# call-home
hostname (cfg-call-home)# contact-email-addr customer@mail.server

hostname (cfg-call-home)# mail-server 192.168.1.100 priority 1

hostname (cfg-call-home)# alert-group-config snapshot

hostname (cfg-call-home-snapshot)# add-command "show cpu detailed"

hostname (cfg-call-home-snapshot)# add-command "show processes cpu-usage"

hostname (cfg-call-home-snapshot)# add-command "show processes cpu-hog"

hostname (cfg-call-home-snapshot)# add-command "show interface detail | i line|overrun|no buffer"

hostname (cfg-call-home-snapshot)# add-command "show memory detail"

hostname (cfg-call-home)# profile Oversubscription-1
hostname (cfg-call-home-profile)# destination address email admin@mydomain.com
hostname (cfg-call-home-profile)# destination transport-method email
hostname (cfg-call-home-profile)# subscribe-to-alert-group snapshot periodic interval 120

To email the VPN Utilization

hostname (config)# service call-home
hostname (config)# call-home
hostname (cfg-call-home)# contact-email-addr customer@mail.server

hostname (cfg-call-home)# mail-server 192.168.1.100 priority 1

hostname (cfg-call-home)# alert-group-config snapshot

hostname (cfg-call-home-snapshot)# add-command "show vpn-sessiondb"

hostname (cfg-call-home-snapshot)# add-command "show crypto ipsec sa"

hostname (cfg-call-home-snapshot)# add-command "show crypto isakmp sa"

hostname (cfg-call-home-snapshot)# add-command "show webvpn statistics"

hostname (cfg-call-home-snapshot)# add-command "show crypto protocol statistics all"

hostname (cfg-call-home)# profile VPNUtilization-1
hostname (cfg-call-home-profile)# destination address email admin@mydomain.com
hostname (cfg-call-home-profile)# destination transport-method email
hostname (cfg-call-home-profile)# subscribe-to-alert-group snapshot periodic interval 120

Monitor Port Status

To log up/down messages on all interfaces

Switch (config) # logging event link-status default
Switch# terminal monitor

Other useful commands for troubleshooting

show module all

show interfaces status

show mac-address-table interface
show mac-address-table address 0050.3e8d.6400
show mac-address-table interface gigabit 1/1

show users [all]
disconnect ssh [the number of the active SSH connection]

SHOW commands

  • Show current translation information

    show xlate
  • Show connection info

    show conn
  • Show VPN Session Information IPsec LAN-to-LAN sessions

    show vpnsessiondb l2l
  • Show the boot variables

    show bootvar
  • Show¬†which logging options are enabled
    show logging
  • Show hardware module information

    show module
  • Show configured access rules for ICMP traffic

    show run icmp
  • Troubleshooting NIM modules
    show diag subslot 02 eeprom det
    show platform
    show inventory
    show_tech_voice
  • Verify SCCP and DSPFarm connections

    show sccp ccm group [group-number]
    show dspfarm profile [profile-number]
    show dspfarm all
    show sccp
    show sccp connections
    show media resource status

Comments are closed