Interface ID in Cisco switches and sflow

18 views
Skip to first unread message

Manuel Perdomo

unread,
Apr 14, 2025, 10:03:23 AMApr 14
to sFlow

Hello,

I've configured some Cisco switches with sflow but I get some strange interface identifiers, something like this:

...
in_if : 369,098,810
out_if: 369,098,809
...
in_if : 369,098,754
out_if: 369,098,809
...

Can a mapping be performed with interface names?

Thanks,
Regards

Neil McKee

unread,
Apr 14, 2025, 1:28:12 PMApr 14
to sf...@googlegroups.com
In the sFlow spec these are defined to be SNMP ifIndex numbers.  That means you should be able to retrieve the ifName with a query like this:

snmpget -v 2c -c <community> <agentIP> .1.3.6.1.2.1.31.1.1.1.1.<ifIndex>

Or are you saying that those numbers do not appear in the ifTable?
(Note: these are supposed to be the ifIndex numbers of the port, not a virtual sub-interface that represents, e.g. a VLAN on that port.)

The sFlow spec allows for the ifName to be shared as an optional extension to the interface-counters message, which can be helpful when SNMP is not available.  However not all vendors have added this extension:
Example here:

If Cisco added the extension to this agent then you should see the port names in, e.g. the sflowtool output:

------
Neil McKee
InMon Corp.



--
You received this message because you are subscribed to the Google Groups "sFlow" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sflow+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/sflow/96fb1b58-4cf0-4ec2-aa78-a5da56b38573n%40googlegroups.com.

Manuel Perdomo

unread,
Apr 15, 2025, 5:48:09 AMApr 15
to sFlow
Yes, that was what I was looking for, knowing that it is the ifindex I was able to get the name of the interfaces with "show interface snmp-ifindex"

Many thanks,
Regards
Reply all
Reply to author
Forward
0 new messages