BER SNMP


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 TypesIdentifier in hex
INTEGER02
BIT STRING03
OCTET STRING04
NULL05
OBJECT IDENTIFIER06

Constructed ASN.1 typeIdentifier in hex
SEQUENCE30

Primitive SNMP application typesIdentifier in hex
IpAddress40
Counter (Counter32 in SNMPv2)41
Gauge (Gauge32 in SNMPv 2)42
TimeTicks43
Opaque44
NsapAddress45
Counter64 (available only in SNMPv2)46
Uinteger32 (available only in SNMPv2)47

Context-specific types within an SNMP MessageIdentifier in hex
GetRequest-PDUA0
GetNextRequestPUDA1
GetResponse-PDU (Response-PDU in SNMPv 2)A2
SetRequest-PDUA3
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


Back to the main page


Vijay Mukhi's Computer Institute
VMCI, B-13, Everest Building, Tardeo, Mumbai 400 034, India
Tel : 91-22-496 4335 /6/7/8/9     Fax : 91-22-307 28 59
e-mail : vmukhi@giasbm01.vsnl.net.in
http://www.vijaymukhi.com