Project

General

Profile

Bug #51557

Add support for high speed NICs to SNMP

Added by Wojciech Kruzel about 2 years ago. Updated almost 2 years ago.

Status:
Done
Priority:
No priority
Assignee:
Vladimir Vinogradenko
Category:
Middleware
Seen in:
Severity:
New
Reason for Closing:
Reason for Blocked:
Needs QA:
No
Needs Doc:
No
Needs Merging:
No
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

Hi,

I recently started monitoring our FreeNAS machines and noticed an interesting thing.

Our 10Gig interfaces are reported as 1Gbps, via SNMP.
Lagg interface is reported as 2.8Gbps and VLAN interfaces are reported as 10Mbps.

This mesess with SNMP monitoring big time.
I have encountered similar problem few years before (on Linux) and the solution was to change the Counter32 to Counter64, and then provide correct value.

Output from my SNMP:

.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifIndex.1 = INTEGER: 1
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifIndex.2 = INTEGER: 2
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifIndex.3 = INTEGER: 3
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifIndex.4 = INTEGER: 4
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifIndex.5 = INTEGER: 5
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifIndex.6 = INTEGER: 6
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifDescr.1 = STRING: ix0
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifDescr.2 = STRING: ix1
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifDescr.3 = STRING: lo0
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifDescr.4 = STRING: lagg0
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifDescr.5 = STRING: vlan4
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifDescr.6 = STRING: vlan12
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifType.1 = INTEGER: ieee8023adLag(161)
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifType.2 = INTEGER: ieee8023adLag(161)
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifType.3 = INTEGER: softwareLoopback(24)
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifType.4 = INTEGER: ethernetCsmacd(6)
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifType.5 = INTEGER: l2vlan(135)
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifType.6 = INTEGER: l2vlan(135)
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifMtu.1 = INTEGER: 9000
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifMtu.2 = INTEGER: 9000
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifMtu.3 = INTEGER: 16384
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifMtu.4 = INTEGER: 9000
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifMtu.5 = INTEGER: 9000
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifMtu.6 = INTEGER: 9000
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifSpeed.1 = Gauge32: 1000000000
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifSpeed.2 = Gauge32: 1000000000
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifSpeed.3 = Gauge32: 0
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifSpeed.4 = Gauge32: 2820130816
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifSpeed.5 = Gauge32: 10000000
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifSpeed.6 = Gauge32: 10000000
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifPhysAddress.1 = STRING: 0:1f:6b:5:94:68
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifPhysAddress.2 = STRING: 0:1f:6b:5:94:68
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifPhysAddress.3 = STRING:
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifPhysAddress.4 = STRING: 0:1f:6b:5:94:68
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifPhysAddress.5 = STRING: 0:1f:6b:5:94:68
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifPhysAddress.6 = STRING: 0:1f:6b:5:94:68
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifAdminStatus.1 = INTEGER: up(1)
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifAdminStatus.2 = INTEGER: up(1)
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifAdminStatus.3 = INTEGER: up(1)
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifAdminStatus.4 = INTEGER: up(1)
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifAdminStatus.5 = INTEGER: up(1)
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifAdminStatus.6 = INTEGER: up(1)
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifOperStatus.1 = INTEGER: up(1)
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifOperStatus.2 = INTEGER: up(1)
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifOperStatus.3 = INTEGER: up(1)
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifOperStatus.4 = INTEGER: up(1)
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifOperStatus.5 = INTEGER: up(1)
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifOperStatus.6 = INTEGER: up(1)
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifLastChange.1 = Timeticks: (0) 0:00:00.00
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifLastChange.2 = Timeticks: (0) 0:00:00.00
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifLastChange.3 = Timeticks: (0) 0:00:00.00
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifLastChange.4 = Timeticks: (0) 0:00:00.00
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifLastChange.5 = Timeticks: (0) 0:00:00.00
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifLastChange.6 = Timeticks: (0) 0:00:00.00
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifInOctets.1 = Counter32: 4044075779
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifInOctets.2 = Counter32: 3113218908
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifInOctets.3 = Counter32: 1152610400
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifInOctets.4 = Counter32: 2862414603
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifInOctets.5 = Counter32: 1931487316
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifInOctets.6 = Counter32: 362799253
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifInUcastPkts.1 = Counter32: 102472448
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifInUcastPkts.2 = Counter32: 2355741957
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifInUcastPkts.3 = Counter32: 4223197
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifInUcastPkts.4 = Counter32: 2458214898
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifInUcastPkts.5 = Counter32: 89268084
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifInUcastPkts.6 = Counter32: 1553816458
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifInNUcastPkts.1 = Counter32: 0
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifInNUcastPkts.2 = Counter32: 0
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifInNUcastPkts.3 = Counter32: 0
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifInNUcastPkts.4 = Counter32: 0
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifInNUcastPkts.5 = Counter32: 0
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifInNUcastPkts.6 = Counter32: 0
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifInDiscards.1 = Counter32: 0
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifInDiscards.2 = Counter32: 0
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifInDiscards.3 = Counter32: 0
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifInDiscards.4 = Counter32: 0
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifInDiscards.5 = Counter32: 0
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifInDiscards.6 = Counter32: 0
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifInErrors.1 = Counter32: 0
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifInErrors.2 = Counter32: 0
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifInErrors.3 = Counter32: 0
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifInErrors.4 = Counter32: 0
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifInErrors.5 = Counter32: 0
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifInErrors.6 = Counter32: 0
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifInUnknownProtos.1 = Counter32: 0
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifInUnknownProtos.2 = Counter32: 0
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifInUnknownProtos.3 = Counter32: 0
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifInUnknownProtos.4 = Counter32: 0
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifInUnknownProtos.5 = Counter32: 0
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifInUnknownProtos.6 = Counter32: 0
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifOutOctets.1 = Counter32: 884867556
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifOutOctets.2 = Counter32: 1128324940
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifOutOctets.3 = Counter32: 1152610400
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifOutOctets.4 = Counter32: 2013192496
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifOutOctets.5 = Counter32: 3521222142
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifOutOctets.6 = Counter32: 2289333348
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifOutUcastPkts.1 = Counter32: 2231736247
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifOutUcastPkts.2 = Counter32: 454964701
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifOutUcastPkts.3 = Counter32: 4223197
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifOutUcastPkts.4 = Counter32: 2686700948
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifOutUcastPkts.5 = Counter32: 107375900
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifOutUcastPkts.6 = Counter32: 2099045789
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifOutNUcastPkts.1 = Counter32: 0
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifOutNUcastPkts.2 = Counter32: 0
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifOutNUcastPkts.3 = Counter32: 0
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifOutNUcastPkts.4 = Counter32: 0
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifOutNUcastPkts.5 = Counter32: 0
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifOutNUcastPkts.6 = Counter32: 0
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifOutDiscards.1 = Counter32: 0
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifOutDiscards.2 = Counter32: 0
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifOutDiscards.3 = Counter32: 0
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifOutDiscards.4 = Counter32: 0
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifOutDiscards.5 = Counter32: 0
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifOutDiscards.6 = Counter32: 0
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifOutErrors.1 = Counter32: 0
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifOutErrors.2 = Counter32: 0
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifOutErrors.3 = Counter32: 0
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifOutErrors.4 = Counter32: 29
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifOutErrors.5 = Counter32: 3
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifOutErrors.6 = Counter32: 21
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifOutQLen.1 = Gauge32: 0
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifOutQLen.2 = Gauge32: 0
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifOutQLen.3 = Gauge32: 0
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifOutQLen.4 = Gauge32: 0
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifOutQLen.5 = Gauge32: 0
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifOutQLen.6 = Gauge32: 0


