Discussion:
snmpwalk question regarding IfSpeed of E1000 device
Robert M
2007-05-09 15:17:57 UTC
Permalink
Hello,

I am fairly new to snmp and have a question regarding what is reported
via MRTG as the speed of a device.
The OS is Redhat 7.2 YES, I know it is old and would love to upgrade
the OS but at this time I cannot.
The original version of SNMP that was running was
/usr/bin/snmpwalk -V
UCD-snmp version: 4.2.1
The walk shows the speed of the device as being 10MB not 1000MB which
is what it should be as we have 6 Intel Pro E1000 eth ports in the
server.

[***@csqalab95 /]# /usr/bin/snmpwalk -v 1 -c Mycommunity localhost
interface |grep -i speed
interfaces.ifTable.ifEntry.ifSpeed.1 = Gauge32: 10000000
interfaces.ifTable.ifEntry.ifSpeed.2 = Gauge32: 10000000
interfaces.ifTable.ifEntry.ifSpeed.3 = Gauge32: 10000000
interfaces.ifTable.ifEntry.ifSpeed.4 = Gauge32: 10000000
interfaces.ifTable.ifEntry.ifSpeed.5 = Gauge32: 10000000
interfaces.ifTable.ifEntry.ifSpeed.6 = Gauge32: 10000000
interfaces.ifTable.ifEntry.ifSpeed.7 = Gauge32: 10000000

Not knowing for sure what to modify, I decided to try a newer version
of net-snmp
I have downloaded and compiled version 5.3.1

/usr/local/bin/snmpwalk -V
NET-SNMP version: 5.3.1
/usr/local/bin/snmpwalk -v 1 -c Mycommunity localhost interface |grep -i speed
IF-MIB::ifSpeed.1 = Gauge32: 10000000
IF-MIB::ifSpeed.2 = Gauge32: 10000000
IF-MIB::ifSpeed.3 = Gauge32: 10000000
IF-MIB::ifSpeed.4 = Gauge32: 10000000
IF-MIB::ifSpeed.5 = Gauge32: 10000000
IF-MIB::ifSpeed.6 = Gauge32: 10000000
IF-MIB::ifSpeed.7 = Gauge32: 10000000

The device still reports that the speed is 10000000 instead of 1000000000

at this point I wanted to see if the older version reported speeds
correctly for another server I built up with 2 ethernet cards. one
with a 100MB and one with a 1000 MB card.
I ran the following and true to form the snmp version that came with
rh7.2 reported the values correctly as did the newer version 5.3.1
V 4.2.1
[root /]# /usr/bin/snmpwalk -v 1 -c Mycommunity2 server2 interface
|grep -i speed
interfaces.ifTable.ifEntry.ifSpeed.1 = Gauge32: 10000000
interfaces.ifTable.ifEntry.ifSpeed.2 = Gauge32: 1000000000
interfaces.ifTable.ifEntry.ifSpeed.3 = Gauge32: 100000000
V 5.3.1
[root /]# /usr/local/bin/snmpwalk -v 1 -c Mycommunity2 server2
interface |grep -i speed
IF-MIB::ifSpeed.1 = Gauge32: 10000000
IF-MIB::ifSpeed.2 = Gauge32: 1000000000
IF-MIB::ifSpeed.3 = Gauge32: 100000000

Can anyone point me in the right direction to modify the server to
report the correct speeds of the ethernet cards ?

I know if I upgrade the OS on the Server that will do it, BUT as I
said before that is not an option I can use at this time.

Are there any changes I can make that would allow the snmpwalk / MRTG
to report the correct speeds of the device ?

I appreciate your time and look forward to your responses.
--
With regards,

RobertMCol
Dave Shield
2007-05-09 15:39:42 UTC
Permalink
Post by Robert M
Can anyone point me in the right direction to modify the server to
report the correct speeds of the ethernet cards ?
Quick 'n dirty fix.
See FAQ entry:
The speed/type of my network interfaces is wrong - how can I fix it?
http://www.net-snmp.org/wiki/index.php/FAQ:Agent_35

If you want to fix this "properly", then have a look at the routine
netsnmp_linux_interface_get_if_speed()
(in if-mib/data_access/interface_linux.c)

and try a simple test program using the relevant ioctl calls.
But the snmpd.conf file is the easiest way to have the agent return the
correct information.

Dave
Robert M
2007-05-09 17:12:52 UTC
Permalink
Thank you Dave, That worked out great,
I added the following to snmpd.conf
interface eth0 6 1000000000
interface eth1 6 1000000000
interface eth2 6 1000000000
interface eth3 6 1000000000
interface eth4 6 1000000000
interface eth5 6 1000000000

Have a great day.
Post by Dave Shield
Post by Robert M
Can anyone point me in the right direction to modify the server to
report the correct speeds of the ethernet cards ?
Quick 'n dirty fix.
The speed/type of my network interfaces is wrong - how can I fix it?
http://www.net-snmp.org/wiki/index.php/FAQ:Agent_35
If you want to fix this "properly", then have a look at the routine
netsnmp_linux_interface_get_if_speed()
(in if-mib/data_access/interface_linux.c)
and try a simple test program using the relevant ioctl calls.
But the snmpd.conf file is the easiest way to have the agent return the
correct information.
Dave
--
With regards,

RobertMCol
Loading...