{"id":1548,"date":"2011-02-23T00:32:06","date_gmt":"2011-02-22T19:02:06","guid":{"rendered":"http:\/\/JitendraZaa.com\/blog\/?p=1548"},"modified":"2011-02-23T00:32:06","modified_gmt":"2011-02-22T19:02:06","slug":"introduction-to-snmp","status":"publish","type":"post","link":"https:\/\/www.jitendrazaa.com\/blog\/java\/snmp\/introduction-to-snmp\/","title":{"rendered":"Introduction to SNMP"},"content":{"rendered":"<p>SNMP stands for <strong><a title=\"Good Introduction to SNMP\" href=\"http:\/\/en.wikipedia.org\/wiki\/Simple_Network_Management_Protocol\" target=\"_blank\">Simple Network Management Protocol<\/a><\/strong> &#8211; and is one of the most widely spread internet management protocols. It is based on UDP and uses <strong><a title=\"Basic Encoding Rules\" href=\"http:\/\/en.wikipedia.org\/wiki\/Basic_encoding_rules\" target=\"_blank\">BER (Basic Encoding Rules)<\/a><\/strong> for encoding.<\/p>\n<p>SNMP is an internet technology &#8211; specified by means of <a title=\"Request for Comments\" href=\"http:\/\/en.wikipedia.org\/wiki\/Request_For_Comments\" target=\"_blank\">RFCs (Requests For Comments)<\/a>, which are issued through the <a title=\"The Internet Engineering Task Force (IETF)\" href=\"http:\/\/www.ietf.org\/\" target=\"_blank\">Internet Engineering Task Force (IETF)<\/a>.<\/p>\n<p>SNMP defines both how to structure management information (data model exposed for management), and how to access it (protocol). According to SNMP, the management information is structured into <strong>MIBs (Management Information Bases)<\/strong>. A MIB is defined using a formal language called <strong>Structure of Management Information (SMI)<\/strong> &#8211; whose syntax uses a subset of <a title=\"Abstract Syntax Notation One\" href=\"http:\/\/en.wikipedia.org\/wiki\/ASN.1\" target=\"_blank\"><strong>ASN.1 (Abstract Syntax Notation 1)<\/strong>.<\/a><!--more--><\/p>\n<p>When dealing with remote devices, there should be some standard to understand the information stored in the SNMP agent. SNMP accomplishes that through MIB.<\/p>\n<p>The basic verbs of the SNMP protocol are <strong>GET<\/strong>, <strong>SET<\/strong>, and <strong>GETNEXT <\/strong>(SNMPv2 adds GETBULK). An SNMP entity can also send asynchronous events (a <strong>TRAP <\/strong>in SNMPv1, a <strong>NOTIFICATION <\/strong>or an <strong>INFORM <\/strong>in SNMPv2). What you GET and SET are individual variables of simple types (to simplify, strings\/integers\/enumerations) which can be either scalar &#8211; or located in tables.<\/p>\n<p><strong>OBJECT-IDENTIFIERS<\/strong> are at the root of the Structure of Management Information (SMI) used to describe SNMP data.<br \/>\nTo make it brief, an OBJECT-IDENTIFIER or OID identifies a node in a global tree whose arcs (segments between parent and child nodes) are identified by numbers.<\/p>\n<p>All SNMP definitions &#8211; MIBs, objects, etc&#8230; are identified by their OID in this global tree. The root of the OID tree is defined by the ASN.1 standard, and has three nodes at its first level <strong>iso, ccitt<\/strong> and <strong>joint-iso-ccitt<\/strong>.<\/p>\n<p><strong><a href=\"http:\/\/en.wikipedia.org\/wiki\/Internet_Assigned_Numbers_Authority\" target=\"_blank\">The IANA (Internet Assigned Numbers Authority)<\/a><\/strong> is responsible for the allocation of these subnodes. And the subnode owned by <strong>Sun Microsystems is forty two<\/strong>, leading to the OID:<\/p>\n<blockquote><p>sun OBJECT IDENTIFIER ::=\u00a0{ iso(1) org(3) dod(6) internet(1) private(4) enterprises(1) 42 }<\/p><\/blockquote>\n<p>Usually, such an OID would be written &#8211; in what we call the dot notation, as:\u00a0<strong>.3.6.1.4.1.42<\/strong><\/p>\n<p>In fact, Sun Microsystems is responsible for the allocation of any node that falls under the branch:<\/p>\n<blockquote><p>sun OBJECT IDENTIFIER ::=\u00a0{ iso(1) org(3) dod(6) internet(1) private(4) enterprises(1) 42 }<\/p><\/blockquote>\n<p>Example of MIB:<\/p>\n<figure id=\"attachment_1552\" aria-describedby=\"caption-attachment-1552\" style=\"width: 454px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2011\/02\/Structure-of-MIB-SNMP.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1552\" title=\"Structure of MIB SNMP\" src=\"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2011\/02\/Structure-of-MIB-SNMP.jpg?resize=454%2C487&#038;ssl=1\" alt=\"Structure of MIB SNMP\" width=\"454\" height=\"487\" \/><\/a><figcaption id=\"caption-attachment-1552\" class=\"wp-caption-text\">Structure of MIB in SNMP<\/figcaption><\/figure>\n<blockquote><p>iso(1) org(3) dod(6) internet(1) mgmt(2) mib-2(1) system(1) is readed as:<br \/>\n1.3.6.1.2.1.1<\/p><\/blockquote>\n<p>In next article, we will see the <a title=\"Terminologies used in SNMP\" href=\"https:\/\/jitendrazaa.com\/blog\/tips\/terminologies-used-in-snmp\/\" target=\"_blank\">terminologies used in SNMP<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction to SNMP in JAVA<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"jz_research_post":"","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[12],"tags":[329],"class_list":["post-1548","post","type-post","status-publish","format-standard","hentry","category-snmp","tag-java"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":1563,"url":"https:\/\/www.jitendrazaa.com\/blog\/java\/snmp\/install-snmp-service-in-windows-xp-and-overview-of-mib-explorer\/","url_meta":{"origin":1548,"position":0},"title":"Install SNMP Service in Windows XP and Overview of MIB Explorer","author":"Jitendra","date":"February 23, 2011","format":false,"excerpt":"Install SNMP Service in Windows XP and Overview of MIB Explorer","rel":"","context":"In &quot;SNMP&quot;","block_context":{"text":"SNMP","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/java\/snmp\/"},"img":{"alt_text":"Install SNMP Service in Windows XP","src":"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2011\/02\/Install-SNMP-Service-in-Windows-XP.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":1554,"url":"https:\/\/www.jitendrazaa.com\/blog\/java\/snmp\/terminologies-used-in-snmp\/","url_meta":{"origin":1548,"position":1},"title":"Terminologies used in SNMP","author":"Jitendra","date":"February 23, 2011","format":false,"excerpt":"Terminologies used in SNMP","rel":"","context":"In &quot;SNMP&quot;","block_context":{"text":"SNMP","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/java\/snmp\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1571,"url":"https:\/\/www.jitendrazaa.com\/blog\/java\/snmp\/create-snmp-client-in-java-using-snmp4j\/","url_meta":{"origin":1548,"position":2},"title":"Create SNMP Client in JAVA Using SNMP4j","author":"Jitendra","date":"February 23, 2011","format":false,"excerpt":"Create SNMP Client in JAVA Using SNMP4j","rel":"","context":"In &quot;SNMP&quot;","block_context":{"text":"SNMP","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/java\/snmp\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1582,"url":"https:\/\/www.jitendrazaa.com\/blog\/java\/snmp\/generating-trap-in-snmp-using-snmp4j\/","url_meta":{"origin":1548,"position":3},"title":"Generating TRAP in SNMP using SNMP4j","author":"Jitendra","date":"February 24, 2011","format":false,"excerpt":"Generating TRAP in SNMP using SNMP4j","rel":"","context":"In &quot;SNMP&quot;","block_context":{"text":"SNMP","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/java\/snmp\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1576,"url":"https:\/\/www.jitendrazaa.com\/blog\/java\/snmp\/creating-snmp-agent-server-in-java-using-snmp4j\/","url_meta":{"origin":1548,"position":4},"title":"Creating SNMP Agent (Server) in JAVA using SNMP4j","author":"Jitendra","date":"February 24, 2011","format":false,"excerpt":"Creating SNMP Agent (Server) in JAVA using SNMP4j","rel":"","context":"In &quot;SNMP&quot;","block_context":{"text":"SNMP","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/java\/snmp\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1099,"url":"https:\/\/www.jitendrazaa.com\/blog\/others\/rtm-nu\/be-7th-sem-it-syllabus-of-rtmnu-nagpur-university-information-technology\/","url_meta":{"origin":1548,"position":5},"title":"BE 7th sem IT syllabus of RTMNU (Nagpur university &#8211; Information Technology)","author":"Jitendra","date":"September 15, 2010","format":false,"excerpt":"BE 7th sem IT syllabus of RTMNU (Nagpur university - Information Technology)","rel":"","context":"In &quot;RTM NU&quot;","block_context":{"text":"RTM NU","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/others\/rtm-nu\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts\/1548","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/comments?post=1548"}],"version-history":[{"count":0,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts\/1548\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/media?parent=1548"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/categories?post=1548"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/tags?post=1548"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}