Related issues

Copied to FreeNAS - Bug #53469: Add support for high speed NICs to SNMPDone

Associated revisions

Revision 54211fc5 (diff)
Added by Vladimir Vinogradenko about 2 years ago

fix(net-mgmt/net-snmp): support for various media types to netsnmp_sysctl_ifmedia_to_speed() function, so now it should correctly see show the speed for hiSpeed NICs. FreeBSD bug: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=212484 Ticket: #51557

Revision 38563c74 (diff)
Added by Vladimir Vinogradenko about 2 years ago

fix(net-mgmt/net-snmp): support for various media types to netsnmp_sysctl_ifmedia_to_speed() function, so now it should correctly see show the speed for hiSpeed NICs. FreeBSD bug: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=212484 Ticket: #51557 (cherry picked from commit 54211fc55db3cc5f710ab6a169ab41b56814ea11)

Revision ee522a37 (diff)
Added by Vladimir Vinogradenko almost 2 years ago

fix(net-mgmt/net-snmp): support for various media types to netsnmp_sysctl_ifmedia_to_speed() function, so now it should correctly see show the speed for hiSpeed NICs. FreeBSD bug: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=212484 Ticket: #51557

Revision b9e8d9ed (diff)
Added by Vladimir Vinogradenko over 1 year ago

