Useful Cisco Commands

Useful Cisco Commands

"Is traffic actually using that new route?"

(config)# ip cef accounting non-recursive per-prefix
sh ip cef $subnet/$mask

"Is anyone sending me traffic to unroutable destinations?"

debug ip cef drops

"What changed between the running and startup config?"

show archive config differences nvram:startup-config system:running-config | section exclude certificate

"I want to know what application traffic is flowing, "

(config-if)# auto discovery qos
show auto discovery qos

"I want to look up the OUI of this MAC address but I don't have a web browser"

! don't forget to hit ctrl+v to type the ? here
more http://standards.ieee.org/cgi-bin/ouisearch?000c01 | s pre

"I would like to check the public IP address"

!!IMPORTANT!! you have to give it a display file name for this to work!

more http://internetaddress.me/index.html | s h1

"DNS isnt configured... and i still want to know the External IP address"

more http://132.226.247.73

"How do i find the ip address of this unkown device"

sh mac address-table   //This will give which MAC is connected to which port.
sh ip device tracking interface gigabitEthernet    //This will give which IP is connectd to a port.
sh ip arp    //will give you a IP to MAC table

"I wish I had "for" loops in IOS so I could ARP for all these addresses and find the first free one..."

tclsh
(tcl)# for {set i 0} {$i < 254} {incr i} {exec "ping 10.0.0.$i timeout 0"} ; after 1; show arp | begin Incomplete

"What else can i do with TCL?"

(tcl)# info commands

"Why can't I output control characters to make ANSI art?"

# terminal international

"I have datasheets for the chips in my ISR, How do I hexdump IOS memory to troubleshoot my PHY?"

! This is not normal.
(config)# service internal
#show memory 0x66c22990

"Check IOS source code."

! Yeah, about that...
show memory allocating-process | i SSH

Others:

sh ip cef exact-match xxx.xxx.xxx.xxx(source) xxx.xxx.xxx.xxx(dest)
sh ip bgp sum
sh ip bgp *
sh run | sec ospf, eigrp, any major protocol or service
sh cry isa sa
sh cry ipsec sa
sh ip int bri
sh mac-address table | i (last 4 of searching mac)
sh bgp vpnv4 unicast sum
sh ip bgp neighbor xx.xx.xx.xx advertised-routes
sh ip bgp neighbor xx.xx.xx.xx received-routes (req'ed soft neighbor inbound)
sh voice call sum
debug isdn q931 
sh dsl status
debug isdn q921
sh controllers t1
sh mpls ldp neighbor

BGP:

sh ip bgp nei x.x.x.x advertised-routes
sh ip bgp nei x.x.x.x recieved-routes
sh policy-map in nx/x/x | inc Class|rate|drop
sh inv - simple yet often over looked