Netgate SG-1000 microFirewall

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

0 Members and 1 Guest are viewing this topic.

Offline ccmks

  • Jr. Member
  • **
  • Posts: 42
  • Karma: +1/-0
    • View Profile
Auto Throttle on 2nd WAN
« on: February 12, 2018, 07:51:17 pm »
Hello,

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?

Thank you

Offline Derelict

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 9819
  • Karma: +1107/-311
    • View Profile
Re: Auto Throttle on 2nd WAN
« Reply #1 on: February 12, 2018, 09:20:29 pm »
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.
Las Vegas, Nevada, USA
Use this diagram to describe your issue.
The pfSense Book is now available for just $24.70!
Do Not PM For Help! NO_WAN_EGRESSTM

Online Harvy66

  • Hero Member
  • *****
  • Posts: 2324
  • Karma: +213/-12
    • View Profile
Re: Auto Throttle on 2nd WAN
« Reply #2 on: February 15, 2018, 08:57:51 am »
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.