Page 1 of 1

routing via a specific wan not working

Posted: Sun Dec 11, 2016 9:34 pm
by rviteri
Hello all,

I am trying to use netwatch to monitor a WAN connection. To accomplish this I had the following configuration that used to work but now it does not.

1. I created a static route to 8.8.4.4 (google dns) via WAN1
2. had a netwatch script that checks for 8.8.4.4 connectivity

This worked like a champ but now, I just get a bunch of timeouts and host unreacheable when pinging.

Please help

Re: routing via a specific wan not working

Posted: Fri Dec 16, 2016 11:47 am
by Van9018
Ah, your WAN1 must be offline :D

When using Tools > Ping and the response is host unreachable or destination unreachable, the host column should display the IP that is reporting the inability to route the packet. Could be wan1's IP?

Your static route entry should be 8.8.4.4/32, Gateway: <IP of WAN1 Gateway>

If your entry's gateway is WAN1 instead of WAN1's gateway IP, then you'll get timeouts and host unreachables. This is because when using an interface name, you are telling the router that 8,8,4,4 exists on that ethernet. So the router will do an ARP lookup on that network to see who has 8.8.4.4. Nobody on that ethernet does.

If WAN1 has a dynamic IP, your gateway may change and thus invalidate your static route. You'll also get timeouts and unreachables in this case. You would need a script to frequently check if your WAN1 ip has changed, and update the static route with the new gateway IP of wan1.