I do not understand the script that is inserted in script down in the profile will have to remove the ppp interface in /ip route vrf. I made a description of what the script should do but I think there is something in it that is not working properly because the remaining error should no longer be present when the script applies. I put you the script in question if you have an idea I'm interested.
This script is used by dozens of operators in France with whom I am a partner and whose solution we are looking for.
Script down in profil :
:local localAddr $"local-address"
:local remoteAddr $"remote-address"
:local callerId $"caller-id"
:local calledId $"called-id"
:local interfaceName [/interface get $interface name]
:local calledRealm PI-VRF-4G:local vrfId [/ip route vrf find where routing-mark=$calledRealm]
:delay 2
/ip route vrf print terse file=($calledRealm."CleanUpMembersSec") where routing-mark=$calledRealm
:local cleanUpVrfIfsSec [/file get ($calledRealm."CleanUpMembersSec") contents] ;
:local cleanUpExistentIfsSec ([:pick $cleanUpVrfIfsSec ([:find $cleanUpVrfIfsSec "interfaces=" ]+11) ([:find $cleanUpVrfIfsSec F00 ] -2)]. \
[:pick $cleanUpVrfIfsSec ([:find $cleanUpVrfIfsSec F00 ] + 6) ([:find $cleanUpVrfIfsSec "route-distinguisher=" ]-1)])
:put $cleanUpExistentIfsSec
/ip route vrf set $vrfId interfaces="$cleanUpExistentIfsSec"
/file set ($calledRealm."CleanUpMembersSec") contents=""
/file set ($calledRealm."Members") contents=""
/ip route vrf print terse file=($calledRealm."Members") where routing-mark=$calledRealm
This Mikrotik script runs on a Mikrotik router and performs the following actions:
Defining variables: The script defines several local variables to store information such as local address, remote address, caller ID, callee ID, interface name, name of the called reality and the identifier of the VRF (Virtual Routing and Forwarding).
Retrieving information about VRF interfaces: The script uses the "/ip route vrf print terse" command to retrieve information about the current interfaces in the called VRF. The results are saved in a file called "CleanUpMembersSec".
Modification of VRF interfaces: The script uses the "/ip route vrf set" command to define the interfaces associated with the called VRF. The script extracts information about VRF interfaces from the "CleanUpMembersSec" file.
File update: The script uses the "/file set" command to dump the files that contain the VRF interface information.
Basically, this script changes the interfaces associated with the called VRF by removing all information about previous VRF interfaces.