Wednesday, June 15, 2022

CISCO SWITCH DECNET ROUTING SNMP MIB ::= the mib files needed for complete snmp traversal (including snmpwalk) of DECnet router information


I run a CISCO 7204VXR switch nostalgically named IMPRTR which, among other things, runs a bunch of GRE tunnels carrying DECnet network protocol traffic connecting to other DECnet Level-2 Area Routers providing DECnet communication with various VAX, PDP and other DECnet-speaking machines around the world as a part of HECnet (the global hobbyist DECnet network).

At this time I am running Cisco IOS Software, 7200 Software (C7200-A3JK9S-M), Version 12.4(25d), RELEASE SOFTWARE (fc1) on the 7204VXR. The software comes with an excellent SNMP agent that includes DECnet routing information available to external SNMP clients.

The intent of this post is to summarize in one place the MIB definition files and configuration instructions for Debian-based Linux distributions for accessing the information provided by the SNMP agent on the switch in a pretty way. A specific goal was to have snmpwalk display DECnet information using fully defined human-readable OIDs instead of long series of dot-separated raw SNMP OIDs. 

The following is based on Net-SNMP package installed from standard repos on (a) Ubuntu 20.04.2 LTS and (b) MX Linux 19.2 machines. Both distros are based on Debian for which the MIB search path defaults to $HOME/.snmp/mibs:/usr/share/snmp/mibs:/usr/share/snmp/mibs/iana:/usr/share/snmp/mibs/ietf:/usr/share/mibs/site:/usr/share/snmp/mibs:/usr/share/mibs/iana:/usr/share/mibs/ietf:/usr/share/mibs/netsnmp.

1) Net-SNMP Preparation: Install and Clean Up the full suite of default MIBs

These steps are common for any installation of Net-SNMP on a Debian-derived Linux distribution (including Ubuntu 20.04). As root:

# apt-get install snmp

# apt-get install snmp-mibs-downloader

Edit /etc/snmp/snmp.conf and comment out the line that reads "mibs:" by adding a "#" at the beginning of that line:

# As the snmp packages come without MIB files due to license reasons, loading
# of MIBs is disabled by default. If you added the MIBs you can reenable
# loading them by commenting out the following line.
#mibs :

Lastly, to avoid "Bad operator (INTEGER): At line 73 in /usr/share/snmp/mibs/ietf/SNMPv2-PDU" errors later on, replace the entire file /usr/share/snmp/mibs/ietf/SNMPv2-PDU with the one here.

At this point, SNMP tools should be able to find and use the MIBs. Test with


# snmptranslate -Tl | less

which should produce:

.iso(1).org(3)
.iso(1).org(3).dod(6)
.iso(1).org(3).dod(6).internet(1)
.iso(1).org(3).dod(6).internet(1).directory(1)
.iso(1).org(3).dod(6).internet(1).mgmt(2)
.iso(1).org(3).dod(6).internet(1).mgmt(2).mib-2(1)
.iso(1).org(3).dod(6).internet(1).mgmt(2).mib-2(1).system(1)
.iso(1).org(3).dod(6).internet(1).mgmt(2).mib-2(1).system(1).sysDescr(1)
... and so on


2) Install Cisco DECnet Router MIB definitions

We need three additional MIBs for fully defining human-readable OIDs comprising DECnet-related entries in Cisco's SNMP information base. Grab them from the following links and copy them to /usr/share/snmp/mibs directory that is included in Net-SNMP MIB search path.



3) Install Cisco DECnet Router MIB definitions

Walk the CISCO MIB using a command line like below. Provide the correct IP address and community string.

snmpwalk -m ALL -v2c -c <community string>  <Hostname/IP address of CISCO router> 1.3.6.1.4.1.9.3.1.26


