Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 258576 - net-analyzer/net-snmp-5.4.2.1 incorrectly reports vlan interface speed
Summary: net-analyzer/net-snmp-5.4.2.1 incorrectly reports vlan interface speed
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-11 09:30 UTC by Oleg Gawriloff
Modified: 2012-10-08 06:13 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oleg Gawriloff 2009-02-11 09:30:24 UTC
Have net-snmp 5.4.2.1 installed. Have following network setup:
modules=("ifconfig")
vlans_eth0="10 200"
config_eth0=("null")
vconfig_eth0=("set_name_type VLAN_PLUS_VID_NO_PAD")
config_vlan10=("172.16.2.30/24")

falcon-test ~ # ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:1e:0b:5a:f1:1a
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:905735 errors:0 dropped:0 overruns:0 frame:0
          TX packets:997175 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:177677422 (169.4 MiB)  TX bytes:745857498 (711.3 MiB)
          Interrupt:16
falcon-test ~ # ifconfig vlan10
vlan10    Link encap:Ethernet  HWaddr 00:1e:0b:5a:f1:1a
          inet addr:172.16.2.30  Bcast:172.16.2.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:12583 errors:0 dropped:0 overruns:0 frame:0
          TX packets:11558 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:689027 (672.8 KiB)  TX bytes:3939199 (3.7 MiB)

eth0 is 1G, vlan10 should be also 1G. But net-snmp reports it as 100M, which breaks our monitoring system:

>snmpwalk -c <snmp community> -v 1 127.0.0.1 interfaces
IF-MIB::ifDescr.2 = STRING: eth0
IF-MIB::ifDescr.4 = STRING: vlan10
IF-MIB::ifSpeed.2 = Gauge32: 1000000000
IF-MIB::ifSpeed.4 = Gauge32: 100000000



Reproducible: Always
Comment 1 Peter Alfredsen (RETIRED) gentoo-dev 2009-02-11 23:07:25 UTC
Please attach emerge --info
Comment 2 Oleg Gawriloff 2009-02-12 07:09:46 UTC
barzog@falcon-test ~ $ sudo emerge --info
Portage 2.1.6.4 (default/linux/amd64/2008.0/no-multilib, gcc-4.1.2, glibc-2.6.1-r0, 2.6.28.2 x86_64)
=================================================================
System uname: Linux-2.6.28.2-x86_64-Intel-R-_Xeon-R-_CPU_E5310_@_1.60GHz-with-glibc2.2.5
Timestamp of tree: Tue, 10 Feb 2009 03:00:01 +0000
distcc 3.0 x86_64-pc-linux-gnu [enabled]
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p39
dev-lang/python:     2.4.4-r14, 2.5.2-r7
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.63
sys-devel/automake:  1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.28-r1
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=nocona"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe -march=nocona"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distcc distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://ftp1.telecom.by/Media/StorageF/admin/gentoo/"
LDFLAGS="-Wl,-O1"
LINGUAS="en ru"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/wschlich-testing /usr/local/portage"
SYNC="rsync://ftp1.telecom.by/gentoo-portage"
USE="acl amd64 berkdb bzip2 cli cracklib crypt cups dri fortran gdbm iconv isdnlog midi mmx mudflap ncurses nls nptl nptlonly openmp pam pcre perl pppd python readline reflection session spl sse sse2 ssl sysfs tcpd unicode xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en ru" USERLAND="GNU" VIDEO_CARDS="fbdev glint i810 intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa vga via vmware voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 3 Peter Volkov (RETIRED) gentoo-dev 2009-03-02 10:34:57 UTC
Sometimes this happens and as a workaround you could use "interface" directive for snmpd.conf file (man snmpd.conf). Note this directive does not work support globbing in NAME, so 'interface bond* 6 1000000000' will not work.

That's said, to debug this problem further, please run *agent* with -DmibII/interfaces option (add it to SNMPD_FLAGS in /etc/conf.d/snmpd) and show us logs (/var/log/net-snmp.log), or just run snmpd -f -DmibII/interfaces from the command line and show us output.

