How to properly map switch interfaces to LLDP devices using SNMP [closed] - snmp

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 11 months ago.
Improve this question
I'm trying to map devices found using LLDP on a switch to a specific interface on that switch.
If I SSH into the switch, I can tell there is a device on its port 6 (interface 6).
If I run snmpwalk looking at the lldpRemEntry, I can see the same device.
snmpwalk -c community -v 2c $IP 1.0.8802.1.1.2.1.4.1.1 | grep 0.6
iso.0.8802.1.1.2.1.4.1.1.4.0.6.32 = INTEGER: 5
iso.0.8802.1.1.2.1.4.1.1.5.0.6.32 = Hex-STRING: 01 0A 63 29 07
iso.0.8802.1.1.2.1.4.1.1.6.0.6.32 = INTEGER: 7
iso.0.8802.1.1.2.1.4.1.1.7.0.6.32 = STRING: "0008303043F4:P1"
iso.0.8802.1.1.2.1.4.1.1.8.0.6.32 = STRING: "SW PORT"
iso.0.8802.1.1.2.1.4.1.1.9.0.6.32 = STRING: "SEP0008303043F4"
iso.0.8802.1.1.2.1.4.1.1.10.0.6.32 = STRING: "Cisco IP Phone 7965G,V11, SCCP45.9-4-2SR4-3S"
iso.0.8802.1.1.2.1.4.1.1.11.0.6.32 = Hex-STRING: 24 00
iso.0.8802.1.1.2.1.4.1.1.12.0.6.32 = Hex-STRING: 24 00
However, when looking at the ifIndex of the same switch, I don't see the same value (I'm expecting 6). Instead, I see these values for the interface id.
snmpwalk -c community -v 2c $IP 1.3.6.1.2.1.2.2.1.1
iso.3.6.1.2.1.2.2.1.1.1 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.1.10 = INTEGER: 10
iso.3.6.1.2.1.2.2.1.1.30 = INTEGER: 30
iso.3.6.1.2.1.2.2.1.1.41 = INTEGER: 41
iso.3.6.1.2.1.2.2.1.1.999 = INTEGER: 999
iso.3.6.1.2.1.2.2.1.1.5179 = INTEGER: 5179
iso.3.6.1.2.1.2.2.1.1.5180 = INTEGER: 5180
iso.3.6.1.2.1.2.2.1.1.5181 = INTEGER: 5181
iso.3.6.1.2.1.2.2.1.1.10101 = INTEGER: 10101
iso.3.6.1.2.1.2.2.1.1.10102 = INTEGER: 10102
iso.3.6.1.2.1.2.2.1.1.10103 = INTEGER: 10103
iso.3.6.1.2.1.2.2.1.1.10104 = INTEGER: 10104
iso.3.6.1.2.1.2.2.1.1.10105 = INTEGER: 10105
iso.3.6.1.2.1.2.2.1.1.10106 = INTEGER: 10106
iso.3.6.1.2.1.2.2.1.1.10107 = INTEGER: 10107
iso.3.6.1.2.1.2.2.1.1.10108 = INTEGER: 10108
iso.3.6.1.2.1.2.2.1.1.10109 = INTEGER: 10109
iso.3.6.1.2.1.2.2.1.1.10110 = INTEGER: 10110
iso.3.6.1.2.1.2.2.1.1.10111 = INTEGER: 10111
iso.3.6.1.2.1.2.2.1.1.10112 = INTEGER: 10112
iso.3.6.1.2.1.2.2.1.1.10113 = INTEGER: 10113
iso.3.6.1.2.1.2.2.1.1.10114 = INTEGER: 10114
iso.3.6.1.2.1.2.2.1.1.10115 = INTEGER: 10115
iso.3.6.1.2.1.2.2.1.1.10116 = INTEGER: 10116
iso.3.6.1.2.1.2.2.1.1.10117 = INTEGER: 10117
iso.3.6.1.2.1.2.2.1.1.10118 = INTEGER: 10118
iso.3.6.1.2.1.2.2.1.1.10119 = INTEGER: 10119
iso.3.6.1.2.1.2.2.1.1.10120 = INTEGER: 10120
iso.3.6.1.2.1.2.2.1.1.10121 = INTEGER: 10121
iso.3.6.1.2.1.2.2.1.1.10122 = INTEGER: 10122
iso.3.6.1.2.1.2.2.1.1.10123 = INTEGER: 10123
iso.3.6.1.2.1.2.2.1.1.10124 = INTEGER: 10124
iso.3.6.1.2.1.2.2.1.1.10125 = INTEGER: 10125
iso.3.6.1.2.1.2.2.1.1.10126 = INTEGER: 10126
iso.3.6.1.2.1.2.2.1.1.10201 = INTEGER: 10201
iso.3.6.1.2.1.2.2.1.1.10202 = INTEGER: 10202
iso.3.6.1.2.1.2.2.1.1.14001 = INTEGER: 14001
iso.3.6.1.2.1.2.2.1.1.14002 = INTEGER: 14002
With these for the names (ifName):
snmpwalk -c community -v 2c $IP 1.3.6.1.2.1.31.1.1.1.1
iso.3.6.1.2.1.31.1.1.1.1.1 = STRING: "Vl1"
iso.3.6.1.2.1.31.1.1.1.1.10 = STRING: "Vl10"
iso.3.6.1.2.1.31.1.1.1.1.30 = STRING: "Vl30"
iso.3.6.1.2.1.31.1.1.1.1.41 = STRING: "Vl41"
iso.3.6.1.2.1.31.1.1.1.1.999 = STRING: "Vl999"
iso.3.6.1.2.1.31.1.1.1.1.5179 = STRING: "StackPort1"
iso.3.6.1.2.1.31.1.1.1.1.5180 = STRING: "StackSub-St1-1"
iso.3.6.1.2.1.31.1.1.1.1.5181 = STRING: "StackSub-St1-2"
iso.3.6.1.2.1.31.1.1.1.1.10101 = STRING: "Gi1/0/1"
iso.3.6.1.2.1.31.1.1.1.1.10102 = STRING: "Gi1/0/2"
iso.3.6.1.2.1.31.1.1.1.1.10103 = STRING: "Gi1/0/3"
iso.3.6.1.2.1.31.1.1.1.1.10104 = STRING: "Gi1/0/4"
iso.3.6.1.2.1.31.1.1.1.1.10105 = STRING: "Gi1/0/5"
iso.3.6.1.2.1.31.1.1.1.1.10106 = STRING: "Gi1/0/6"
iso.3.6.1.2.1.31.1.1.1.1.10107 = STRING: "Gi1/0/7"
iso.3.6.1.2.1.31.1.1.1.1.10108 = STRING: "Gi1/0/8"
iso.3.6.1.2.1.31.1.1.1.1.10109 = STRING: "Gi1/0/9"
iso.3.6.1.2.1.31.1.1.1.1.10110 = STRING: "Gi1/0/10"
iso.3.6.1.2.1.31.1.1.1.1.10111 = STRING: "Gi1/0/11"
iso.3.6.1.2.1.31.1.1.1.1.10112 = STRING: "Gi1/0/12"
iso.3.6.1.2.1.31.1.1.1.1.10113 = STRING: "Gi1/0/13"
iso.3.6.1.2.1.31.1.1.1.1.10114 = STRING: "Gi1/0/14"
iso.3.6.1.2.1.31.1.1.1.1.10115 = STRING: "Gi1/0/15"
iso.3.6.1.2.1.31.1.1.1.1.10116 = STRING: "Gi1/0/16"
iso.3.6.1.2.1.31.1.1.1.1.10117 = STRING: "Gi1/0/17"
iso.3.6.1.2.1.31.1.1.1.1.10118 = STRING: "Gi1/0/18"
iso.3.6.1.2.1.31.1.1.1.1.10119 = STRING: "Gi1/0/19"
iso.3.6.1.2.1.31.1.1.1.1.10120 = STRING: "Gi1/0/20"
iso.3.6.1.2.1.31.1.1.1.1.10121 = STRING: "Gi1/0/21"
iso.3.6.1.2.1.31.1.1.1.1.10122 = STRING: "Gi1/0/22"
iso.3.6.1.2.1.31.1.1.1.1.10123 = STRING: "Gi1/0/23"
iso.3.6.1.2.1.31.1.1.1.1.10124 = STRING: "Gi1/0/24"
iso.3.6.1.2.1.31.1.1.1.1.10125 = STRING: "Gi1/0/25"
iso.3.6.1.2.1.31.1.1.1.1.10126 = STRING: "Gi1/0/26"
iso.3.6.1.2.1.31.1.1.1.1.10201 = STRING: "Te1/0/1"
iso.3.6.1.2.1.31.1.1.1.1.10202 = STRING: "Te1/0/2"
iso.3.6.1.2.1.31.1.1.1.1.14001 = STRING: "Nu0"
iso.3.6.1.2.1.31.1.1.1.1.14002 = STRING: "Fa0"
So I can tell by looking that the index 10106 is the one that has the device on it because it's name matches the local interface name seen when I SSH into the switch. But how do I link these programmatically only using SNMP commands? I tried using the dot1dBasePortIfIndex, but it for some reason doesn't provide all the interfaces to me.
snmpwalk -c community -v 2c $IP 1.3.6.1.2.1.17.1.4.1.2
iso.3.6.1.2.1.17.1.4.1.2.2 = INTEGER: 10102
iso.3.6.1.2.1.17.1.4.1.2.7 = INTEGER: 10107
iso.3.6.1.2.1.17.1.4.1.2.8 = INTEGER: 10108
iso.3.6.1.2.1.17.1.4.1.2.10 = INTEGER: 10110
iso.3.6.1.2.1.17.1.4.1.2.13 = INTEGER: 10113
iso.3.6.1.2.1.17.1.4.1.2.14 = INTEGER: 10114
iso.3.6.1.2.1.17.1.4.1.2.15 = INTEGER: 10115
iso.3.6.1.2.1.17.1.4.1.2.16 = INTEGER: 10116
iso.3.6.1.2.1.17.1.4.1.2.17 = INTEGER: 10117
iso.3.6.1.2.1.17.1.4.1.2.18 = INTEGER: 10118
iso.3.6.1.2.1.17.1.4.1.2.19 = INTEGER: 10119
iso.3.6.1.2.1.17.1.4.1.2.20 = INTEGER: 10120
iso.3.6.1.2.1.17.1.4.1.2.21 = INTEGER: 10121
iso.3.6.1.2.1.17.1.4.1.2.23 = INTEGER: 10123
iso.3.6.1.2.1.17.1.4.1.2.24 = INTEGER: 10124
iso.3.6.1.2.1.17.1.4.1.2.25 = INTEGER: 10125
iso.3.6.1.2.1.17.1.4.1.2.26 = INTEGER: 10126
iso.3.6.1.2.1.17.1.4.1.2.27 = INTEGER: 10201
iso.3.6.1.2.1.17.1.4.1.2.28 = INTEGER: 10202
I'm missing something, but I just don't know what it is. Thanks for the help.