fix(net-mgmt/net-snmp): support for various media types to netsnmp_sysctl_ifmedia_to_speed() function, so now it should correctly see show the speed for hiSpeed NICs. FreeBSD bug: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=212484 Ticket: #51557

Revision 0bf84a1d (diff)
Added by Vladimir Vinogradenko over 1 year ago

fix(net-mgmt/net-snmp): support for various media types to netsnmp_sysctl_ifmedia_to_speed() function, so now it should correctly see show the speed for hiSpeed NICs. FreeBSD bug: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=212484 Ticket: #51557

Revision 202542a2 (diff)
Added by Vladimir Vinogradenko over 1 year ago

fix(net-mgmt/net-snmp): support for various media types to netsnmp_sysctl_ifmedia_to_speed() function, so now it should correctly see show the speed for hiSpeed NICs. FreeBSD bug: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=212484 Ticket: #51557

Revision bf027dbe (diff)
Added by Vladimir Vinogradenko over 1 year ago

fix(net-mgmt/net-snmp): support for various media types to netsnmp_sysctl_ifmedia_to_speed() function, so now it should correctly see show the speed for hiSpeed NICs. FreeBSD bug: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=212484 Ticket: #51557

Revision 84b073f4 (diff)
Added by Vladimir Vinogradenko over 1 year ago

fix(net-mgmt/net-snmp): support for various media types to netsnmp_sysctl_ifmedia_to_speed() function, so now it should correctly see show the speed for hiSpeed NICs. FreeBSD bug: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=212484 Ticket: #51557

Revision e942f5c2 (diff)
Added by Vladimir Vinogradenko about 1 year ago

fix(net-mgmt/net-snmp): support for various media types to netsnmp_sysctl_ifmedia_to_speed() function, so now it should correctly see show the speed for hiSpeed NICs. FreeBSD bug: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=212484 Ticket: #51557

History

#1 Updated by Wojciech Kruzel about 2 years ago

Both ix0 and ix1 are 10Gbps.

#2 Updated by Wojciech Kruzel about 2 years ago

Also ifHighSpeed should be in use, but it's not.

#3 Updated by Wojciech Kruzel about 2 years ago

Just to add, that the traffic counters are also off, by a long distance.
According to FreeNAS UI Reporting I'm doing about 1Gbps output, but according to SNMP it's only ~150Mbps.
The counters seem to go around within minutes.

#4 Updated by Dru Lavigne about 2 years ago

  • Category changed from Services to Middleware
  • Assignee changed from Release Council to William Grzybowski

#5 Updated by William Grzybowski about 2 years ago

  • Assignee changed from William Grzybowski to Vladimir Vinogradenko
  • Target version changed from Backlog to 11.2-U2

