I read topic viewtopic.php?t=133836 but it is locked for new replies.
My setup:
- Ether 1: main Internet connection -- DHCP client from gateway 192.168.1.1. Default route = disabled
- Ether 2: secondary Internet connection (metered/LTE) -- DHCP client from gateway 192.168.2.1. Default route = disabled
- Ether 3 to 5: bridge / LAN ports
My objetive: check if external addresses are reachable in ether1. If not, route WAN to ether2. Re-route back to ether1 when the external addresses become available.
I make the IP Route, following the instructions of previous post:
Adding external addresses via both gateways:
Code: Select all
/ip route
add dst-address=1.1.1.1 gateway=192.168.1.1
add dst-address=8.8.8.8 gateway=192.168.1.1
add dst-address=1.0.0.1 gateway=192.168.2.1
add dst-address=8.8.4.4 gateway=192.168.2.1
Code: Select all
/ip route
add distance=1 gateway=1.1.1.1 check-gateway=ping
add distance=2 gateway=8.8.8.8 check-gateway=ping
add distance=3 gateway=1.0.0.1 check-gateway=ping
add distance=4 gateway=8.8.4.4 check-gateway=ping
Code: Select all
/ip route
add destination=0.0.0.0/0 gateway=192.168.1.1 distance=1
add destination= 0.0.0.0/0 gateway=192.168.2.1 distance=2
The result is:
I see that the second piece of commands (adding external address as routes and checking ping) all marked as unreachable.
If I took out the ether1 cable, MK starts to route thru ether2 correctly. But, I'm not sure that this will happen if the ether1 gateway is there, with no Internet.
So, my question is: am I doing this correctly?
Thank you!