LLDP-MIB contains the following in the description of the LldpPortNumber type:
A port number has no mandatory relationship to an
InterfaceIndex object (of the interfaces MIB, IETF RFC 2863).
If the LLDP agent is a IEEE 802.1D, IEEE 802.1Q bridge, the
LldpPortNumber will have the same value as the dot1dBasePort
object (defined in IETF RFC 1493) associated corresponding
bridge port. If the system hosting LLDP agent is not an
IEEE 802.1D or an IEEE 802.1Q bridge, the LldpPortNumber
will have the same value as the corresponding interface's
InterfaceIndex object.
It looks like you have discovered this fact, as you mentioned you checked the dot1dBasePortIfIndex. The key thing that you are missing is that Cisco uses something called "community string indexing" for some MIBs, including BRIDGE-MIB. You can find more information at this link if you are interested. In short, you have to incorporate the VLAN number into the community string in order to view the entries for the ports on that VLAN. So if your community string is public and your port is on VLAN 100, then you would need to use public#100 for your community string in order to see the dot1dBasePortIfIndex for that port.

As #TallChuck pointed out, there's no relationship between those indexes. However for at least Cisco IOS devices, including the one you're working on, you can tie that index of 6 using LLDP-MIB::lldpLocPortDesc (or .1.0.8802.1.1.2.1.3.7.1.4). The fields returned are the full names of the interfaces, and match the fields returned from IF-MIB::ifDescr (or .1.3.6.1.2.1.2.2.1.2)
$snmpwalk -v2c -c community 10.10.10.10 LLDP-MIB::lldpLocPortDesc
LLDP-MIB::lldpLocPortDesc.1 = STRING: GigabitEthernet1/0/1
LLDP-MIB::lldpLocPortDesc.2 = STRING: GigabitEthernet1/0/2
...
$snmpwalk -v2c -c community 10.10.10.10 IF-MIB::ifDescr
IF-MIB::ifDescr.10101 = STRING: GigabitEthernet1/0/1
IF-MIB::ifDescr.10102 = STRING: GigabitEthernet1/0/2
...
So in my case, an LLDP neighbor with an index of 2 can be tied to the switch's interface index 10102 via the string GigabitEthernet1/0/2.
One last note, dot1dBasePortIfIndex is a separate indexing system from LLDP, and only indexes layer2 interfaces. This is probably why you didn't see all interfaces listed.

