Hi!
I’m trying to use Netwatch to check for the availability of internet connection of cabled and LTE WANs. The intention is to create a failover system.
What I’m trying to do is to route the test hosts used by Netwatch on the right WAN, so that I can be sure that a certain test is done ona specific connection, and reading around I found that I can use VRF to achieve this result… but I’m certainly doing something really wrong, but I don’t know what.
At the moment the system is actually working on checking the WANs, but the final result is that the router and the LAN are always offline anyway.
I try to copy here the configuration I’m using.
The VRF definitions
/ip vrf
add interfaces=WAN_01 name=WAN1_Test
add interfaces=LTE_01 name=WAN2_Test
The host that I use to check the WANs
/ip firewall address-list
add address=9.9.9.9 list=WAN2_Check_Host
add address=1.1.1.1 list=WAN1_Check_Host
add address=208.67.220.220 list=WAN1_Check_Host
add address=216.58.205.36 list=WAN2_Check_Host
/ip firewall mangle
add action=mark-routing chain=output dst-address-list=WAN1_Check_Host new-routing-mark=WAN1_Test passthrough=no
add action=mark-routing chain=prerouting new-routing-mark=WAN1_Test passthrough=no src-address-list=WAN1_Check_Host
add action=mark-routing chain=output dst-address-list=WAN2_Check_Host new-routing-mark=WAN2_Test passthrough=no
add action=mark-routing chain=prerouting new-routing-mark=WAN2_Test passthrough=no src-address-list=WAN2_Check_Host
The routing table
/ip route
add comment="Backup connection [WAN2__LTE]" disabled=yes
distance=1 dst-address=0.0.0.0/0 gateway=LTE_01 routing-table=main scope=
30 suppress-hw-offload=no target-scope=10
add comment="Main connection [WAN1__CableDSL]" disabled=no distance=1
dst-address=0.0.0.0/0 gateway=10.1.0.1%WAN_01 routing-table=main scope=30
suppress-hw-offload=no target-scope=10
add comment="Check route for main connection" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=
10.1.0.1%WAN_01 routing-table=WAN1_Test scope=30 suppress-hw-offload=no
target-scope=10 vrf-interface=WAN_01
add comment="Check route for backup connection" disabled=no distance=10 dst-address=0.0.0.0/0 gateway=LTE_01
routing-table=WAN2_Test scope=30 suppress-hw-offload=no target-scope=10
vrf-interface=LTE_01
The Netwatch configuration
/tool netwatch
add disabled=no down-script="" host=1.1.1.1@WAN1_Test http-codes="" interval=
15s name=WAN1 port=53 startup-delay=30s test-script="" timeout=1s type=
tcp-conn up-script=""
add disabled=no dns-server=9.9.9.9 down-script="" host=9.9.9.9@WAN2_Test
http-codes="" interval=15s name=WAN2 port=53 startup-delay=30s
test-script="" thr-tcp-conn-time=999us timeout=1s type=simple up-script=
""
add disabled=no dns-server=9.9.9.9 down-script="" host=
216.58.205.36@WAN2_Test http-codes="" interval=15s name=WAN2B port=443
startup-delay=0s test-script="" timeout=1s type=tcp-conn up-script=""
add disabled=no down-script="" host=208.67.220.220@WAN1_Test http-codes=""
interval=15s name=WAN1B port=53 startup-delay=30s test-script="" timeout=
1s type=tcp-conn up-script=""
I played a little and I understood (maybe wrongly) that when an interface is assigned to a VRF cannot be used for another one, but I don’t know how solve this, because I think I need the interface to check the hosts AND to let the router and the LAN go online… I’m actually a bit confused. ![]()
As usual, any suggestion is really appreciated!
Denis