Author
Topic: Auto Throttle on 2nd WAN (Read 93 times)

I currently have 2 ISP and has NAS behind pfSense. The NAS is constantly uploading large amount of GB to cloud for 24 hours. During normal condition, the NAS is using WAN1 to upload the data whereas the rest of network is using WAN2. However, some time, the connection on WAN1 is not stable or down and NAS is automatically fail over to WAN2 to continue to upload the data.

During the time where the WAN1 is down, the NAS is taking all of the upload bandwidth on WAN2 which cause the rest of network unable to surf internet.

Question is, how can I make auto throttle for NAS, let's say to limit up to 1 Mbps connection when the fail over happening but I don't want throttle when the connection is normal for WAN1?

As long as you are running a current version (that doesn't stop processing traffic when limiters are enabled on interfaces with NAT), you could put a limiter on the second WAN.

You would likely have to use a technique such as marking the traffic then matching it with a floating rule to get the limiter to only apply when one WAN is in use. Search for NO_WAN_EGRESS for an idea of that technique.

If you wanted to use altq you could set something like a PRIQ on WAN with a bandwidth lower than the upload speed and set that queue using the same technique. But then you'd have to set a default queue. But if you set a default queue to just under the upload speed at a higher priority then put the NAS traffic at a lower priority that might fix your issues while allowing full upload speed from the NAS when there wasn't any other traffic.

Unstable Internet during saturation is symptom, not a cause. I let Bittorrent consume 99% of my bandwidth with no ill effects.

I recommend trying to enable FairQ on your WAN interfaces, set your bandwidth to some value less than 100%, start with 80%, and enable Codel on the child queue. Just a few check boxes and like 2 minutes to setup. If that isn't good enough for you, look into fq_Codel limiters.