Still reeling under the cold…..BERRRR…..
As already explained the last five bits in case of the BER identifier are used to denote the numeric tag of the object. Since we can use only five bits the maximum data-types that can be represented directly is 30. However this limit provides a very safe margin in BER implementation of SNMP. This is because we do not expect (in the near future) SNMP will be using more than 30 datatypes. If it does so, SNMP may not remain simple and may sink under its own weight.
Given below is a list of BER identifiers for ASN.1 implementation of SNMP.
|Primitive ASN.1 Types||Identifier in hex|
|Constructed ASN.1 type||Identifier in hex|
|Primitive SNMP application types||Identifier in hex|
|Counter (Counter32 in SNMPv2)||41|
|Gauge (Gauge32 in SNMPv 2)||42|
|Counter64 (available only in SNMPv2)||46|
|Uinteger32 (available only in SNMPv2)||47|
|Context-specific types within an SNMP Message||Identifier in hex|
|GetResponse-PDU (Response-PDU in SNMPv 2)||A2|
|Trap-PDU (obsolete in SNMPv 2)||A4|
|GetBulkRequest-PDU (added in SNMPv 2)||A5|
|InformRequest-PDU (added in SNMPv 2)||A6|
|SNMPv2-Trap-PDU (added in SNMPv 2)||A7|
Using the identifier value we can easily communicate with the SNMP agent and easily generate the response we require ASN.1 and BER has thus alleviated the bad (and sad) working conditions of the network administrators the world over. Now let us attempt to write a few programs that will actually simulate a the manager querying an agent. To know more about these program keeps reading or better keep clicking.
The above tutorial is a joint effort of
Mr. Vijay Mukhi
Ms. Sonal Kotecha
Mr. Arsalan Zaidi
Mr. Vinesh Kurup
(This blog appeared in Vijay Mukhi Technology Cornucopia website in 1996)