{"id":2257,"date":"2019-07-30T22:48:48","date_gmt":"2019-07-30T22:48:48","guid":{"rendered":"http:\/\/wiki.thomasandsofia.com\/?p=2257"},"modified":"2019-08-01T23:16:11","modified_gmt":"2019-08-01T23:16:11","slug":"snmp-simple-network-management-protocol","status":"publish","type":"post","link":"https:\/\/wiki.thomasandsofia.com\/?p=2257","title":{"rendered":"SNMP Simple Network Management Protocol"},"content":{"rendered":"<p><a href=\"https:\/\/www.youtube.com\/watch?v=SUuwHK4XYes\" target=\"'_blank\">SNMP Basics 82\/84 Free Video Training Course<\/a><\/p>\n<p>Also ref: <a href=\"http:\/\/wiki.thomasandsofia.com\/?p=2270\">Configure SNMPv3 on Cisco Devices<\/a><\/p>\n<h1>Overview and Definitions<\/h1>\n<ul>\n<li>Ports:\n<ul>\n<li>161 UDP: Server to Resource (Router, Server, Switch, etc.) communication<\/li>\n<li>162 UDP: Resource to Server (For Traps &#8211; Triggers that automatically announce issues)\n<ul>\n<li>Trap examples\n<ul>\n<li>interface is off<\/li>\n<li>something is broken<\/li>\n<\/ul>\n<\/li>\n<li>Traps require that a polling server is defined.\u00a0 They need a place to send the information.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>OID: Object Identifiers\n<ul>\n<li>Numeric string of values as defined by ISO\n<ul>\n<li>Example: 1.2.1.6.41.8.13.7.52.2.0\n<ul>\n<li>last .0 acts like a stop bit?<\/li>\n<\/ul>\n<\/li>\n<li>Many of these are standardized, but many are also private<\/li>\n<\/ul>\n<\/li>\n<li>Each digit stands for section in the path to that object.<\/li>\n<li>Example: 1.3.6.1.2.1<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><a href=\"http:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2019\/07\/MIB_Tree_1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2258\" src=\"http:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2019\/07\/MIB_Tree_1.jpg\" alt=\"\" width=\"600\" height=\"421\" srcset=\"https:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2019\/07\/MIB_Tree_1.jpg 600w, https:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2019\/07\/MIB_Tree_1-300x211.jpg 300w, https:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2019\/07\/MIB_Tree_1-150x105.jpg 150w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<ul>\n<li>MIBs: Management Information Base\n<ul>\n<li>Like DNS for OIDs.<\/li>\n<li>It is a collection of OIDs and describes them for a device\n<ul>\n<li>type of data format it is in<\/li>\n<li>Valid ranges<\/li>\n<li>Description of each OID value<\/li>\n<\/ul>\n<\/li>\n<li>Helps you determine what you are looking for.<\/li>\n<li>You can usually download the MIBs for different vendors.<\/li>\n<li>MIB is NOT required to retrieve data.\n<ul>\n<li>If you know the OID or can calculate it some how, the MIB is not necessary<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h1>SNMP Versions<\/h1>\n<ul>\n<li>Version 1\n<ul>\n<li>Obsolete<\/li>\n<li>RFC 1157<\/li>\n<li>Polls entire tree, not just specific OID(s)<\/li>\n<li>Used a &#8216;community string&#8217; which was basically the password\n<ul>\n<li>Read Only\n<ul>\n<li>Used to retrieve information<\/li>\n<\/ul>\n<\/li>\n<li>Read Write\n<ul>\n<li>Can use to set configurations<\/li>\n<li>Not commonly used.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>No encryption. Community string sent in clear text.\n<ul>\n<li>easily seen with wireshark.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>Version 2c\n<ul>\n<li>Most Common<\/li>\n<li>RFC 1901 &#8211; 1908<\/li>\n<li>Polls single values so more efficient<\/li>\n<li>Used same clear text community string<\/li>\n<\/ul>\n<\/li>\n<li>Version 3\n<ul>\n<li>RFC 2273 &#8211; 2275<\/li>\n<li>Not fully supported on all devices<\/li>\n<li>Secure!\n<ul>\n<li>Authentication<\/li>\n<li>Encryption<\/li>\n<\/ul>\n<\/li>\n<li>Slightly more complex to setup due to authentication and encryption.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2>Configure the router (SNMPv2c)<\/h2>\n<p>Set the community string: &lt;password&gt; &lt;ro\/rw&gt;<\/p>\n<pre>R1(config)#snmp-server community cisco ro<\/pre>\n<p>Set a description for the device: &lt;Text string&gt;<\/p>\n<pre>R1(config)#snmp-server location Switch Closet<\/pre>\n<p>Set a contact: &lt;Text string&gt;<\/p>\n<pre>R1(config)#snmp-server contact Thomas (555) 846-2330<\/pre>\n<p>Apply an access list: &lt;community string&gt; &lt;access list&gt;<\/p>\n<ul>\n<li>This was not well defined<\/li>\n<\/ul>\n<pre>R1(config)#snmp-server community cisco 101<\/pre>\n<p>Enable traps<\/p>\n<ul>\n<li>Enable the trap: &lt;trap_name&gt;<\/li>\n<li>Set the host you want to send the trap to &lt;server_ip&gt; version &lt;v#&gt; &lt;community_string&gt;<\/li>\n<\/ul>\n<pre>R1(config)#snmp-server enable traps ...\r\nR1(config)#snmp-server host 10.0.0.10 version 2c cisco<\/pre>\n<p>Show Commands<\/p>\n<pre>R1#show snmp\r\nChassis: FTX1219W1E9\r\nLocation: My Office\r\n0 SNMP packets input\r\n0 Bad SNMP version errors\r\n0 Unknown community name\r\n0 Illegal operation for community name supplied\r\n0 Encoding errors\r\n0 Number of requested variables\r\n0 Number of altered variables\r\n0 Get-request PDUs\r\n0 Get-next PDUs\r\n0 Set-request PDUs\r\n0 Input queue packet drops (Maximum queue size 1000)\r\n0 SNMP packets output\r\n0 Too big errors (Maximum packet size 1500)\r\n0 No such name errors\r\n0 Bad values errors\r\n0 General errors\r\n0 Response PDUs\r\n0 Trap PDUs\r\nSNMP Dispatcher:\r\nqueue 0\/75 (current\/max), 0 dropped\r\nSNMP Engine:\r\nqueue 0\/1000 (current\/max), 0 dropped\r\n\r\nSNMP logging: disabled<\/pre>\n<p>Show community<\/p>\n<pre>R1#show snmp community\r\nCommunity name: ILMI\r\nCommunity Index: cisco0\r\nCommunity SecurityName: ILMI\r\nstorage-type: read-only  active\r\n\r\n\r\nCommunity name: cisco\r\nCommunity Index: cisco1\r\nCommunity SecurityName: cisco\r\nstorage-type: nonvolatile        active<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>SNMP Basics 82\/84 Free Video Training Course Also ref: Configure SNMPv3 on Cisco Devices Overview and Definitions Ports: 161 UDP: Server to Resource (Router, Server, Switch, etc.) communication 162 UDP: Resource to Server (For Traps &#8211; Triggers that automatically announce issues) Trap examples interface is off something is broken Traps require that a polling server ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"https:\/\/wiki.thomasandsofia.com\/?p=2257\" title=\"read more...\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,50],"tags":[],"class_list":["post-2257","post","type-post","status-publish","format-standard","hentry","category-networking","category-snmp"],"_links":{"self":[{"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/posts\/2257","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2257"}],"version-history":[{"count":4,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/posts\/2257\/revisions"}],"predecessor-version":[{"id":2273,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/posts\/2257\/revisions\/2273"}],"wp:attachment":[{"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2257"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2257"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2257"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}