Hi,
I need to get the default route (0.0.0.0/0), from 3 entries, that have no routing-mark. In earlier versions of routerOS the bellow command was working fine:
:put [/ip route find dst-address=0.0.0.0/0 !routing-mark]
<<<< in version 6.7 you can see the answer is blank, i.e., no macth
:put [/ip route find dst-address=0.0.0.0/0]
*15e;*204;*1 <<< 3 routes match
:foreach b in=[/ip route find where dst-address=0.0.0.0/0] do={ :put (“$b”,[/ip route get $b routing-mark],“—”)};
*15e;ft;—
*204;Gazola;—
*1;— <<< There is no routing-mark in route-id “*1” you can see in bellow print command output.
:put [/ip route find dst-address=0.0.0.0/0 routing-mark!=“”] #routes with routing-mark NOT blank
*15e;*204 <<< this comand works and list only routes that have some routing-mark, its opposite should list “id=*1” but dont work
:put [/ip route find dst-address=0.0.0.0/0 routing-mark=“”]
<<< answer is blank, i.e., no macth. Has version 6.7 a bug.
Thanks,
Daniel
---- route print comand output
:put [/ip route print where dst-address=0.0.0.0/0]
0 A S ;;; dst-address=0.0.0.0/0 gateway=x.x.x.x gateway-status=x.x.x.x reachable distance=1 scope=30 target-scope=10 routing-mark=ft
1 A S ;;; dst-address=0.0.0.0/0 gateway=x.x.x.x gateway-status=x.x.x.x reachable distance=1 scope=30 target-scope=10 routing-mark=Gazola
2 A S ;;; dst-address=0.0.0.0/0 gateway=x.x.x.x gateway-status=x.x.x.x reachable distance=1 scope=30 target-scope=10
In future RouterOS everything can stop working. I think they will not change it back to state v6.6 so any other way that works is good. I tested your method and it works also, so… thanks for another alternative!