Related

Change or personalize OID

Finally managed to have my RPI computer module to work with SNMP.
I have a script running that gives me one of my parameters and if I use query using SNMP I get the info back.
pi#raspberrypi:~ $ snmpwalk -v2c -c public localhost NET-SNMP-EXTEND-MIB::nsExtendObjects | grep snmp_status
NET-SNMP-EXTEND-MIB::nsExtendCommand."snmp_status" = STRING: /home/pi/BDC/snmp_status.py
NET-SNMP-EXTEND-MIB::nsExtendArgs."snmp_status" = STRING:
NET-SNMP-EXTEND-MIB::nsExtendInput."snmp_status" = STRING:
NET-SNMP-EXTEND-MIB::nsExtendCacheTime."snmp_status" = INTEGER: 5
NET-SNMP-EXTEND-MIB::nsExtendExecType."snmp_status" = INTEGER: exec(1)
NET-SNMP-EXTEND-MIB::nsExtendRunType."snmp_status" = INTEGER: run-on-read(1)
NET-SNMP-EXTEND-MIB::nsExtendStorage."snmp_status" = INTEGER: permanent(4)
NET-SNMP-EXTEND-MIB::nsExtendStatus."snmp_status" = INTEGER: active(1)
NET-SNMP-EXTEND-MIB::nsExtendOutput1Line."snmp_status" = STRING: 0
NET-SNMP-EXTEND-MIB::nsExtendOutputFull."snmp_status" = STRING: 0
NET-SNMP-EXTEND-MIB::nsExtendOutNumLines."snmp_status" = INTEGER: 1
NET-SNMP-EXTEND-MIB::nsExtendResult."snmp_status" = INTEGER: 0
NET-SNMP-EXTEND-MIB::nsExtendOutLine."snmp_status".1 = STRING: 0
If my unit is in alarm replies with
NET-SNMP-EXTEND-MIB::nsExtendOutLine."snmp_status".1 = STRING: 1
if not in alarm replies with
NET-SNMP-EXTEND-MIB::nsExtendOutLine."snmp_status".1 = STRING: 0
This status is stored in a file and it's parsed to the SNMP using a python script.
Now... next question.
The SNMP server gives me the following OID
.1.3.6.1.4.1.8072.1.3.2.3.1.2.11.115.110.109.112.95.115.116.97.116.117.115
and for each parameter it gives me one very different IOD.
How can I change this for something more easy... like the ones we see on MIB files?
If you are doing it in the command line, use
snmptranslate -m NET-SNMP-EXTEND-MIB .1.3.6.1.4.1.8072.1.3.2.3.1.2.11.115.110.109.112.95.115.116.97.116.117.115
To do it purely programmatically (i.e. without parsing command line output), you will need a way to parse the MIB files. I think such tools probably exist in Python, but I've never used them myself.
More often, I hard-code constants for the OIDs that I'm interested in, and manually inspect the MIB to know how to decode the index for each object. The OID you gave is an instance of NET-SNMP-EXTEND-MIB::nsExtendOutputFull, which belongs to nsExtendOutput1Entry. Normally the *Entry types will have an INDEX field telling you which field is used as the index of that table. In this case, it has an AUGMENTS field instead, which points you to nsExtendConfigEntry. The INDEX fornsExtendConfigEntry is nsExtendToken, which has a type of DisplayString (basically an OCTET STRING that is limited to human-readable characters).
Here's an example of how I would do this in Python -- you'll need pip install snmp:
from snmp.types import OID, OctetString
nsExtendOutputFull = OID.parse(".1.3.6.1.4.1.8072.1.3.2.3.1.2")
oid = OID.parse(".1.3.6.1.4.1.8072.1.3.2.3.1.2.11.115.110.109.112.95.115.116.97.116.117.115")
nsExtendToken = oid.extractIndex(nsExtendOutputFull, OctetString)
print(f"Index = {nsExtendToken}")
Here's the output:
Index = OctetString(b'snmp_status')

