pfSense Gold Subscription

Author Topic: Traffic Shaping 90%  (Read 270 times)

0 Members and 1 Guest are viewing this topic.

Offline aadder

  • Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Traffic Shaping 90%
« on: November 21, 2017, 08:07:04 am »
I'm looking of how to traffic shape so total bandwidth used is 90% of the bandwidth.   I'm getting bufferbloat issues otherwise with the latency is spiking to 3K at times.

Internet connection is 60Mbps down / 5Mbps up

Offline Harvy66

  • Hero Member
  • *****
  • Posts: 2209
  • Karma: +204/-12
    • View Profile
Re: Traffic Shaping 90%
« Reply #1 on: November 21, 2017, 10:52:54 am »
The simplest way is to go to your WAN interface and set it to ~5.5Mb or 5500kb and select Codel. Similar for the LAN interface. There are better ways, but you'll probably get your 80/20 with this 1 minute change.

Offline KOM

  • Hero Member
  • *****
  • Posts: 5402
  • Karma: +671/-19
    • View Profile
Re: Traffic Shaping 90%
« Reply #2 on: November 21, 2017, 11:36:35 am »
Sorry to hijack, but in a simple WAN/LAN configuration, do you even need a rule on LAN?  I thought LAN shaping rules were to shape LAN-LAN traffic if you have multiple LAN interfaces.

Offline Animosity022

  • Jr. Member
  • **
  • Posts: 53
  • Karma: +4/-0
    • View Profile
Re: Traffic Shaping 90%
« Reply #3 on: November 21, 2017, 12:20:14 pm »
Sorry to hijack, but in a simple WAN/LAN configuration, do you even need a rule on LAN?  I thought LAN shaping rules were to shape LAN-LAN traffic if you have multiple LAN interfaces.

I thought it was:

WAN - Upload traffic
LAN - Download traffic

Offline KOM

  • Hero Member
  • *****
  • Posts: 5402
  • Karma: +671/-19
    • View Profile
Re: Traffic Shaping 90%
« Reply #4 on: November 21, 2017, 01:19:38 pm »
All shaping is essentially done at WAN since you control the download by managing the ACK replies.

Offline Animosity022

  • Jr. Member
  • **
  • Posts: 53
  • Karma: +4/-0
    • View Profile
Re: Traffic Shaping 90%
« Reply #5 on: November 21, 2017, 01:33:10 pm »
All shaping is essentially done at WAN since you control the download by managing the ACK replies.

If you could explain a bit there as I was trying to make sure I understand how the normal shaping it setup in pfSense.

If you configure the WAN for download and LAN for upload, I've always setup up floating rules which have no interface set. When I check my system logs, I can see things are matching properly on the LAN/WAN side.

If I upload, I can see the queue on my lan interface moving up and down (igb1) and if I download, I can see my wan (igb0) queue moving up and down.

In that setup, I have some inbound rules for incoming traffic and some outgoing rules for outbound traffic.

Offline Harvy66

  • Hero Member
  • *****
  • Posts: 2209
  • Karma: +204/-12
    • View Profile
Re: Traffic Shaping 90%
« Reply #6 on: November 21, 2017, 01:44:10 pm »
Assuming an infinitely long running TCP connection, the only way managing ACKs affects the sender's rate is to delay the ACK to artificially create a larger RTT, which is a horrible idea, mark the ACK via ECN, or drop an incoming packet causing the sender to re-send and backoff.

In practice and especially with more modern TCP stacks, dropping ACKs does not affect peak bandwidth, only the rate at which the bandwidth grows.

Dropping or ECN marking data packets is the official way to signal the sender to back-off.