I have policy based routing that routes all my DNS and HTTP(S) traffic via a pppoe interface. Some times this (ADSL) pppoe connection goes down and when it does I need to disable the default route with the routing mark for those packets.
My problem is I do not know how to read the interface status. I can write the script here, the way I think it should work, if someone can just help me by pointing me in the right direction regarding the interface status.
Here is my idea: (my syntax will be completely off)
:global ppp_int [/find interface name "pppoe-to-my-isp]
8 X chain=prerouting action=mark-routing new-routing-mark=route-via-adsl passthrough=no protocol=udp in-interface=Ethernet2 dst-port=53
9 X chain=prerouting action=mark-routing new-routing-mark=route-via-adsl passthrough=no protocol=tcp dst-address-list=!bypass-http-routes in-interface=Ethernet2 dst-port=80
And here is my default route for it (the pppoe does not get the default route added when it connects)
For some reason in console the /ip route print command does not show the packet mark, but it is there.