How to retrieve and format wifi MAC address in MicroPython on ESP32?

I have the following MicroPython code running on an ESP32:
import network
wlan_sta = network.WLAN(network.STA_IF)
wlan_sta.active(True)
wlan_mac = wlan_sta.config('mac')
print("MAC Address:", wlan_mac) # Show MAC for peering
The output looks like this:
MAC Address: b'0\xae\xa4z\xa7$'
I would like to display it in the more familiar format of six pairs of hex digits, like this:
MAC Address: AABBCC112233
After searching for a solution on the internet, I've tried:
print("MAC Address:", str(wlan_mac)) but it displays the same as when not using str()
print("MAC Address:", hex(wlan_mac)) but it results in TypeError: can't convert bytes to int
print("MAC Address:", wlan_mac.hex()) but it says AttributeError: 'bytes' object has no attribute 'hex'
I am also a little suspicious of the bytes retrieved from wlan_sta.config('mac'). I would have expected something that looked more like b'\xaa\xbb\xcc\x11\x22\x33' instead of b'0\xae\xa4z\xa7$'. The z and the $ seem very out of place for something that should be hexadecimal and it seems too short for what should be six pairs of digits.
So my question is two-fold:
Am I using the correct method to get the MAC address?
If it is correct, how can I format it as six pairs of hex digits?
I am also a little suspicious of the bytes retrieved from wlan_sta.config('mac'). I would have expected something that looked more like b'\xaa\xbb\xcc\x11\x22\x33' instead of b'0\xae\xa4z\xa7$'. The z and the $ seem very out of place for something that should be hexadecimal and it seems too short for what should be six pairs of digits.
You're not getting back a hexadecimal string, you're getting a byte string. So if the MAC address contains the value 7A, then the byte string will contain z (which has ASCII value 122 (hex 7A)).
Am I using the correct method to get the MAC address?
You are!
If it is correct, how can I format it as six pairs of hex digits?
If you want to print the MAC address as a hex string, you can use the
ubinascii.hexlify method:
>>> import ubinascii
>>> import network
>>> wlan_sta = network.WLAN(network.STA_IF)
>>> wlan_sta.active(True)
>>> wlan_mac = wlan_sta.config('mac')
>>> print(ubinascii.hexlify(wlan_mac).decode())
30aea47aa724
Or maybe:
>>> print(ubinascii.hexlify(wlan_mac).decode().upper())
30AEA47AA724
You can use:
def wifi_connect(ssid, pwd):
sta_if = None
import network
sta_if = network.WLAN(network.STA_IF)
if not sta_if.isconnected():
print("connecting to network...")
sta_if.active(True)
sta_if.connect(ssid, pwd)
while not sta_if.isconnected():
pass
print("----------------------------------------")
print("network config:", sta_if.ifconfig())
print("----------------------------------------")
get_my_mac_addr(sta_if)
Then:
def get_my_mac_addr(sta_if):
import ubinascii
import network
wlan_mac = sta_if.config('mac')
my_mac_addr = ubinascii.hexlify(wlan_mac).decode()
my_mac_addr = format_mac_addr(my_mac_addr)
Then:
def format_mac_addr(addr):
mac_addr = addr
mac_addr = mac_addr.upper()
new_mac = ""
for i in range(0, len(mac_addr),2):
#print(mac_addr[i] + mac_addr[i+1])
if (i == len(mac_addr) - 2):
new_mac = new_mac + mac_addr[i] + mac_addr[i+1]
else:
new_mac = new_mac + mac_addr[i] + mac_addr[i+1] + ":"
print("----------------------------------------")
print("My MAC Address:" + new_mac)
print("----------------------------------------")
return new_mac
Return:
----------------------------------------
My MAC Address:xx:xx:xx:xx:xx:xx
----------------------------------------

