Hi,
I'm trying to set pref-source on specific route on multiple device with the LAN address on each one router but I have problem. When I'm trying with this script nothing it happen.
For example I have:
/ip address
add address=10.0.5.1/24 comment="default configuration" interface=LAN network=10.0.5.0
/ip route
add distance=1 dst-address=10.120.0.0/16 gateway=10.10.10.1
:local langw1 [/ip address get [find interface="LAN"] address];
:local perfsrc1 [/ip route get [find dst-address=10.120.0.0/16 pref-src];
:if ($langw1 != $perfsrc1) do={
/ip route set pref-src=$langw1 [find dst-address=10.120.0.0/16];
}
I want to set 10.0.5.1 for "pref-src" but as variable value because on each one router this value will be different.
Can you help me with this?
Thank you!