ifindex tunnel interface

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


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 | grep vtun0
iso. = STRING: “vtun0”
iso. = STRING: “network interface vtun0”
iso. = STRING: “–daemon openvpn-vtun0 --verb 3 --writepid /var/run/openvpn-vtun0.pid --status /opt/vyatta/etc/openvpn/status/vtun0.status 30 --”
iso. = STRING: “vtun0”
iso. = STRING: “vtun0”
iso. = STRING: “vtun0”

Thanks for this information
I will think and understand