Bug 142726 - IP Aliases are not available/visible from SNMP.
Summary: IP Aliases are not available/visible from SNMP.
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: net-snmp
Version: 3.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jan Safranek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-12-13 13:19 UTC by Mustafa Mahudhawala
Modified: 2010-05-06 12:12 UTC (History)
2 users (show)

Fixed In Version: net-snmp-5.3.2.2-9.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-05-06 12:12:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Mustafa Mahudhawala 2004-12-13 13:19:37 UTC
Description of problem:

snmpwalk does not display the IP Aliases in the ipAdEntAddr node of
IP-MIB.

Version-Release number of selected component (if applicable):

Tried with following net-snmp versions:

net-snmp-5.0.9-2.30E.6 (from RHEL U3)
net-snmp-5.0.9-2.30E.12 (from RHEL U4 latest)

How reproducible: Always

Steps to Reproduce:

A. Create IP Aliases,
I tried using both options, i.e. create a ifcfg-eth:1 file in
/etc/sysconfig/network-scripts/ 

# cat /etc/sysconfig/network-scripts/ifcfg-eth0:1
# Intel Corp.|82540EM Gigabit Ethernet Controller
DEVICE=eth0:1
BOOTPROTO=static
ONBOOT=yes
IPADDR=10.0.0.5
NETMASK=255.255.255.0

and using "ip" command as follows ..

ip addr add 10.0.0.6/32 dev eth0

# ip a l
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
3: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:0f:1f:85:99:de brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.2/24 brd 10.0.0.255 scope global eth0
    inet 10.0.0.6/32 scope global eth0
    inet 10.0.0.5/24 brd 10.0.0.255 scope global secondary eth0:1

B. Temporarily Enable Read Access to entire MIB tree for community
"public" by just setting ..

view    systemview    included   .1
In /etc/snmp/snmpd.conf, and then restart snmpd

C. Check using snmpwalk
  
Actual results:

# snmpwalk -v 2c -c public localhost ipaddr
IP-MIB::ipAdEntAddr.127.0.0.1 = IpAddress: 127.0.0.1
IP-MIB::ipAdEntAddr.10.0.0.2 = IpAddress: 10.0.0.2
IP-MIB::ipAdEntIfIndex.127.0.0.1 = INTEGER: 1
IP-MIB::ipAdEntIfIndex.10.0.0.2 = INTEGER: 2
IP-MIB::ipAdEntNetMask.127.0.0.1 = IpAddress: 255.0.0.0
IP-MIB::ipAdEntNetMask.10.0.0.2 = IpAddress: 255.255.255.0
IP-MIB::ipAdEntBcastAddr.127.0.0.1 = INTEGER: 1
IP-MIB::ipAdEntBcastAddr.10.0.0.2 = INTEGER: 1

Expected results:

It should also list the Aliased IP Addresses i.e.
10.0.0.5 & 10.0.0.6

I have also queried for the entire IP MIB tree using,
# snmpwalk -v 2c -c public localhost ip

But the Aliased (virtual) IP are not listed anywhere.

Comment 4 Jason Vas Dias 2005-03-24 20:09:40 UTC
The behaviour of net-snmp-5.0.9-2.30E.3.i386.rpm in creating
ipAdEntIfIndex oids for secondary interface addresses was an
aberration in this release only; there was a bug in the way
it determined the interfaces list which has now been fixed.

Up to and including RHEL-3 GA's initial net-snmp version, 5.0.8-11, 
no ipAdEntIfIndex oids were created for secondary interface addresses;
this is correct, because they are not real interface entries.

Then ONLY with release net-snmp-5.0.9-2.30E.3.i386.rpm, there appeared
the bug that secondary interface addresses wrongly had ipAdEntIfIndex oids
created for them .

All previous and subsequent net-snmp releases 
(net-snmp-5.0.9-2.30E.15 in RHEL-3 U5, net-snmp-5.1.2-11 in RHEL-4 GA, 
and even the latest net-snmp-5.2.1-5 in Fedora Core 4) do NOT create ANY
ifAdEnt* oids for secondary interface addresses, which is correct behaviour.

No linux kernel has ever maintained separate interface statistics for
secondary interface addresses, or "interface aliases". 

You can determine the correct interface index for a secondary address by
examining the RFC1213-MIB::ipRouteIfIndex.${ADDRESS}, where ${ADDRESS} 
is the NETWORK portion of the secondary address with its netmask, ie.
14.144.0 in your case.

Now, it would not be too much work to produce an extension to net-snmp, 
say an 'IFALIAS-MIB' mib, that did report address, netmask and ifindex
data for each interface alias, and which could be shipped separately from
net-snmp, as a new 'redhat-ifalias-mib' package, which I'd be happy to
undertake. 

But as the upstream net-snmp must comply with the RFCs, it does
not and should not create ifAdEnt* oids for secondary interface addresses.


  



Comment 8 Matt Dainty 2006-06-01 14:49:21 UTC
Hmm, I've just stumbled into this bug, and I'm not sure I agree with the
solution. I can't see any reason why the extra aliased addresses shouldn't each
have an entry in ipAddrTable, with a many-to-one relationship to the correct
entry in ifTable. After all, ifTable maintains the interface statistics, not
ipAddrTable.

The solution presented is of no use to me, as I have a pair of servers that have
a virtual IP shared between them, one or the other owns the IP at any time, so
I'd like to see which is the master by looking at which one has that IP. That
should be a simple case of walking the ipAddrTable, but as far as SNMP is
concerned, that IP doesn't exist anywhere in the tree.

I've found posts dating back to ~ 2002 from people who asked if/why aliases
don't appear, with net-snmp developers stating it's considered a bug if they
aren't shown.

Comment 9 Jan Safranek 2010-05-06 12:12:10 UTC
Closing the stalled bug, RHEL3 is open only for critical and security bugs. Please use RHEL5, IP-MIB hasbeed rewritten there and I have just checked interface aliases are shown in IP-MIB::ipAddrTable and IP-MIB::ipAddressTable.


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