When adding additional interfaces to a VRF on the CLI, one has to ‘set’ the current list with the additional interfaces rather than just appending the new interfaces to the existing list.
Current:
/ip route vrf set [find routing-mark=EXAMPLE] interfaces=vlan1,vlan2,vlan3
bo2v900v1204 and bo2v951v1204 are already in the VRF and I would like additional interface added to the VRF, which is in this case interface bo1v400v4. If I run the following command, the command is accepted and already existing interfaces are still in the VRF:
/ip route vrf set [ find routing-mark=customer1 ] interfaces="$[ get [ find routing-mark=customer1] interfaces ]"
… but if I try to apply the following command. I get the error that follows.
/ip route vrf set [ find routing-mark=customer1 ] interfaces="$[ get [ find routing-mark=customer1 ] interfaces ],bo1v400v4"
input does not match any value of interface
Works for me, if in your script you try to add new interface to the VRF right after it is created, then make sure that you add some delay or check if interface exist. Interface may not appear right away if CPU has some load.
The VRF is already present before the script execution, also the CPU is running on 1%, it’s barely used CCR1036, so there’s definitely enough processing power. I wish Mikrotik would just add “append” command rather than just set/unset. This solution unfortunately (and surprisingly) doesn’t work for me.
^^^^^^^^^^^^^^^^^----------------
How it can be ??
[admin@FinalFantasy-2(bkp)] /ip route vrf> /ip route vrf set [find routing-mark=clientVRF] interfaces="$[get [find routing-mark=clientVRF] interfaces],pptp-002"
;
input does not match any value of interface
[admin@FinalFantasy-2(bkp)] /ip route vrf>