Bug 220296 - MIB interface on amd64
Summary: MIB interface on amd64
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 11.0-RELEASE
Hardware: amd64 Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-26 21:40 UTC by s-hrgsh
Modified: 2017-07-20 00:23 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description s-hrgsh 2017-06-26 21:40:02 UTC
It seems that values ​​such as ifOutOctets and ifInErrors are getting different values.
It is quite different from the value obtained with netstat.
Comment 1 s-hrgsh 2017-06-27 01:28:43 UTC
netstat -i -b #output
Name    Mtu Network       Address              Ipkts Ierrs Idrop     Ibytes    Opkts Oerrs     Obytes  Coll
lan0   1500 <Link#1>      00:19:99:e4:ac:30   340211     0     0   42660405   814265     0 1022377919     0

#snmpworlk' output
IF-MIB::ifIndex.1 = INTEGER: 1
IF-MIB::ifDescr.1 = STRING: lan0
IF-MIB::ifType.1 = INTEGER: ethernetCsmacd(6)
IF-MIB::ifMtu.1 = INTEGER: 1500
IF-MIB::ifSpeed.1 = Gauge32: 340211
IF-MIB::ifPhysAddress.1 = STRING: 0:19:99:e4:ac:30
IF-MIB::ifAdminStatus.1 = INTEGER: up(1)
IF-MIB::ifOperStatus.1 = INTEGER: up(1)
IF-MIB::ifLastChange.1 = Timeticks: (0) 0:00:00.00
IF-MIB::ifLastChange.6 = Timeticks: (30319) 0:05:03.19
IF-MIB::ifInOctets.1 = Counter32: 1022377973
IF-MIB::ifInUcastPkts.1 = Counter32: 4294950950
IF-MIB::ifInNUcastPkts.1 = Counter32: 16346
IF-MIB::ifInDiscards.1 = Counter32: 0
IF-MIB::ifInErrors.1 = Counter32: 814270
IF-MIB::ifInUnknownProtos.1 = Counter32: 0
IF-MIB::ifOutOctets.1 = Counter32: 2717
IF-MIB::ifOutUcastPkts.1 = Counter32: 0
IF-MIB::ifOutNUcastPkts.1 = Counter32: 0
IF-MIB::ifOutDiscards.1 = Counter32: 0
IF-MIB::ifOutErrors.1 = Counter32: 0
IF-MIB::ifOutQLen.1 = Gauge32: 0
IF-MIB::ifSpecific.1 = OID: SNMPv2-SMI::zeroDotZero
Comment 2 s-hrgsh 2017-06-30 03:08:06 UTC
Verified network device is bge is functioning quite successfully on another machine.

But, hardware problems are occurring in this send/receive bytes device is e1000.
The value of ifSpeed is strange.
Comment 3 Bjoern A. Zeeb freebsd_committer freebsd_triage 2017-07-01 10:54:16 UTC
(In reply to s-hrgsh from comment #2)

Can you please explain what you mean?   Do you say it is card/device driver specific (happens with e1000 but not bge)?

Also is this on a 32bit or 64bit version and which architecture?
Comment 4 s-hrgsh 2017-07-07 07:29:10 UTC
I was wrong. It seems that it was not a problem of NIC.
The value of ifSpeed point to Ipkts.

#bsnmpwalk | grep ifSeep ; netstat -i -b 
ifSpeed[1] = 9294705
ifSpeed[2] = 20206398
ifSpeed[3] = 29295
ifSpeed[4] = 0
ifSpeed[5] = 2268916
ifSpeed[6] = 171116
ifSpeed[7] = 113610
ifSpeed[8] = 0
ifSpeed[9] = 14
Name    Mtu Network       Address              Ipkts Ierrs Idrop     Ibytes    Opkts Oerrs     Obytes  Coll
lan0   1500 <Link#1>      00:19:99:e4:ac:30  9294705     0     0 1364171021 19523554     0 25105648582     0
lan0      - 192.168.200.0 192.168.200.1        71670     -     -   11866792   267958     -  113581224     -
wan0   1500 <Link#2>      00:19:99:e1:0d:ca 20206399     0     0 25712734670 10417400     0 1580979113     0
lo0   16384 <Link#3>      lo0                  30290     0     0    3687783    30290     0    3687783     0
lo0       - localhost     localhost               49     -     -       3505       49     -       3505     -
lo0       - fe80::%lo0/64 fe80::1%lo0              0     -     -          0       28     -       1568     -
lo0       - your-net      localhost            30241     -     -    3684278    30241     -    3684278     -
pflog 33160 <Link#4>      pflog0                   0     0     0          0        0     0          0     0
tun0   1500 <Link#6>      tun0                171116     0     0  144450348   168468     0   15513269     0
tun0      - 172.16.0.0/16 172.16.255.2             8     -     -        672        8     -        672     -
tun0      - fe80::%tun0/6 fe80::219:99ff:fe       14     -     -        784        1     -         76     -
tun1   1500 <Link#7>      tun1                113611     0     0   11745774   304219     0  388647534     0
tun1      - 172.16.0.0/16 172.16.255.2             0     -     -          0    59232     -   71841322     -
tun1      - fe80::%tun1/6 fe80::219:99ff:fe        0     -     -          0        2     -        172     -
tun2   1500 <Link#8>      tun2                     0     0     0          0        0     0          0     0
tun2      - 172.16.0.0/16 172.16.255.2             0     -     -          0        0     -          0     -
tun2      - fe80::%tun2/6 fe80::219:99ff:fe        0     -     -          0        1     -         96     -
ng0    1454 <Link#5>      ng0                2268917     0     0 2847307844  1031338     0  154997380     0
ng0       - 180.25.65.148 p338148-ipngn2004   132454     -     -   80941280   173324     -   81027323     -
ng1    1454 <Link#9>      ng1                     14     0     0        784       16     0       1016     0
ng1       - fe80::%ng1/64 fe80::219:99ff:fe       14     -     -        784        2     -        232     -
Comment 5 s-hrgsh 2017-07-07 12:59:09 UTC
AMD64 mode machine be sure indicate outliers ifSpeed is not.
In fact, more x64 machine, ifSpeed successful shows.
I wonder why ifSpeed is a strange value?
Comment 6 s-hrgsh 2017-07-07 13:10:28 UTC
The latest "11.1-RC1" but had the same results.
Upgrade to 11.0 lost value in SNMP as I think.
Comment 7 Andrey V. Elsukov freebsd_committer freebsd_triage 2017-07-14 13:09:09 UTC
What snmp server do you use? net-snmp does this, and this is not FreeBSD problem. I made the dirty patch 
here https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=212484

net-snmp needs a better freebsd-specific code, that it has for linux and openbsd.
Comment 8 s-hrgsh 2017-07-20 00:23:58 UTC
(In reply to Andrey V. Elsukov from comment #7)

I am using bsnmpd.
Perhaps there is a similar problem?