Operating System - Linux
1833758 Members
2682 Online
110063 Solutions
New Discussion

RHAS 3 Update 1 on DL380 SNMP interface query issue

 
Todd Knauer
Occasional Advisor

RHAS 3 Update 1 on DL380 SNMP interface query issue

I just rebuilt a quad proc DL380 with RHAS 3 Update 1 (was previously running RHAS 2.1). We have 4 NICs on this machine, eth0 and eth1 are the onboard NC7781 Gigabit ports using the tg3 module. eth2 and eth3 show up as Intel Ethernet Pro 100s and they are using the e100 module. I am currently only using eth2 and eth3. eth0 and eth1 are not even plugged in or brought up.

The problem is when I query them via SNMP. If I snmpwalk them to get the indexes, interface descriptions, and MAC addresses I get the correct information:

Indexs:
$ snmpwalk -v 1 -c public myserver .1.3.6.1.2.1.2.2.1.1
iso.3.6.1.2.1.2.2.1.1.1 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.1.2 = INTEGER: 2
iso.3.6.1.2.1.2.2.1.1.3 = INTEGER: 3
iso.3.6.1.2.1.2.2.1.1.4 = INTEGER: 4
iso.3.6.1.2.1.2.2.1.1.5 = INTEGER: 5

Descriptions:
$ snmpwalk -v 1 -c public myserver .1.3.6.1.2.1.2.2.1.2
iso.3.6.1.2.1.2.2.1.2.1 = STRING: "lo"
iso.3.6.1.2.1.2.2.1.2.2 = STRING: "eth0"
iso.3.6.1.2.1.2.2.1.2.3 = STRING: "eth1"
iso.3.6.1.2.1.2.2.1.2.4 = STRING: "eth2"
iso.3.6.1.2.1.2.2.1.2.5 = STRING: "eth3"

MAC Addresses:
$ snmpwalk -v 1 -c public myserver .1.3.6.1.2.1.2.2.1.6
iso.3.6.1.2.1.2.2.1.6.1 = ""
iso.3.6.1.2.1.2.2.1.6.2 = Hex-STRING: 00 0B CD 69 48 6B
iso.3.6.1.2.1.2.2.1.6.3 = Hex-STRING: 00 0B CD 69 48 6A
iso.3.6.1.2.1.2.2.1.6.4 = Hex-STRING: 00 0B CD 4B 10 9E
iso.3.6.1.2.1.2.2.1.6.5 = Hex-STRING: 00 0B CD 4B 10 9F

But when I query for the IP addresses associated with those interfaces I get this:

IP Addresses:
$ snmpwalk -v 1 -c public myserver .1.3.6.1.2.1.4.20.1.2
iso.3.6.1.2.1.4.20.1.2.10.10.0.1 = INTEGER: 11
iso.3.6.1.2.1.4.20.1.2.10.10.1.1 = INTEGER: 10
iso.3.6.1.2.1.4.20.1.2.127.0.0.1 = INTEGER: 1


Now, in the above IP Address list the INTEGER that is returned should be the index of the interface that the IP address is assocated with. The 127.0.0.1 address does indeed match the lo interface which is index 1, but there is no interface at index 10 and index 11. The 10.10.0.1 address should show up as index 5 and the 10.10.1.1 address should show up as index 4. Any program that queries this server for this information will not be able to match the IP address to an interface. Simple examples of programs that will not get the correct IP address for the interfaces that are up would be (but not limited to) MRTG's cfgmaker script, or cacti snmp server graphing. In my case it is a home brew (work brew) web application.

I don't have a problem with any other server but I don't have RHAS3UD1 on any other server. Does anyone else have this problem and better yet, does anyone know of a solution to this problem? Or should I file this as a bug report to Red Hat?

Thanks!
6 REPLIES 6
Don_89
Trusted Contributor

Re: RHAS 3 Update 1 on DL380 SNMP interface query issue

I have implementing (battling) MRTG over the past two weeks so I did a snmpwalk -v 1 -c public myserver.1.3.6.1.2.1.4.20.1.2 on all my servers and they came back fine but I'm only using 1 or two NICS in each one. Even the one ES 3.0 server we have came back ok but that doesn't help you...

Couple of sugguestions..

1) Uninstall the net-snmp-5.0.x package and install the ucd-snmp-4.2.x package from a AS 2.1 server..

2)You could write a script and have the proper value returned for a SNMP trap. I have done this for MRTG to return the used/total swap space on a server.

In my snmpd.conf file, i have

exec 1.3.6.1.4.1.500.101 swap /opt/misc/swap

my /opt/misc/swap script looks like this

#!/bin/sh
stat1=`cat /proc/meminfo | grep SwapTotal: | cut -c16-22`
stat2=`cat /proc/meminfo | grep SwapFree: | cut -c16-22`
echo $stat1
echo $stat2


In my mrtg.cfg file, the target looks like this.
Target[memory-dt3whdevcvs]: 1.3.6.1.4.1.5000.100.101.1&1.3.6.1.4.1.5000.100.101.2:Tr3cV6S8ioLP1@servername

Your script would be something like

cat /opt/sysconfig/network-scripts/ifcfg-eth0 | grep IPADDR | cut -c8-20


hope this helps..
Todd Knauer
Occasional Advisor

Re: RHAS 3 Update 1 on DL380 SNMP interface query issue

Thanks Don. I might try suggestion #1, and probably should have done that already. I have actually just now found a bug on Red Hat's web site that matches my problem and I have attached my post on Red Hat's bugzilla:

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=114413

I'll let you know if downgrading the snmp fixes the problem. On another note, my Fedora Core 1 PC at home exhibits similar problems. It has a couple of non-standard interfaces like a VMware interface and an IR interface and it seems to screw up the indexing in a similar way. So now I am fairly confident that it is an snmpd issue.
Bill Wood_3
Respected Contributor

Re: RHAS 3 Update 1 on DL380 SNMP interface query issue

Please try our version of the SNMP stack. Let me know if you still have issues and I will look into it. You can download the packages from the following:

http://h18023.www1.hp.com/support/files/server/us/download/19125.html
Todd Knauer
Occasional Advisor

Re: RHAS 3 Update 1 on DL380 SNMP interface query issue

Yes sir, that one works as advertised (the HP version). I'll let Red Hat know in the bug report that you have a working copy (although it's not net-snmp v5 that comes with RHAS3).

Thanks for the quick resolution!
Todd Knauer
Occasional Advisor

Re: RHAS 3 Update 1 on DL380 SNMP interface query issue

I take that back. There is still a problem. The interface names are showing up as eth0 and eth0 and they should show up as eth2 and eth3:

$ snmpwalk -v 1 -c public myserver .1.3.6.1.2.1.2.2.1.1
iso.3.6.1.2.1.2.2.1.1.1 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.1.2 = INTEGER: 2
iso.3.6.1.2.1.2.2.1.1.3 = INTEGER: 3

$ snmpwalk -v 1 -c public myserver .1.3.6.1.2.1.2.2.1.2
iso.3.6.1.2.1.2.2.1.2.1 = STRING: "lo"
iso.3.6.1.2.1.2.2.1.2.2 = STRING: "eth0"
iso.3.6.1.2.1.2.2.1.2.3 = STRING: "eth1"

$ snmpwalk -v 1 -c public myserver .1.3.6.1.2.1.2.2.1.6
iso.3.6.1.2.1.2.2.1.6.1 = ""
iso.3.6.1.2.1.2.2.1.6.2 = Hex-STRING: 00 0B CD 1B 4B 9A
iso.3.6.1.2.1.2.2.1.6.3 = Hex-STRING: 00 0B CD 1B 4D 12

$ snmpwalk -v 1 -c public myserver .1.3.6.1.2.1.4.20.1.2
iso.3.6.1.2.1.4.20.1.2.10.10.249.195 = INTEGER: 3
iso.3.6.1.2.1.4.20.1.2.10.10.250.195 = INTEGER: 2
iso.3.6.1.2.1.4.20.1.2.127.0.0.1 = INTEGER: 1

# /sbin/ifconfig
eth2 Link encap:Ethernet HWaddr 00:0B:CD:4B:10:9E
inet addr:10.49.191.2 Bcast:10.49.191.127 Mask:255.255.255.128
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:133703 errors:0 dropped:0 overruns:0 frame:0
TX packets:10324 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:15673868 (14.9 Mb) TX bytes:2229744 (2.1 Mb)
Interrupt:11 Base address:0x4000 Memory:f7ff0000-f7ff0038

eth3 Link encap:Ethernet HWaddr 00:0B:CD:4B:10:9F
inet addr:10.10.249.182 Bcast:10.10.249.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:17612 errors:0 dropped:0 overruns:0 frame:0
TX packets:18 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1018615 (994.7 Kb) TX bytes:756 (756.0 b)
Interrupt:7 Base address:0x4040 Memory:f7df0000-f7df0038

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:41081 errors:0 dropped:0 overruns:0 frame:0
TX packets:41081 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:33000035 (31.4 Mb) TX bytes:33000035 (31.4 Mb)


But it's closer. Sorry about missing that!
Todd Knauer
Occasional Advisor

Re: RHAS 3 Update 1 on DL380 SNMP interface query issue

I am truly an idiot. The HP version does *indeed* work just fine as I initially indicated. I realize now that I accidentally checked a different server when I posted the previous message. I am really sorry for the confusion if I didn't post this before you reading the last two posts.

Thanks for the help!