Get all the values for a single index in snmp

I amb reading the snmp values for a qnap nas, I have three storage with different metrics I'd like to collect, I would like to have a command to get all the values for index=1, but so far I haven't find any snmp command to accomplish it.
volumeID.1 = INTEGER: 1
volumeID.2 = INTEGER: 2
volumeID.3 = INTEGER: 3
volumeCapacity.1 = Counter64: 8716194508
volumeCapacity.2 = Counter64: 8716194508
volumeCapacity.3 = Counter64: 8716194508
volumeFreeSize.1 = Counter64: 3995664864
volumeFreeSize.2 = Counter64: 2783145980
volumeFreeSize.3 = Counter64: 1360632936
volumeStatus.1 = STRING: "Ready"
volumeStatus.2 = STRING: "Ready"
volumeStatus.3 = STRING: "Ready"
volumeSSDCache.1 = INTEGER: -1
volumeSSDCache.2 = INTEGER: -1
volumeSSDCache.3 = INTEGER: -1
I used the command below to get the output shown, but it only reads sequentialy the values I request.
snmpbulkget -m All -v2c -Cn0 -Cr15 -Os -c public nas NAS-MIB::volumeID
This would be also useful for any non-table indexed values
While row-traversal (through the indices) is easy, you have to collect the columns (objects) explicitely, eg.
snmpget ... volumeID.1 volumeCapacity.1 volumeFreeSize.1 ...
(and yes, you can skip the INDEX object volumeID because it's value is just it's index).

decoding the SENDER ID in sms header

I am doing a small SMS receive utility,i have a SMS messages which I can not understand how to decode its sender id, here is the output of reading the message in PDU mode:
+CMGL: 0,1,,86 0791021197003899440ED0657A7A1E6687E93408610192016390004205000365030106440642062F002006270633062A064706440643062A0020064306440020062706440648062D062F0627062A0020062706440645062C06270646064A
and in text mode:
+CMGL: 0,"REC READ","1011161051159710897116",,"16/10/29,10:36:09+00" 06440642062F002006270633062A064706440643062A0020064306440020062706440648062D062F0627062A0020062706440645062C06270646064A
and i read this message through mobile phone and i found that the sender alphanumeric code "1011161051159710897116" is equal to "etisalat" which is the name of service provider, i want to understand what encoding they use. and how to decode it ?
It's encoded as ASCII as decimal semi-octets:
1011161051159710897116 =
101 = &65 = e
116 = &74 = t
105 = &69 = i
115 = &73 = s
97 = &61 = a
108 = &6C = l
97 = &61 = a
116 = &74 = t
To read this from PDU data, you have to swap the semi-octets and if the length is odd you have to add an extra 'F' to make it even to get the proper octet string.
The specs for SMS PDU's can be found here: GSM 03.40

Toner levels using SNMP

I'm trying to get the toner levels from a Brother MCF-9465CDN using SNMP, in order to ultimately plot them in a graph using Munin. I'm not getting ink levels though.
Although I'm a bit new to SNMP, I assume what I'm trying should be possible.
$ snmpwalk -v 2c -c public a.b.c.d .1.3.6.1.2.1.43.11.1.1.6
iso.3.6.1.2.1.43.11.1.1.6.1.1 = STRING: "Black Toner Cartridge"
iso.3.6.1.2.1.43.11.1.1.6.1.2 = STRING: "Cyan Toner Cartridge"
iso.3.6.1.2.1.43.11.1.1.6.1.3 = STRING: "Magenta Toner Cartridge"
iso.3.6.1.2.1.43.11.1.1.6.1.4 = STRING: "Yellow Toner Cartridge"
iso.3.6.1.2.1.43.11.1.1.6.1.5 = STRING: "Waste Toner Box"
iso.3.6.1.2.1.43.11.1.1.6.1.6 = STRING: "Belt Unit"
iso.3.6.1.2.1.43.11.1.1.6.1.7 = STRING: "Drum Unit"
There are some other fields I'd like to monitor, such as the Drum and Belt pages left, on which I have more success: see the last two entries below.
Note that the Toner Cartridges are all reporting "-3", while I'd expect some kind of value I can use there.
$ snmpwalk -v 2c -c public a.b.c.d iso.3.6.1.2.1.43.11.1.1.9.1
iso.3.6.1.2.1.43.11.1.1.9.1.1 = INTEGER: -3
iso.3.6.1.2.1.43.11.1.1.9.1.2 = INTEGER: -3
iso.3.6.1.2.1.43.11.1.1.9.1.3 = INTEGER: -3
iso.3.6.1.2.1.43.11.1.1.9.1.4 = INTEGER: -3
iso.3.6.1.2.1.43.11.1.1.9.1.5 = INTEGER: -3
iso.3.6.1.2.1.43.11.1.1.9.1.6 = INTEGER: 48877
iso.3.6.1.2.1.43.11.1.1.9.1.7 = INTEGER: 15830
The Brother MFC is using the latest firmware version N1.10.
Using the MFC's web page on a.b.c.d I'm able to get an indication (using a bar) with the amount of toner capacity left.
It turns out that the "-3" return messages are expected.
My Brother MFC doesn't return the level of the toner using snmp, but just "full", "almost empty", "empty" or "absent".
See this question/answer on serverfault.

Resources