0

Suppose for some reasons I don't have access to Cisco APIC GUI and I need to check interface statistics of a physical interface of a spine/leaf switch? Which command should I use? Should I go to some special mode of CLI before issuing "show interface x/x"? How?

Because now, if I login to a switch via ssh, I get the following output:

leaf# show interface status
URL: http://127.0.0.1:7777/api//class/nwIf.xml?&target-subtree-class=mgmtMgmtIf&query-target=subtree&order-by=nwIf.id|asc
Code: 403
Output: <?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="403" text="Need a valid webtoken cookie (named APIC-Cookie) or a signed request with signature in the cookie APIC-Request-Signature for all REST API requests"/></imdata>
Data Posted:
None
Error executing command, check logs for details
leaf# show logging
Incorrect command "show logging"
leaf#
leaf# ls
aci  bin  controller  debug  dev  etc  isan  lc  lib  mit  proc  sbin  sys  tmp  usr  var
leaf#
leaf# show ?
Incorrect command "show ?"
leaf#
1

I think you are looking for the show interface <slot/port> command. This is run from the enable mode. For example

switch# show interface e4/2
Ethernet4/2 is down (Link not connected)
  Dedicated Interface
  Hardware: 10/100/1000 Ethernet, address: 0018.bad8.80d1 (bia 0024.f71c.739d)
  MTU 1500 bytes, BW 1000000 Kbit, DLY 10 usec
  reliability 153/255, txload 1/255, rxload 1/255
  Encapsulation ARPA
  auto-duplex, auto-speed
  Beacon is turned off
  Auto-Negotiation is turned on
  Input flow-control is off, output flow-control is off
  Auto-mdix is turned on
  Switchport monitor is off
  EtherType is 0x8100
  Last link flapped 01:56:44
  Last clearing of "show interface" counters 1d04h
  30 seconds input rate 0 bits/sec, 0 packets/sec
  30 seconds output rate 0 bits/sec, 0 packets/sec
  Load-Interval #2: 5 minute (300 seconds)
    input rate 0 bps, 0 pps; output rate 0 bps, 0 pps
  L3 in Switched:
    ucast: 0 pkts, 0 bytes - mcast: 0 pkts, 0 bytes
  L3 out Switched:
    ucast: 0 pkts, 0 bytes - mcast: 0 pkts, 0 bytes
  RX
    4 unicast packets  2 multicast packets  0 broadcast packets
    6 input packets  730 bytes
    0 jumbo packets  0 storm suppression packets
    0 runts  0 giants  0 CRC  0 no buffer
    4 input error  0 short frame  0 overrun   0 underrun  0 ignored
    0 watchdog  0 bad etype drop  0 bad proto drop  0 if down drop
    0 input with dribble  0 input discard
    0 Rx pause
  TX
    0 unicast packets  4 multicast packets  0 broadcast packets
    4 output packets  916 bytes
    0 jumbo packets
    0 output error  0 collision  0 deferred  0 late collision
    0 lost carrier  0 no carrier  0 babble  0 output discard
    0 Tx pause
  10 interface resets

There are mayany variations of the show interface command that are detail in various Cisco document, like Cisco NX-OS Interfaces Commands.

0

OK, that error message is actually a known Cisco bug CSCvi51338. It pops up with any kind of "show" commands if the commands are ran by read-only users.

And to check physical interface statistics on a spine/leaf switch in ACI environment, there is no need to be logged in to the local device - it's enough to ssh to an APIC and then issue "show version" command, just like this:

apic1# show version
 Role        Pod         Node        Name                      Version              
 ----------  ----------  ----------  ------------------------  -------------------- 
 controller  1           1           apic1                     3.1(1i)              
 leaf        1           101         leaf1                     n9000-13.1(1i)       
 leaf        1           102         leaf2                     n9000-13.1(1i)       
 leaf        1           103         leaf3                     n9000-13.1(1i)       
 leaf        1           104         leaf4                     n9000-13.1(1i)       
 spine       1           111         spine1                    n9000-13.1(1i)       
 spine       1           112         spine2                    n9000-13.1(1i)       

apic1# 

Then you have to specify which switch (and its interface) you want to check. Let's say we want to check interface ethernet 1/50 on leaf1 - then we issue this command and get the info we were looking for:

apic1# fabric 101 show interface ethernet 1/50
----------------------------------------------------------------
 Node 101 (leaf1)
----------------------------------------------------------------
Ethernet1/50 is down (sfp-missing)
admin state is up, Dedicated Interface
  Hardware: 1000/10000/100000/40000 Ethernet, address: 0000.0000.0000 (bia 00de.fbce.7012)
  MTU 9150 bytes, BW 0 Kbit, DLY 1 usec
  reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation ARPA, medium is broadcast
  Port mode is routed
  full-duplex, 100 Gb/s
  FEC (forward-error-correction) : disable-fec
  Beacon is turned off
  Auto-Negotiation is turned on
  Input flow-control is off, output flow-control is off
  Auto-mdix is turned off
  Rate mode is dedicated
  Switchport monitor is off
  EtherType is 0x8100
  EEE (efficient-ethernet) : n/a
  Last link flapped never
  Last clearing of "show interface" counters never
  0 interface resets
  30 seconds input rate 0 bits/sec, 0 packets/sec
  30 seconds output rate 0 bits/sec, 0 packets/sec
  Load-Interval #2: 5 minute (300 seconds)
    input rate 0 bps, 0 pps; output rate 0 bps, 0 pps
  L3 in Switched:
    ucast: 0 pkts, 0 bytes - mcast: 0 pkts, 0 bytes
  L3 out Switched:
    ucast: 0 pkts, 0 bytes - mcast: 0 pkts, 0 bytes
  RX
    0 unicast packets  0 multicast packets  0 broadcast packets
    0 input packets  0 bytes
    0 jumbo packets  0 storm suppression bytes
    0 runts  0 giants  0 CRC  0 no buffer
    0 input error  0 short frame  0 overrun   0 underrun  0 ignored
    0 watchdog  0 bad etype drop  0 bad proto drop  0 if down drop
    0 input with dribble  0 input discard
    0 Rx pause
  TX
    0 unicast packets  0 multicast packets  0 broadcast packets
    0 output packets  0 bytes
    0 jumbo packets
    0 output error  0 collision  0 deferred  0 late collision
    0 lost carrier  0 no carrier  0 babble  0 output discard
    0 Tx pause


apic1# 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.