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 Types Identifier in hex
INTEGER 02
BIT STRING 03
OCTET STRING 04
NULL 05
OBJECT IDENTIFIER 06
Constructed ASN.1 type Identifier in hex
SEQUENCE 30
Primitive SNMP application types Identifier in hex
IpAddress 40
Counter (Counter32 in SNMPv2) 41
Gauge (Gauge32 in SNMPv 2) 42
TimeTicks 43
Opaque 44
NsapAddress 45
Counter64 (available only in SNMPv2) 46
Uinteger32 (available only in SNMPv2) 47
Context-specific types within an SNMP Message Identifier in hex
GetRequest-PDU A0
GetNextRequestPUD A1
GetResponse-PDU (Response-PDU in SNMPv 2) A2
SetRequest-PDU A3
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)

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s