Skip to content

Enhancement: SNMP dot3 stats (RFC3635 / RFC1284) #22359

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
bhouse-nexthop opened this issue Apr 17, 2025 · 6 comments · May be fixed by sonic-net/sonic-swss#3615 or sonic-net/sonic-snmpagent#350
Open
Labels

Comments

@bhouse-nexthop
Copy link

bhouse-nexthop commented Apr 17, 2025

Is it platform specific

generic

Importance or Severity

Medium

Description of the enhancement

SNMP is not currently advertising dot3 statistics originally defined in https://www.rfc-editor.org/rfc/rfc1284.html#page-9 sometimes referred to as "Ethernet-like statistics".

Current Behavior

statistics are not output via snmpwalk

Proposed Behavior

per-port statistics should be output per-port

Implementation

@suresh-rupanagudi
Copy link
Contributor

Net-snmp already supports Dot3StatsTable(1.3.6.1.2.1.10.7.2). Why do we need this?.

@suresh-rupanagudi
Copy link
Contributor

snmpwalk -v2c -c public 1.3.6.1.2.1.10.7.2

EtherLike-MIB::dot3StatsIndex.1000 = INTEGER: 1000
EtherLike-MIB::dot3StatsIndex.1001 = INTEGER: 1001
EtherLike-MIB::dot3StatsIndex.1002 = INTEGER: 1002
EtherLike-MIB::dot3StatsAlignmentErrors.1000 = Counter32: 0
EtherLike-MIB::dot3StatsFCSErrors.1000 = Counter32: 0
EtherLike-MIB::dot3StatsFCSErrors.1001 = Counter32: 0
EtherLike-MIB::dot3StatsFCSErrors.1002 = Counter32: 0
EtherLike-MIB::dot3StatsSingleCollisionFrames.1000 = Counter32: 0
EtherLike-MIB::dot3StatsMultipleCollisionFrames.1000 = Counter32: 0
EtherLike-MIB::dot3StatsDeferredTransmissions.1000 = Counter32: 0
EtherLike-MIB::dot3StatsDeferredTransmissions.1001 = Counter32: 0
EtherLike-MIB::dot3StatsDeferredTransmissions.1002 = Counter32: 0

@bradh352
Copy link
Contributor

@suresh-rupanagudi For the same reason SONiC implements rfc1213.py and rfc2863.py which are also implemented already by net-snmp, because net-snmp only has access to the management port(s), not the front panel ports.

@suresh-rupanagudi
Copy link
Contributor

@bradh352 I could see net-snmp has code for front panel ports also. But its failing because of driver does not support stats.
root@leaf3:~# ethtool -S Ethernet0
no stats available

root@leaf3:# ethtool -i Ethernet0
driver: bcm-knet
version: 17
firmware-version: N/A
expansion-rom-version:
bus-info: N/A
supports-statistics: no
supports-test: no
supports-eeprom-access: no
supports-register-dump: no
supports-priv-flags: no
root@leaf3:
#

@bradh352
Copy link
Contributor

bradh352 commented May 1, 2025

@suresh-rupanagudi like I said, this is the same situation as rfc1213.py and rfc2863.py. net-snmp has native code to support this, but the front panel stats aren't available to net-snmp. So we have to grab them via SAI.

@suresh-rupanagudi
Copy link
Contributor

Ok, I will take a look at sonic-snmpagent part of code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants