Bug 156689 - ifIndex and ipAdEntIfIndex do not match
ifIndex and ipAdEntIfIndex do not match
Status: CLOSED CANTFIX
Product: Fedora
Classification: Fedora
Component: net-snmp (Show other bugs)
3
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jan Safranek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-05-03 08:36 EDT by Mathieu Chouquet-Stringer
Modified: 2007-11-30 17:11 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-06-27 04:45:24 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Mathieu Chouquet-Stringer 2005-05-03 08:36:06 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.7) Gecko/20050417 Galeon/1.3.20

Description of problem:
I've been using cacti (http://www.cacti.net) to graph the network traffic on my computers (amongst other things). 

One one of them, I couldn't get the right IPs assigned to the right interface.

Here's what I was seeing:

snmpwalk -v 2c -c public localhost ifdescr
IF-MIB::ifDescr.1 = STRING: lo
IF-MIB::ifDescr.2 = STRING: teql0
IF-MIB::ifDescr.3 = STRING: gre0
IF-MIB::ifDescr.4 = STRING: sit0
IF-MIB::ifDescr.5 = STRING: eth0
IF-MIB::ifDescr.6 = STRING: eth1
IF-MIB::ifDescr.7 = STRING: eth2

snmpwalk -v 2c -c public localhost ipadentifindex
IP-MIB::ipAdEntIfIndex.10.0.0.1 = INTEGER: 7
IP-MIB::ipAdEntIfIndex.10.0.0.254 = INTEGER: 7
IP-MIB::ipAdEntIfIndex.10.0.1.1 = INTEGER: 8
IP-MIB::ipAdEntIfIndex.10.0.1.254 = INTEGER: 8
IP-MIB::ipAdEntIfIndex.1.2.3.4 = INTEGER: 6
IP-MIB::ipAdEntIfIndex.127.0.0.1 = INTEGER: 1

In this example note there are no interface whose index is 8, moreover 1.2.3.4 is really interface 5. Interface Index 7 should be 6 and 8 -> 7.

I went through the net-snmp mailing list and people there suggested to recompile net-snmp with the following option: --enable-mfd-rewrites

I just recreated the RPMs and now I get the following:

snmpwalk -v 2c -c public localhost ifdescr
IF-MIB::ifDescr.1 = STRING: lo
IF-MIB::ifDescr.2 = STRING: teql0
IF-MIB::ifDescr.3 = STRING: gre0
IF-MIB::ifDescr.4 = STRING: sit0
IF-MIB::ifDescr.5 = STRING: ip6tnl0
IF-MIB::ifDescr.6 = STRING: eth0
IF-MIB::ifDescr.7 = STRING: eth1
IF-MIB::ifDescr.8 = STRING: eth2

snmpwalk -v 2c -c public localhost ipadentifindex
IP-MIB::ipAdEntIfIndex.10.0.0.1 = INTEGER: 7
IP-MIB::ipAdEntIfIndex.10.0.0.254 = INTEGER: 7
IP-MIB::ipAdEntIfIndex.10.0.1.1 = INTEGER: 8
IP-MIB::ipAdEntIfIndex.10.0.1.254 = INTEGER: 8
IP-MIB::ipAdEntIfIndex.1.2.3.4 = INTEGER: 6
IP-MIB::ipAdEntIfIndex.127.0.0.1 = INTEGER: 1



Version-Release number of selected component (if applicable):
5.2.1-10.FC3

How reproducible:
Always

Steps to Reproduce:
I guess this problem is due to the number of network interfaces I have on this machine as I couldn't reproduce it on some other computers running FC3 I have.

Additional info:
Comment 1 Radek Vokal 2005-05-04 07:46:27 EDT
There're known problems with interfaces numbering, there's also really strange
numbering when some virtual interfaces are created. I didn't get from your
report if this was working correctly with older net-snmp or if this is already
broken for some time? 
Comment 2 Mathieu Chouquet-Stringer 2005-05-04 08:43:12 EDT
Can't tell you as I've never really used SNMP before using Cacti. I'll be
installing the original net-snmp package shipped with FC3 and will let you know
how it works out.
Comment 3 Mathieu Chouquet-Stringer 2005-05-06 12:51:26 EDT
Here you go using:
net-snmp-perl-5.1.2-11
net-snmp-5.1.2-11
net-snmp-libs-5.1.2-11
net-snmp-utils-5.1.2-11
net-snmp-devel-5.1.2-11

snmpwalk -v 2c -c public localhost ifdescr
IF-MIB::ifDescr.1 = STRING: lo
IF-MIB::ifDescr.2 = STRING: teql0
IF-MIB::ifDescr.3 = STRING: gre0
IF-MIB::ifDescr.4 = STRING: sit0
IF-MIB::ifDescr.5 = STRING: eth0
IF-MIB::ifDescr.6 = STRING: eth1
IF-MIB::ifDescr.7 = STRING: eth2

snmpwalk -v 2c -c public localhost ipadentifindex
IP-MIB::ipAdEntIfIndex.10.0.0.1 = INTEGER: 6
IP-MIB::ipAdEntIfIndex.10.0.1.1 = INTEGER: 7
IP-MIB::ipAdEntIfIndex.1.2.3.4 = INTEGER: 5
IP-MIB::ipAdEntIfIndex.127.0.0.1 = INTEGER: 1

So yes with the version shipped with FC3 it appears to work as expected.

Let me know if you need anything else.
Comment 4 Pierre Ossman 2005-06-03 17:45:08 EDT
This seems to be bug 119106 that has resurfaced. For some reason that patch has
been removed from the spec:

#kills virtual interfaces
#Patch10: net-snmp-5.1.1-ipAdEntIfIndex.patch

There is no comment in the changelog explaining why the patch was removed.

I tried applying it to 5.2.1-10.FC3 and it made the problem go away here.
Comment 5 Radek Vokal 2005-06-06 01:50:51 EDT
Well, the explanation is in the comment above the patch. This patch kills all
virtual interfaces, so they're not shown in the list of interfaces. The problem
with ipAdEntIndex is that it indexes also the virtual interfaces, which it
actually should not. I'm trying to rework this patch, so far unsuccessfuly. 
Comment 6 Matthew Miller 2006-07-10 17:12:35 EDT
Fedora Core 3 is now maintained by the Fedora Legacy project for security
updates only. If this problem is a security issue, please reopen and
reassign to the Fedora Legacy product. If it is not a security issue and
hasn't been resolved in the current FC5 updates or in the FC6 test
release, reopen and change the version to match.

Thank you!
Comment 7 Jan Safranek 2007-06-27 04:45:24 EDT
Closing as it is not security bug. Feel free to reopen the bug if you are able
to reproduce it on Fedora Core 6 or Fedora 7.

Note You need to log in before you can comment on or make changes to this bug.