Vladimir, can you investigate this, please?

#6 Updated by Vladimir Vinogradenko about 2 years ago

  • Status changed from Unscreened to Blocked
  • Reason for Blocked set to Waiting for feedback

Wojciech, we can't just change .iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifSpeed to Gauge64, it would be a violation of standard.

If you don't see ifHighSpeed, you're probably looking in the wrong place. It is not in .iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry, it is in .iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry

Please inspect these values. They are probably also wrong (they are wrong on my machine). net-snmp uses sysctl to retrieve these values, what does sysctl -a | grep dev.ix.0 say?

#7 Updated by Vladimir Vinogradenko about 2 years ago

10GBit interface speed values are wrong due to https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=212484
I'll backport this into FreeNAS

#8 Updated by Vladimir Vinogradenko about 2 years ago

The counters seem to go around within minutes.

Sorry, I don't understand, what do you mean by that? Are SNMP counters showing outdated info (and catch up later)? Do they match netstat -ni output?

#9 Updated by Wojciech Kruzel about 2 years ago

Vladimir Vinogradenko wrote:

The counters seem to go around within minutes.

Sorry, I don't understand, what do you mean by that? Are SNMP counters showing outdated info (and catch up later)? Do they match netstat -ni output?

At line speed of 9.5ish Gbps the card passes ~1.1 GB/s. With the counter limit being 4,294,967,296 this is enough only for about 4 seconds of traffic counting, then the counter restarts from zero.

#10 Updated by Wojciech Kruzel about 2 years ago

My netstat -ni output:

  1. netstat -ni
    Name Mtu Network Address Ipkts Ierrs Idrop Opkts Oerrs Coll
    ix0 9000 <Link#1> ac:1f:6b:05:94:68 103606023 0 0 12446210737 0 0
    ix1 9000 <Link#2> ac:1f:6b:05:94:68 11841105235 0 0 5522600620 0 0
    lo0 16384 <Link#3> lo0 8328571 0 0 8328571 0 0
    lo0 - ::1/128 ::1 110 - - 110 - -
    lo0 - fe80::%lo0/64 fe80::1%lo0 0 - - 0 - -
    lo0 - 127.0.0.0/8 127.0.0.1 8327770 - - 8327770 - -
    lagg0 9000 <Link#4> ac:1f:6b:05:94:68 11944712400 0 0 17968811357 29 0
    lagg0 - 192.168.8.0/2 192.168.8.5 2792618375 - - 8516449590 - -
    vlan4 9000 <Link#5> ac:1f:6b:05:94:68 157833696 0 0 191718403 3 0
    vlan4 - 192.168.4.0/2 192.168.4.100 157747849 - - 271372914 - -
    vlan1 9000 <Link#6> ac:1f:6b:05:94:68 5367655155 0 0 7647789059 21 0
    vlan1 - 192.168.12.0/ 192.168.12.5 5367492171 - - 8973424699 - -

The counters here are 64bit

#11 Updated by Vladimir Vinogradenko about 2 years ago

So is it only a counter overflow error? Do 64-bit counters from .iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry show correct values?

#12 Updated by Wojciech Kruzel about 2 years ago

Yes, the HC (high counter presumably) seem to be showing the correct output.
However ifHighSpeed shows incorrect speeds of those interfaces.

