Community discussions

MikroTik App
 
Askel
just joined
Topic Author
Posts: 4
Joined: Fri Sep 17, 2021 2:33 pm

Number interface in snmp

Thu Dec 01, 2022 10:06 am

How to renumber an interface in snmp?
Image
You do not have the required permissions to view the files attached to this post.
 
tdw
Forum Guru
Forum Guru
Posts: 1841
Joined: Sat May 05, 2018 11:55 am

Re: Number interface in snmp

Thu Dec 01, 2022 2:22 pm

SNMP typically reports an interface index provided by the underlying OS, or from how it has built its index whilst enumerating the interfaces. There is no mechanism with SNMP to change this.
 
Askel
just joined
Topic Author
Posts: 4
Joined: Fri Sep 17, 2021 2:33 pm

Re: Number interface in snmp

Thu Dec 01, 2022 3:58 pm

Enumerating the interfaces in underlying OS

Image

Numbering does not match.
You do not have the required permissions to view the files attached to this post.
 
tdw
Forum Guru
Forum Guru
Posts: 1841
Joined: Sat May 05, 2018 11:55 am

Re: Number interface in snmp

Thu Dec 01, 2022 4:07 pm

The UI interface index is not the same, see what you get from /interface print oid - the final octet of the OIDs are the SNMP interface index.
 
Askel
just joined
Topic Author
Posts: 4
Joined: Fri Sep 17, 2021 2:33 pm

Re: Number interface in snmp

Fri Dec 02, 2022 7:03 am

0 R name=.1.3.6.1.2.1.2.2.1.2.1
1 S name=.1.3.6.1.2.1.2.2.1.2.7
2 S name=.1.3.6.1.2.1.2.2.1.2.3
3 RS name=.1.3.6.1.2.1.2.2.1.2.4
4 S name=.1.3.6.1.2.1.2.2.1.2.5
5 R name=.1.3.6.1.2.1.2.2.1.2.2
6 R name=.1.3.6.1.2.1.2.2.1.2.10
7 RS name=.1.3.6.1.2.1.2.2.1.2.9
8 R name=.1.3.6.1.2.1.2.2.1.2.8
9 R name=.1.3.6.1.2.1.2.2.1.2.6
Can this be changed?
 
tdw
Forum Guru
Forum Guru
Posts: 1841
Joined: Sat May 05, 2018 11:55 am

Re: Number interface in snmp

Fri Dec 02, 2022 3:45 pm

No directly. As mentioned before Mikrotik builds an index whilst enumerating interfaces - each new interface is assigned a sequentially increasing value which does not change.

It is odd that the ethernet interfaces are not sequential as they would be discovered after a factory reset and cannot be removed via the UI, for example:
RB750Gr2 ifIndex 1-5=ether1-5
RB850Gx2 ifIndex 1-5=ether1-5
RB960PGS ifIndex 1-5=ether1-5, 6=sfp1
RB3011UiAS ifIndex 1-5=ether1-5, 6=sfp1, 7-11=ether6-10

Who is online

Users browsing this forum: baragoon, duartev and 84 guests