I tried reaching out to Mikrotik support, but its been 2 weeks with no response. I also searched this forum for any relevant cases to this. I’d even be happy to pay someone to fix this for us.
We have an issue with our CRS354 switch in which it is not sending SNMP data correctly. It is sending the wrong Integer (port number) for interfaces (see attached)
Here is an example with “ether14” port, which has index 28.
root@easydcim:~# snmpwalk -v2c -cSoladrive123 66.xxx.xxx.xxx1.3.6.1.2.1.2.2.1.2.28
iso.3.6.1.2.1.2.2.1.2.28 = STRING: “ether14”
root@easydcim:~# snmpwalk -v2c -cSoladrive123 66.xxx.xxx.xxx 1.3.6.1.2.1.2.2.1.1.28
iso.3.6.1.2.1.2.2.1.1.28 = INTEGER: 28
This is causing our EasyDCIm to get the wrong port number for these interfaces as seen in the attached image. On our other switches the integer number matches the interface or STRING number.
Since the ifIndex is tied to RouterOS item’s .id field (see above *B2 is the .id for an /interface, B2 is hex, so it becomes 178 in decimal/integer, and the .id is determined when an interface is added.
So the order interfaces are added to the config will effect the “port number” (i.e. ifIndex) you’ll see in SNMP. Thus if you remove and the re-add the same interface, it will get a new OID since it has a new .id in the configuration. Or, if the SFP ports are added first, then they be at ifIndex 1 and the starting ifIndex for ethernet be # of SFP ports + 1.
Basically ifIndex is NOT the port number in the sense of if you have ether3, it may or may not be 3 (or even 2) since it’s really the order that things are added to config that can effect SNMP indexes.