For one of my CISCO  DECnet routers, this produces the output below. As an example, I have highlighted the parts that tell me DECnet Area 12 is reachable at a DECnet Cost of 10 in 2 Hops. It also tells me the next hop to Area 12 is Node 59.1020, as derived from the last two bytes of DECnet MAC address FC:EF. A easy way to translate DECnet MAC addresses to Node addresses is my Javascript "DECnet - MAC address - SCSSYSTEMID Calculator".

OLD-CISCO-DECNET-MIB::dnArea.1 = INTEGER: 1
OLD-CISCO-DECNET-MIB::dnArea.2 = INTEGER: 2
OLD-CISCO-DECNET-MIB::dnArea.5 = INTEGER: 5
OLD-CISCO-DECNET-MIB::dnArea.9 = INTEGER: 9
OLD-CISCO-DECNET-MIB::dnArea.12 = INTEGER: 12
OLD-CISCO-DECNET-MIB::dnArea.24 = INTEGER: 24
OLD-CISCO-DECNET-MIB::dnArea.27 = INTEGER: 27
OLD-CISCO-DECNET-MIB::dnArea.28 = INTEGER: 28
OLD-CISCO-DECNET-MIB::dnArea.29 = INTEGER: 29
OLD-CISCO-DECNET-MIB::dnArea.30 = INTEGER: 30
OLD-CISCO-DECNET-MIB::dnArea.31 = INTEGER: 31
OLD-CISCO-DECNET-MIB::dnArea.33 = INTEGER: 33
OLD-CISCO-DECNET-MIB::dnArea.34 = INTEGER: 34
OLD-CISCO-DECNET-MIB::dnArea.35 = INTEGER: 35
OLD-CISCO-DECNET-MIB::dnArea.38 = INTEGER: 38
OLD-CISCO-DECNET-MIB::dnArea.39 = INTEGER: 39
OLD-CISCO-DECNET-MIB::dnArea.41 = INTEGER: 41
OLD-CISCO-DECNET-MIB::dnArea.42 = INTEGER: 42
OLD-CISCO-DECNET-MIB::dnArea.52 = INTEGER: 52
OLD-CISCO-DECNET-MIB::dnArea.59 = INTEGER: 59
OLD-CISCO-DECNET-MIB::dnArea.60 = INTEGER: 60
OLD-CISCO-DECNET-MIB::dnArea.61 = INTEGER: 61
OLD-CISCO-DECNET-MIB::dnArea.62 = INTEGER: 62
OLD-CISCO-DECNET-MIB::dnACost.1 = INTEGER: 10
OLD-CISCO-DECNET-MIB::dnACost.2 = INTEGER: 8
OLD-CISCO-DECNET-MIB::dnACost.5 = INTEGER: 15
OLD-CISCO-DECNET-MIB::dnACost.9 = INTEGER: 7
OLD-CISCO-DECNET-MIB::dnACost.12 = INTEGER: 10
OLD-CISCO-DECNET-MIB::dnACost.24 = INTEGER: 13
OLD-CISCO-DECNET-MIB::dnACost.27 = INTEGER: 7
OLD-CISCO-DECNET-MIB::dnACost.28 = INTEGER: 15
OLD-CISCO-DECNET-MIB::dnACost.29 = INTEGER: 9
OLD-CISCO-DECNET-MIB::dnACost.30 = INTEGER: 7
OLD-CISCO-DECNET-MIB::dnACost.31 = INTEGER: 0
OLD-CISCO-DECNET-MIB::dnACost.33 = INTEGER: 6
OLD-CISCO-DECNET-MIB::dnACost.34 = INTEGER: 8
OLD-CISCO-DECNET-MIB::dnACost.35 = INTEGER: 14
OLD-CISCO-DECNET-MIB::dnACost.38 = INTEGER: 18
OLD-CISCO-DECNET-MIB::dnACost.39 = INTEGER: 5
OLD-CISCO-DECNET-MIB::dnACost.41 = INTEGER: 5
OLD-CISCO-DECNET-MIB::dnACost.42 = INTEGER: 6
OLD-CISCO-DECNET-MIB::dnACost.52 = INTEGER: 14
OLD-CISCO-DECNET-MIB::dnACost.59 = INTEGER: 3
OLD-CISCO-DECNET-MIB::dnACost.60 = INTEGER: 10
OLD-CISCO-DECNET-MIB::dnACost.61 = INTEGER: 5
OLD-CISCO-DECNET-MIB::dnACost.62 = INTEGER: 15
OLD-CISCO-DECNET-MIB::dnAHop.1 = INTEGER: 2
OLD-CISCO-DECNET-MIB::dnAHop.2 = INTEGER: 2
OLD-CISCO-DECNET-MIB::dnAHop.5 = INTEGER: 3
OLD-CISCO-DECNET-MIB::dnAHop.9 = INTEGER: 1
OLD-CISCO-DECNET-MIB::dnAHop.12 = INTEGER: 2
OLD-CISCO-DECNET-MIB::dnAHop.24 = INTEGER: 3
OLD-CISCO-DECNET-MIB::dnAHop.27 = INTEGER: 2
OLD-CISCO-DECNET-MIB::dnAHop.28 = INTEGER: 3
OLD-CISCO-DECNET-MIB::dnAHop.29 = INTEGER: 2
OLD-CISCO-DECNET-MIB::dnAHop.30 = INTEGER: 2
OLD-CISCO-DECNET-MIB::dnAHop.31 = INTEGER: 0
OLD-CISCO-DECNET-MIB::dnAHop.33 = INTEGER: 2
OLD-CISCO-DECNET-MIB::dnAHop.34 = INTEGER: 1
OLD-CISCO-DECNET-MIB::dnAHop.35 = INTEGER: 1
OLD-CISCO-DECNET-MIB::dnAHop.38 = INTEGER: 4
OLD-CISCO-DECNET-MIB::dnAHop.39 = INTEGER: 2
OLD-CISCO-DECNET-MIB::dnAHop.41 = INTEGER: 1
OLD-CISCO-DECNET-MIB::dnAHop.42 = INTEGER: 1
OLD-CISCO-DECNET-MIB::dnAHop.52 = INTEGER: 3
OLD-CISCO-DECNET-MIB::dnAHop.59 = INTEGER: 1
OLD-CISCO-DECNET-MIB::dnAHop.60 = INTEGER: 2
OLD-CISCO-DECNET-MIB::dnAHop.61 = INTEGER: 1
OLD-CISCO-DECNET-MIB::dnAHop.62 = INTEGER: 2
OLD-CISCO-DECNET-MIB::dnAIfIndex.1 = INTEGER: 1
OLD-CISCO-DECNET-MIB::dnAIfIndex.2 = INTEGER: 1
OLD-CISCO-DECNET-MIB::dnAIfIndex.5 = INTEGER: 1
OLD-CISCO-DECNET-MIB::dnAIfIndex.9 = INTEGER: 14
OLD-CISCO-DECNET-MIB::dnAIfIndex.12 = INTEGER: 25
OLD-CISCO-DECNET-MIB::dnAIfIndex.24 = INTEGER: 1
OLD-CISCO-DECNET-MIB::dnAIfIndex.27 = INTEGER: 1
OLD-CISCO-DECNET-MIB::dnAIfIndex.28 = INTEGER: 1
OLD-CISCO-DECNET-MIB::dnAIfIndex.29 = INTEGER: 1
OLD-CISCO-DECNET-MIB::dnAIfIndex.30 = INTEGER: 1
OLD-CISCO-DECNET-MIB::dnAIfIndex.31 = INTEGER: 0
OLD-CISCO-DECNET-MIB::dnAIfIndex.33 = INTEGER: 1
OLD-CISCO-DECNET-MIB::dnAIfIndex.34 = INTEGER: 20
OLD-CISCO-DECNET-MIB::dnAIfIndex.35 = INTEGER: 21
OLD-CISCO-DECNET-MIB::dnAIfIndex.38 = INTEGER: 1
OLD-CISCO-DECNET-MIB::dnAIfIndex.39 = INTEGER: 1
OLD-CISCO-DECNET-MIB::dnAIfIndex.41 = INTEGER: 22
OLD-CISCO-DECNET-MIB::dnAIfIndex.42 = INTEGER: 23
OLD-CISCO-DECNET-MIB::dnAIfIndex.52 = INTEGER: 1
OLD-CISCO-DECNET-MIB::dnAIfIndex.59 = INTEGER: 25
OLD-CISCO-DECNET-MIB::dnAIfIndex.60 = INTEGER: 25
OLD-CISCO-DECNET-MIB::dnAIfIndex.61 = INTEGER: 26
OLD-CISCO-DECNET-MIB::dnAIfIndex.62 = INTEGER: 1
OLD-CISCO-DECNET-MIB::dnANextHop.1 = Hex-STRING: 03 7C
OLD-CISCO-DECNET-MIB::dnANextHop.2 = Hex-STRING: 03 7C
OLD-CISCO-DECNET-MIB::dnANextHop.5 = Hex-STRING: 03 7C
OLD-CISCO-DECNET-MIB::dnANextHop.9 = Hex-STRING: FF 27
OLD-CISCO-DECNET-MIB::dnANextHop.12 = Hex-STRING: FC EF
OLD-CISCO-DECNET-MIB::dnANextHop.24 = Hex-STRING: 03 7C
OLD-CISCO-DECNET-MIB::dnANextHop.27 = Hex-STRING: 03 7C
OLD-CISCO-DECNET-MIB::dnANextHop.28 = Hex-STRING: 03 7C
OLD-CISCO-DECNET-MIB::dnANextHop.29 = Hex-STRING: 03 7C
OLD-CISCO-DECNET-MIB::dnANextHop.30 = Hex-STRING: 03 7C
OLD-CISCO-DECNET-MIB::dnANextHop.31 = Hex-STRING: 00 00
OLD-CISCO-DECNET-MIB::dnANextHop.33 = Hex-STRING: 03 7C
OLD-CISCO-DECNET-MIB::dnANextHop.34 = Hex-STRING: FF 8B
OLD-CISCO-DECNET-MIB::dnANextHop.35 = Hex-STRING: FF 8F
OLD-CISCO-DECNET-MIB::dnANextHop.38 = Hex-STRING: 03 7C
OLD-CISCO-DECNET-MIB::dnANextHop.39 = Hex-STRING: 03 7C
OLD-CISCO-DECNET-MIB::dnANextHop.41 = Hex-STRING: 01 A4
OLD-CISCO-DECNET-MIB::dnANextHop.42 = Hex-STRING: FE AB
OLD-CISCO-DECNET-MIB::dnANextHop.52 = Hex-STRING: 03 7C
OLD-CISCO-DECNET-MIB::dnANextHop.59 = Hex-STRING: FC EF
OLD-CISCO-DECNET-MIB::dnANextHop.60 = Hex-STRING: FC EF
OLD-CISCO-DECNET-MIB::dnANextHop.61 = Hex-STRING: FF F7
OLD-CISCO-DECNET-MIB::dnANextHop.62 = Hex-STRING: 03 7C
OLD-CISCO-DECNET-MIB::dnAAge.1 = INTEGER: 0
OLD-CISCO-DECNET-MIB::dnAAge.2 = INTEGER: 0
OLD-CISCO-DECNET-MIB::dnAAge.5 = INTEGER: 0
OLD-CISCO-DECNET-MIB::dnAAge.9 = INTEGER: 33
OLD-CISCO-DECNET-MIB::dnAAge.12 = INTEGER: 40
OLD-CISCO-DECNET-MIB::dnAAge.24 = INTEGER: 0
OLD-CISCO-DECNET-MIB::dnAAge.27 = INTEGER: 0
OLD-CISCO-DECNET-MIB::dnAAge.28 = INTEGER: 0
OLD-CISCO-DECNET-MIB::dnAAge.29 = INTEGER: 0
OLD-CISCO-DECNET-MIB::dnAAge.30 = INTEGER: 0
OLD-CISCO-DECNET-MIB::dnAAge.31 = INTEGER: 0
OLD-CISCO-DECNET-MIB::dnAAge.33 = INTEGER: 0
OLD-CISCO-DECNET-MIB::dnAAge.34 = INTEGER: 43
OLD-CISCO-DECNET-MIB::dnAAge.35 = INTEGER: 25
OLD-CISCO-DECNET-MIB::dnAAge.38 = INTEGER: 0
OLD-CISCO-DECNET-MIB::dnAAge.39 = INTEGER: 0
OLD-CISCO-DECNET-MIB::dnAAge.41 = INTEGER: 125
OLD-CISCO-DECNET-MIB::dnAAge.42 = INTEGER: 39
OLD-CISCO-DECNET-MIB::dnAAge.52 = INTEGER: 0
OLD-CISCO-DECNET-MIB::dnAAge.59 = INTEGER: 26
OLD-CISCO-DECNET-MIB::dnAAge.60 = INTEGER: 0
OLD-CISCO-DECNET-MIB::dnAAge.61 = INTEGER: 43
OLD-CISCO-DECNET-MIB::dnAAge.62 = INTEGER: 0
OLD-CISCO-DECNET-MIB::dnAPrio.1 = INTEGER: 0
OLD-CISCO-DECNET-MIB::dnAPrio.2 = INTEGER: 0
OLD-CISCO-DECNET-MIB::dnAPrio.5 = INTEGER: 0
OLD-CISCO-DECNET-MIB::dnAPrio.9 = INTEGER: 64
OLD-CISCO-DECNET-MIB::dnAPrio.12 = INTEGER: 64
OLD-CISCO-DECNET-MIB::dnAPrio.24 = INTEGER: 0
OLD-CISCO-DECNET-MIB::dnAPrio.27 = INTEGER: 0
OLD-CISCO-DECNET-MIB::dnAPrio.28 = INTEGER: 0
OLD-CISCO-DECNET-MIB::dnAPrio.29 = INTEGER: 0
OLD-CISCO-DECNET-MIB::dnAPrio.30 = INTEGER: 0
OLD-CISCO-DECNET-MIB::dnAPrio.31 = INTEGER: 0
OLD-CISCO-DECNET-MIB::dnAPrio.33 = INTEGER: 0
OLD-CISCO-DECNET-MIB::dnAPrio.34 = INTEGER: 64
OLD-CISCO-DECNET-MIB::dnAPrio.35 = INTEGER: 64
OLD-CISCO-DECNET-MIB::dnAPrio.38 = INTEGER: 0
OLD-CISCO-DECNET-MIB::dnAPrio.39 = INTEGER: 0
OLD-CISCO-DECNET-MIB::dnAPrio.41 = INTEGER: 64
OLD-CISCO-DECNET-MIB::dnAPrio.42 = INTEGER: 64
OLD-CISCO-DECNET-MIB::dnAPrio.52 = INTEGER: 0
OLD-CISCO-DECNET-MIB::dnAPrio.59 = INTEGER: 64
OLD-CISCO-DECNET-MIB::dnAPrio.60 = INTEGER: 0
OLD-CISCO-DECNET-MIB::dnAPrio.61 = INTEGER: 64
OLD-CISCO-DECNET-MIB::dnAPrio.62 = INTEGER: 0



No comments:

Post a Comment

"SEO" link builders: move on, your spam link will not get posted.

Note: Only a member of this blog may post a comment.