How to give priority to IP having variable downlink bandwidth

  • Hello,

    I'm using pfSense 1.2.2 and I would like to give download priority to a pool of IPs of my LAN.
    Such privileged pool should get all available bandwidth over other IPs.
    WAN interface is connected to satellite link with nominal bandwidth of 1024Kb down/256 Kb up.

    The problem I face is that actual (down) bandwidth of satellite link changes over time.
    Download bandwidth floats between ~250Kb/s and 1024Kb/s.
    Under such conditions, the pool of privileged IPs does not get whole bandwidth as I would.

    Configuration I tried is like the following:

    • Aliases
      hi_pri_ips: <list of="" ips="">+ Traffic Shaper
    • Queues

    –- qwanRoot (HFSC, pri 0, 256Kbit/sec)
    ----- qwandef (default, HFSC, pri 1, band 5%, real m2 1%)
    ----- qwanacks (ACK, HFSC, pri 7, band 25%, real m2 10%)
    ----- qPriorityUp (HFSC, pri 6, band 50%)

    --- qlanRoot (1024Kbit/sec)
    ----- qlandef (default, HSFC, pri 1, band 5%, real m2 1%)
    ----- qlanacks (ACK, HFSC, pri 7, band 25%, real m2 10%)
    ----- qPriorityDown (HFSC, pri 6, band 50%)

    • Rules

    If          Proto  Source          Destination    Target
    LAN -> WAN  *      hi_pri_ips      *              qPriorityUp/qPriorityDown
    WAN -> LAN  *      *              hi_pri_ips      qPriorityDown/qPriorityUp

    I'm new to pfSense, so I do not know if I'm configuring traffic shaper in a completely stupid fashion or what I want to achieve is not possible using HFSC scheduler
    As far as I understood, HFSC is the only scheduler supported by 1.2.2 version. Is that correct?

    Any help or clue is really appreciated.
    Many thanks in advance.


  • if you remove the m1 parameters from the other queues it will behave that way.

  • Just to add up.
    You can set the m2 parameter to 90% of the priority queue and that way it will guarantess that all traffic on this queue get passed before other traffic.

  • Thanks for the reply.

    I didn't set m1 at all in any queue. Also setting m2 to 90% does not help in my use case.

    These days I experimented with pf and pfSense to better understand how things work.
    AFAICT, the problem looks related to the fact that my satellite actual (downlink) bandwidth changes, and it goes under the value I set for qlanRoot queue.

    Here is my current configuration (taken from /tmp/rules.debug):

    altq on bge1 hfsc bandwidth 256Kb queue { qwanRoot }
    altq on bge0 hfsc bandwidth 900Kb queue { qlanRoot }

    queue qwanRoot bandwidth 256Kb priority 0 hfsc { qwandef, qwanacks, qPriorityUp }
    queue qlanRoot bandwidth 900Kb priority 0 hfsc { qlandef, qlanacks, qPriorityDown }
    queue qwandef bandwidth 5% priority 1 hfsc (  default realtime 1% )
    queue qlandef bandwidth 5% priority 1 hfsc (  default realtime 1% )
    queue qwanacks bandwidth 15% priority 7 hfsc (  realtime 10% )
    queue qlanacks bandwidth 15% priority 7 hfsc (  realtime 10% )
    queue qPriorityDown bandwidth 80% priority 6 hfsc (  realtime 50% )
    queue qPriorityUp bandwidth 80% priority 6 hfsc (  realtime 50% )

    When actual downlink bandwidth is higher then 900Kb, everything works as I expect.
    If bandwidth drops under 900Kb, whole band is shared fairly between all hosts (privileged and not).
    And my satellite link bw changes a lot during the day or upon dish position (yes, it's a mobile dish). BW goes from ~300 to 1024 Kbit/s

    What I'm going to try is to dynamically evaluate actual link bw and reconfiguring queues bandwidth on the fly.

  • If you are willing to sponsor this i might be interested in implementing something for this.

  • Sponsoring is ok for me (I need to investigate with my sponsor though :-)).
    Gui integration is not strictly required too (even if it would be better).

    The issue I see is that I need a working solution by this week. Would that be feasible?

  • check your pm.

Log in to reply