See below:
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifName.1 = STRING: ix0
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifName.2 = STRING: ix1
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifName.3 = STRING: lo0
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifName.4 = STRING: lagg0
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifName.5 = STRING: vlan4
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifName.6 = STRING: vlan12
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifInMulticastPkts.1 = Counter32: 103877
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifInMulticastPkts.2 = Counter32: 55520
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifInMulticastPkts.3 = Counter32: 0
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifInMulticastPkts.4 = Counter32: 159397
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifInMulticastPkts.5 = Counter32: 36714
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifInMulticastPkts.6 = Counter32: 36171
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifInBroadcastPkts.1 = Counter32: 0
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifInBroadcastPkts.2 = Counter32: 0
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifInBroadcastPkts.3 = Counter32: 0
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifInBroadcastPkts.4 = Counter32: 0
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifInBroadcastPkts.5 = Counter32: 0
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifInBroadcastPkts.6 = Counter32: 0
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifOutMulticastPkts.1 = Counter32: 47912
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifOutMulticastPkts.2 = Counter32: 38292
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifOutMulticastPkts.3 = Counter32: 0
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifOutMulticastPkts.4 = Counter32: 86204
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifOutMulticastPkts.5 = Counter32: 4826
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifOutMulticastPkts.6 = Counter32: 4496
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifOutBroadcastPkts.1 = Counter32: 0
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifOutBroadcastPkts.2 = Counter32: 0
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifOutBroadcastPkts.3 = Counter32: 0
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifOutBroadcastPkts.4 = Counter32: 0
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifOutBroadcastPkts.5 = Counter32: 0
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifOutBroadcastPkts.6 = Counter32: 0
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHCInOctets.1 = Counter64: 154527830348
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHCInOctets.2 = Counter64: 5775599171733
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHCInOctets.3 = Counter64: 2623026988
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHCInOctets.4 = Counter64: 5930127204688
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHCInOctets.5 = Counter64: 2876173377048
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHCInOctets.6 = Counter64: 2510609536862
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHCInUcastPkts.1 = Counter64: 103611514
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHCInUcastPkts.2 = Counter64: 11868238398
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHCInUcastPkts.3 = Counter64: 8642209
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHCInUcastPkts.4 = Counter64: 11971851076
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHCInUcastPkts.5 = Counter64: 159605771
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHCInUcastPkts.6 = Counter64: 5369157998
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHCInMulticastPkts.1 = Counter64: 103877
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHCInMulticastPkts.2 = Counter64: 55520
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHCInMulticastPkts.3 = Counter64: 0
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHCInMulticastPkts.4 = Counter64: 159397
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHCInMulticastPkts.5 = Counter64: 36714
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHCInMulticastPkts.6 = Counter64: 36171
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHCInBroadcastPkts.1 = Counter64: 0
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHCInBroadcastPkts.2 = Counter64: 0
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHCInBroadcastPkts.3 = Counter64: 0
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHCInBroadcastPkts.4 = Counter64: 0
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHCInBroadcastPkts.5 = Counter64: 0
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHCInBroadcastPkts.6 = Counter64: 0
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHCOutOctets.1 = Counter64: 15023736885748
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHCOutOctets.2 = Counter64: 14622900502379
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHCOutOctets.3 = Counter64: 2623026988
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHCOutOctets.4 = Counter64: 29646637388127
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHCOutOctets.5 = Counter64: 186978971300
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHCOutOctets.6 = Counter64: 16907839501272
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHCOutUcastPkts.1 = Counter64: 12449875652
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHCOutUcastPkts.2 = Counter64: 5525555001
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHCOutUcastPkts.3 = Counter64: 8642209
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHCOutUcastPkts.4 = Counter64: 17975430653
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHCOutUcastPkts.5 = Counter64: 194017057
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHCOutUcastPkts.6 = Counter64: 7649165592
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHCOutMulticastPkts.1 = Counter64: 47912
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHCOutMulticastPkts.2 = Counter64: 38292
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHCOutMulticastPkts.3 = Counter64: 0
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHCOutMulticastPkts.4 = Counter64: 86204
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHCOutMulticastPkts.5 = Counter64: 4826
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHCOutMulticastPkts.6 = Counter64: 4496
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHCOutBroadcastPkts.1 = Counter64: 0
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHCOutBroadcastPkts.2 = Counter64: 0
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHCOutBroadcastPkts.3 = Counter64: 0
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHCOutBroadcastPkts.4 = Counter64: 0
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHCOutBroadcastPkts.5 = Counter64: 0
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHCOutBroadcastPkts.6 = Counter64: 0
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHighSpeed.1 = Gauge32: 1000
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHighSpeed.2 = Gauge32: 1000
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHighSpeed.3 = Gauge32: 0
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHighSpeed.4 = Gauge32: 2820
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHighSpeed.5 = Gauge32: 10
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHighSpeed.6 = Gauge32: 10
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifPromiscuousMode.1 = INTEGER: false(2)
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifPromiscuousMode.2 = INTEGER: false(2)
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifPromiscuousMode.3 = INTEGER: false(2)
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifPromiscuousMode.4 = INTEGER: false(2)
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifPromiscuousMode.5 = INTEGER: false(2)
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifPromiscuousMode.6 = INTEGER: false(2)
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifConnectorPresent.1 = INTEGER: true(1)
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifConnectorPresent.2 = INTEGER: true(1)
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifConnectorPresent.3 = INTEGER: true(1)
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifConnectorPresent.4 = INTEGER: true(1)
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifConnectorPresent.5 = INTEGER: true(1)
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifConnectorPresent.6 = INTEGER: true(1)
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifAlias.1 = STRING:
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifAlias.2 = STRING:
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifAlias.3 = STRING:
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifAlias.4 = STRING:
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifAlias.5 = STRING:
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifAlias.6 = STRING:
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifCounterDiscontinuityTime.1 = Timeticks: (0) 0:00:00.00
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifCounterDiscontinuityTime.2 = Timeticks: (0) 0:00:00.00
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifCounterDiscontinuityTime.3 = Timeticks: (0) 0:00:00.00
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifCounterDiscontinuityTime.4 = Timeticks: (0) 0:00:00.00
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifCounterDiscontinuityTime.5 = Timeticks: (0) 0:00:00.00
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifCounterDiscontinuityTime.6 = Timeticks: (0) 0:00:00.00
.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifTableLastChange.0 = Timeticks: (0) 0:00:00.00

