Friday, December 14, 2007

Enhanced show interfaces command

 

It's amazing how many options (most of them still undocumented) the show interfaces command accepts in IOS release 12.4T (I won't even start guessing when each one was introduced, if you're running old IOS releases, please feel free to comment):

  • show interfaces description displays interface names, L1 and L2 status (line and line-protocol status) and interface description. Extremely handy if you want to check which interfaces are up/down.
  • show interfaces counters protocol status displays the L3 protocols active on each interface.
  • show interfaces summary displays the state of various interface queues and related drop counters in a nice tabular format.
  • show interfaces accounting displays per-protocol in/out counters.
Here are a few sample printouts:
a1#show interfaces description
Interface Status Protocol Description
Fa0/0 up up Central LAN
Fa0/1 admin down down
Se0/0/0 up up Frame Relay
Se0/0/0.100 up up Link to B1
Se0/1/0 admin down down
Se0/1/1 admin down down
Lo0 up up

a1#show interfaces counters protocol status
Protocols allocated:
FastEthernet0/0: Other, IP, DEC MOP, ARP, CDP
FastEthernet0/1: Other, IP
Serial0/0/0: Other, IP, CDP
Serial0/1/0: Other, IP
Serial0/1/1: Other, IP
Loopback0: Other, IP
VoIP-Null0: Other, IP

a1#show interfaces summary

*: interface is up
IHQ: pkts in input hold queue IQD: pkts dropped from input queue
OHQ: pkts in output hold queue OQD: pkts dropped from output queue
RXBS: rx rate (bits/sec) RXPS: rx rate (pkts/sec)
TXBS: tx rate (bits/sec) TXPS: tx rate (pkts/sec)
TRTL: throttle count

Interface IHQ IQD OHQ OQD RXBS RXPS TXBS TXPS TRTL
------------------------------------------------------------------
* FastEthernet0/0 0 0 0 0 0 0 0 0 0
FastEthernet0/1 0 0 0 0 0 0 0 0 0
* Serial0/0/0 0 0 0 0 0 0 0 0 0
* Serial0/0/0.100 - - - - - - - - -
Serial0/1/0 0 0 0 0 0 0 0 0 0
Serial0/1/1 0 0 0 0 0 0 0 0 0
* Loopback0 0 0 0 0 0 0 0 0 0
NOTE:No separate counters are maintained for subinterfaces
Hence Details of subinterface are not shown

a1#show interfaces accounting
FastEthernet0/0 Central LAN
Protocol Pkts In Chars In Pkts Out Chars Out
Other 0 0 490 29400
IP 2737 216847 3052 424422
DEC MOP 0 0 8 616
ARP 5 316 12 720
CDP 82 30914 84 29563
Interface FastEthernet0/1 is disabled

Serial0/0/0 Frame Relay
Protocol Pkts In Chars In Pkts Out Chars Out
Other 0 0 490 6370
IP 515 43748 1034 87608
CDP 83 26477 168 55272

Posted to Cisco IOS Hints and Tricks by Ivan Pepelnjak
© Copyright Ivan Pepelnjak