{"id":865,"date":"2010-05-26T17:24:31","date_gmt":"2010-05-26T16:24:31","guid":{"rendered":"http:\/\/mccltd.net\/blog\/?p=865"},"modified":"2010-04-26T17:31:40","modified_gmt":"2010-04-26T16:31:40","slug":"snmp-mib-persistancy","status":"publish","type":"post","link":"http:\/\/darenmatthews.com\/blog\/?p=865","title":{"rendered":"SNMP MIB Persistancy"},"content":{"rendered":"<p>SNMP monitoring often references interfaces using the &#8220;ifindex&#8221;, in order to solicit information.\u00a0 Sometimes though, the ifindex can change or be slightly different to the actual interface number, for example:<!--more--><\/p>\n<blockquote><p>SW-DISTRIB#show snmp mib ifmib ifindex<br \/>\nFastEthernet0\/1: Ifindex = 1<br \/>\nFastEthernet0\/10: Ifindex = 10<br \/>\nFastEthernet0\/11: Ifindex = 11<br \/>\nFastEthernet0\/12: Ifindex = 12<br \/>\nFastEthernet0\/13: Ifindex = 21<br \/>\nFastEthernet0\/14: Ifindex = 22<br \/>\nFastEthernet0\/15: Ifindex = 23<\/p>\n<p>[output omitted]<\/p><\/blockquote>\n<p>Also, as new physical and logical interfaces are added and removed, the ifindex may change, which will affect your monitoring policies.<\/p>\n<p>So if using SNMP to target any ifindex, use snmp mib persistence:<\/p>\n<blockquote><p>snmp-server ifindex persist<\/p><\/blockquote>\n<p>(this saves the ifindexes into a file on the flash)<\/p>\n<blockquote><p>Router# dir nvram:<br \/>\nDirectory of nvram:\/<\/p>\n<p>124\u00a0 -rw-\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 953\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;no date&gt;\u00a0 startup-config<br \/>\n125\u00a0 &#8212;-\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 46\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;no date&gt;\u00a0 private-config<br \/>\n1\u00a0 -rw-\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 180\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;no date&gt;\u00a0 ifIndex-table<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>SNMP monitoring often references interfaces using the &#8220;ifindex&#8221;, in order to solicit information.\u00a0 Sometimes though, the ifindex can change or be slightly different to the actual interface number, for example:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[10],"tags":[23],"_links":{"self":[{"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/865"}],"collection":[{"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=865"}],"version-history":[{"count":2,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/865\/revisions"}],"predecessor-version":[{"id":867,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/865\/revisions\/867"}],"wp:attachment":[{"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=865"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=865"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=865"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}