cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
488
Views
0
Helpful
1
Replies

RV340 force to use a specific WAN when connecting to a specific IP

HikariWS
Beginner
Beginner

Hello eveybody.

I have a RV340 load balancing 2 ISPs. I wanna monitor each of these ISP's availability.

 

The issue is that neither of them have, ALAIK, some host that's only accessible from inside their intranet. It means that if I simply use a monitoring tool based on ping and point to some of their IPs, if they go offline RV340 will use the other ISP and ping will succeed.

 

I'd need a way to set RV340 so that any ping (or any other monitoring tool that runs on linux) sent to a specific IP should always use WAN1, and another IP always use WAN2. If WAN1 goes down, pings to IP1 will fail, and monitoring tool will record that ISP is down.

 

Is there any way to accomplish that?

1 Reply 1

HikariWS
Beginner
Beginner

I've found a possible solution, but it's not working properly. I found this bash script on linux

if fping -c 1 -t 5 ISP1-IP &> /dev/null
then
  echo 1
else
  echo 0
fi

fping is similar to ping, but fit for scripts. -c 1 makes it send a unique ping and -t 5 makes it timeout in 5ms. ISP1-IP is an IP on ISP1's intranet that's the closest to me.

Pinging this IP through ISP1 is much quicker than through ISP2. If RV340 sends this ping from WAN1 it succeeds and if sent from WAN2 it fails. This way I can create some monitoring.

 

The problem is that RV340 is always using WAN1 for all pings. This makes the same code for ISP2's IP to always go through ISP1, and always fail.

 

I double checked and WAN > Mult-WAN has WAN1 and WAN2 both with precedence 1 and percentage 50%. Why are all pings going through WAN1, even when WAN2 is closer?

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Recognize Your Peers