ifindex tunnel interface

Hello
I am using VyOS 1.2.0-rolling + 201905050337
I monitor the loading of interfaces using Zabbix via SNMP
I got a problem
After rebooting, the tunnel interface (I have this vtun101) changes ifindex
This makes monitoring difficult.
Can some command fix the ifindex number?

Cisco has a command for this task: mib ifindex persist

thanks

I dont know Zabbix, but if you use LibreNMS, there is other methods to match interfaces to the database. Maybe it is possible in Zabbix aswell? You can use ifName, ifDescr, ifAlias or ifIndex, depending on what works best for you.

vtuns are created at boot time dynamically from the configuration so there isn’t currently a way to make the ifindex persist, however, you should be able to use the vtun name for interface mapping with a properly build template. Edit : You can help prevent the index from changing on tunnel reconnects by using the persistent-tunnel tunnel flag to keep the interface up even when the tunnel is down, however, this will not help on a reboot.

root@UbuntuDockerGuest-1:~# snmpwalk -v2c -c testing 192.168.10.1 | grep vtun0
iso.3.6.1.2.1.2.2.1.2.5 = STRING: “vtun0”
iso.3.6.1.2.1.25.3.2.1.3.262149 = STRING: “network interface vtun0”
iso.3.6.1.2.1.25.4.2.1.5.4269 = STRING: “–daemon openvpn-vtun0 --verb 3 --writepid /var/run/openvpn-vtun0.pid --status /opt/vyatta/etc/openvpn/status/vtun0.status 30 --”
iso.3.6.1.2.1.31.1.1.1.1.5 = STRING: “vtun0”
iso.3.6.1.2.1.31.1.1.1.18.5 = STRING: “vtun0”
iso.3.6.1.2.1.55.1.5.1.2.5 = STRING: “vtun0”

Thanks for this information
I will think and understand