Code: Select all
:foreach i in [/ip route find dynamic=yes] do={
/ip route add copy-from=$i distance=100 check-gateway=no
}
If i am not wrong it was working because in front of the dynamic routes there were numbers in front of every route static or dynamic route....
Ros V6.x
Code: Select all
# DST-ADDRESS PREF-SRC GATEWAY DISTANCE
0 A S 0.0.0.0/0 10.188.x.x 1
1 ADC 10.188.x.0/24 10.188.x.x ether1 0
Ros V7.x
But in version 7 it only has numbers in the static routes and not in the dynamic...
Code: Select all
# DST-ADDRESS GATEWAY DISTANCE
0 Xs 10.188.x.x/32 172.31.x.x 100
1 As 0.0.0.0/0 85.x.x.x 1
DAb 10.0.0.0/8 172.x.x.x 20
DAb 10.0.0.0/24 172.x.x.x 20
Can anyone tell me how can i edit this script to work in Ros7.