The ifindex reported indices and the ipAdEntIfIndex reported indices do not match. By definition:
From RFC 2011:
"The index value which uniquely identifies the interface to which this entry is applicable. The interface identified by a particular value of this index is the same interface as identified by the same value of RFC 1573's ifIndex."
From RFC 1573:
"A unique value, greater than zero, for each interface. It is recommended that values are assigned contiguously starting from 1. The value for each interface sub-layer must remain constant at least from one re-initialization of the entity's network management system to the next re-initialization."
From these definitions it would seem that ipAdEntIfIndex and ifIndex indices should match up. However they do not. This might case issues for customers to monitor configured interfaces for up/down status.
The ipAdEntIfIndex indeed reports a wrong value.
However, it is marked "deprecated" in the IP-MIB, as all the other members of the ipAddrTable.
The correct one to use is ipAddressIfIndex of the ipAddressTable (which has the status "current") of the same MIB. We tested it, and the results reported were consistent and correct:
For a SG configured with ip address of 10.78.3.20 on the 1:0 interface, we get the following:
host:~$ snmpbulkwalk -v2c -Os -c public 10.78.3.20 ifindex
ifIndex.1 = INTEGER: 1
ifIndex.2 = INTEGER: 2
ifIndex.3 = INTEGER: 3
ifIndex.4 = INTEGER: 4 <<<<<<<<<<<
host:~$ snmpbulkwalk -v2c -Os -c public 10.78.3.20 ifdescr
ifDescr.1 = STRING: loopback
ifDescr.2 = STRING: 0:0
ifDescr.3 = STRING: 1:1
ifDescr.4 = STRING: 1:0 <<<<<<<<<<<
host:~$ snmpbulkwalk -v2c -Os -c public 10.78.3.20 ipaddressifindex
ipAddressIfIndex.ipv4."10.78.3.20" = INTEGER: 4 <<<<<<<<<<<Correct Index