I found that similar problem was debugged on list but it has no resolution (so you don't need to read that thread). I just keep reference on the tread here since it could help me in future: http://marc.info/?l=net-snmp-users&m=119643723224334&w=2
Comment 4 Oleg Gawriloff 2009-03-03 10:44:50 UTC
vulture2 ~ # snmpd -f -DmibII/interfaces
No log handling enabled - turning on stderr logging
registered debug token mibII/interfaces, 1
mibII/interfaces: ETHTOOL_GSET on eth0 speed = 1000
mibII/interfaces: ETHTOOL_GSET on eth1 speed = 1000
mibII/interfaces: ETHTOOL_GSET on vlan10 failed
mibII/interfaces: ETHTOOL_GSET on vlan200 failed
mibII/interfaces: ETHTOOL_GSET on vlan202 failed
mibII/interfaces: ETHTOOL_GSET on eth0 speed = 1000
mibII/interfaces: ETHTOOL_GSET on eth1 speed = 1000
mibII/interfaces: ETHTOOL_GSET on vlan10 failed
mibII/interfaces: ETHTOOL_GSET on vlan200 failed
mibII/interfaces: ETHTOOL_GSET on vlan202 failed
NET-SNMP version 5.4.2.1
Comment 5 Dawid Węgliński (RETIRED) gentoo-dev 2009-03-10 05:24:32 UTC
Well, use 64bits counters not 32 maybe?
Comment 6 Oleg Gawriloff 2009-03-10 15:03:01 UTC
Thats ok (in fact I've already doing this with interface speed setting as suggested by Peter).

Comment 7 Diego Elio Pettenò (RETIRED) gentoo-dev 2012-10-04 16:04:02 UTC
Please reopen if this is still an issue with 5.7.2_rc3.
Comment 8 Oleg Gawriloff 2012-10-08 06:13:15 UTC
For 1Gbit all works well.

gawriloff@vulture2 ~ $ snmpwalk -c <> -v 1 127.0.0.1 ifDescr
IF-MIB::ifDescr.1 = STRING: lo
IF-MIB::ifDescr.2 = STRING: Intel Corporation I350 Gigabit Network Connection
IF-MIB::ifDescr.3 = STRING: Intel Corporation I350 Gigabit Network Connection
IF-MIB::ifDescr.4 = STRING: Intel Corporation 82599EB 10-Gigabit SFI/SFP+ Network Connection
IF-MIB::ifDescr.5 = STRING: Intel Corporation I350 Gigabit Network Connection
IF-MIB::ifDescr.6 = STRING: Intel Corporation I350 Gigabit Network Connection
IF-MIB::ifDescr.7 = STRING: vlan200
IF-MIB::ifDescr.8 = STRING: vlan202

gawriloff@vulture2 ~ $ snmpwalk -c <> -v 1 127.0.0.1 ifSpeed
IF-MIB::ifSpeed.1 = Gauge32: 10000000
IF-MIB::ifSpeed.2 = Gauge32: 1000000000
IF-MIB::ifSpeed.3 = Gauge32: 0
IF-MIB::ifSpeed.4 = Gauge32: 4294967295
IF-MIB::ifSpeed.5 = Gauge32: 0
IF-MIB::ifSpeed.6 = Gauge32: 0
IF-MIB::ifSpeed.7 = Gauge32: 4294967295
IF-MIB::ifSpeed.8 = Gauge32: 4294967295

gawriloff@vulture2 ~ $ snmpwalk -c M< -v 2c 127.0.0.1 ifHighSpeed
IF-MIB::ifHighSpeed.1 = Gauge32: 10
IF-MIB::ifHighSpeed.2 = Gauge32: 1000
IF-MIB::ifHighSpeed.3 = Gauge32: 0
IF-MIB::ifHighSpeed.4 = Gauge32: 10000
IF-MIB::ifHighSpeed.5 = Gauge32: 0
IF-MIB::ifHighSpeed.6 = Gauge32: 0
IF-MIB::ifHighSpeed.7 = Gauge32: 10000
IF-MIB::ifHighSpeed.8 = Gauge32: 10000