Re: OIDS
"Dave Shield" <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
On 25/07/06, Jonathan Shan <[email protected]> wrote: > Why do I need to append a "0" to the end of some OIDs? > Sometimes the "0" doesn't work and a 1 is needed. Every management value is an "instance" of the abstract MIB object. Some objects only ever have one instance - these are known as scalar objects. Other objects can have several instances - structured in the form of a table. With table-based objects, you clearly need some way to distinguish between the various instances of that object. This uses the "instance subidentifier" which is appended to the OID of the object itself. Sometimes this is a simple integer, such as the ifTable. Sometimes it's a string, or an IP address, or some other more complicated form of instance indexing. Try "snmpwalk .... tcpConnTable" - that uses two IP addresses and two integers to index the table. With scalar objects, there's only one possible value, so an instance subidentifier isn't strictly necessary. But to keep things in line with table OIDs (where you have to add an index to the base OID), the same approach is used for scalars as well. You always have to add the "scalar instance subidentifer" to the MIB OID, which is this 0. OK? Dave ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Net-snmp-users mailing list [email protected] Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users