Random OIDs for interfaces

Hello,

I have a CRS326-24S-2Q+ and want to monitor the traffic on the uplink/trunk interfaces.

When I use “/interface/print oid” to display the OIDs via the CLI, I get the OIDs, but the switch starts with 2 and not 1. I have a raw configuration without adding and deleting interfaces.

On another switch - same config, same ROS version (7.18.2 stable) - the OID starts at 1 without doing anything different.

Does any of you know why ROS do this? Is there any way to make the numbering consistent?

On another switch - same config, same ROS version (7.18.2 stable) - the OID starts at 1 without me doing anything different.

Thanks

Interface OIDs are determined at first boot of device based on order of devices seen by kernel (which might be random or influenced by additional devices such as LTE interfaces) and stay consistent after that. Doing factory reset will cause them to be reset again.

You are not supposed to rely on specific OIDs (this goes for both MikroTik as well as other vendors), you should walk them to get interface OID mapped to interface name for each device.