#13 Updated by Vladimir Vinogradenko about 2 years ago

ifHighSpeed will be fixed in the next release.

Please use 64-bit counters from ifXTable for traffic accounting, we won't convert 32-bit to 64-bit, it might break many other systems.

#14 Updated by Wojciech Kruzel about 2 years ago

OK, I will do that. Thanks!

#15 Updated by Vladimir Vinogradenko about 2 years ago

PR: https://github.com/freenas/ports/pull/148

Acceptance criteria

On machine with 10 GBit network card plugged to 10 GBit network:

Start SNMP service

Run snmpwalk -v 2c -c public localhost | egrep "ifName|ifHighSpeed"

It should say IF-MIB::ifHighSpeed.XXX = Gauge32: 10000 for 10 GBit interface

#16 Updated by Vladimir Vinogradenko about 2 years ago

  • Status changed from Blocked to In Progress

#17 Updated by Wojciech Kruzel about 2 years ago

Would the fix also fix the lagg interfaces so they are calculated correctly?
Currently my 20Gbps lag is being reported as 2.8Gbps

#18 Updated by Bug Clerk about 2 years ago

  • Copied to Bug #53469: Add support for high speed NICs to SNMP added

#19 Updated by Bug Clerk about 2 years ago

  • Status changed from In Progress to Ready for Testing

#20 Updated by Bug Clerk about 2 years ago

  • Target version changed from 11.2-U2 to 11.3

#21 Updated by Dru Lavigne about 2 years ago

  • Subject changed from FreeNAS SNMP incorrectly reports interfaces to Add support for high speed NICs to SNMP

#22 Updated by Dru Lavigne almost 2 years ago

  • Target version changed from 11.3 to 11.3-BETA1

#23 Updated by Dru Lavigne almost 2 years ago

  • Status changed from Ready for Testing to Done
  • Target version changed from 11.3-BETA1 to Master - FreeNAS Nightlies
  • Reason for Blocked deleted (Waiting for feedback)
  • Needs QA changed from Yes to No
  • Needs Doc changed from Yes to No
  • Needs Merging changed from Yes to No

Also available in: Atom PDF