This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: Re: SNMP lockup
On Sat, May 09, 2009 at 08:48:12AM +0000, Grant Edwards wrote:
[snip]
> What I'd like a pointer on is the interface numbering in SNMP
> OIDs. Are the interfaces supposed to be numbered 1..N with
> interface 0 being non-existent? Or are eCos interface numbers
> off by one and they should really be 0,1 instead of 1,2? [I
> tried looking through the OID/ASN.1 docs, but got lost rather
> quickly.]
>
> If SNMP interface numbers are supposed to start at #1, why do
> HP and Cisco SNMP managers ask for attributes of interface #0?
>
Not only those Network managers... Any hacker can hang a "stupid"
device then
I tried it on my ADSL modem
snmpwalk -c public -v1 bridge.local IF-MIB::ifPhysAddress.0
IF-MIB::ifPhysAddress.0: Unknown Object Identifier (Index out of range: 0 (ifIndex))
But it still ping itself :-)
> I looked at network traces for one customer site using, I
> believe, HP Insight. It does read the interface attributes for
> interfaces 1 and 2. I don't see it attempt to read attributes
> for interface 3 (which doesn't exist). I do see it attempt to
> read attributes for interface 0 (which also doesn't exist).
>
> If interface numbers are supposed to start at #0, will
> renumbering the interfaces at this point (after product has
> been shipping for 7 years) cause more problems that it will
> solve?
That's known SNMP "issue"
-- âgetâ might want that the OID ends in .0
Example:
snmpget -c public -O X -v2c bridge.local sysDescr
SNMPv2-MIB::sysDescr = No Such Instance currently exists at this OID
snmpget -c public -O X -v2c bridge.local sysDescr.0
SNMPv2-MIB::sysDescr.0 = STRING: Foo bar baz
So, IMHO, it's better to fix the agent than to make managers work
"properly".
Sergei
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss