How to prioritize non-p2p when required



  • Hi all. Sorry the title is a bit vague, I'm not sure of the correct terms to describe what I am trying to achieve.

    I've been a user of pfsense for several years but I've never really played with some of the more advanced features like traffic shaping, which I have no experience of at all. It's more of a learning experience/hobby than anything else and is used in a home environment.

    What I am trying to achieve is to have p2p running at full speed all the time UNLESS other traffic needs to get through, for example VoIP (SIP and whichever protocol a Femtocell uses) or http/browsing being the main ones.

    So for example I would leave my p2p client downloading a file flat out, as soon as another user comes home and wants to browse the internet, it would prioritize their traffic automatically and throttle the p2p at this stage.

    I'm running pfsense 2.1.5 on an Alix 2D3. I've got one WAN connection (5M down/1M up) and one LAN.

    The p2p client is only run from one system. The other users are on DHCP and the rule should apply to anyone within the DHCP scope, preferably without having to manually specify each one (to allow for guests visiting etc).

    Can anyone describe the procedure to enable this, assuming it's possible?



  • The greatest difficulty lies in properly identifying p2p traffic, by which I assume you mean bittorrent. It will just move to any allowed port.

    The fact you have it on only one PC does make shaping/prioritizing possible though.

    The two ways you can go about it are use the Traffic Shaper Wizard and create a PRIQ shaper, then make a floating rule to place all traffic for that p2p PC's IP in the p2p or low priority queue. If it is the only PC using the internet it would be using all your bandwidth. As other PC's started surfing etc. their traffic would get priority over the p2p PC.

    Alternatively setting up a limiter to evenly share the bandwidth among each PC actively using the internet. Only one PC on? It gets all of it. Two? Each gets 1/2 etc. Follow this thread to set it up:
    https://forum.pfsense.org/index.php?topic=63531.msg364520#msg364520

    You can also combine both methods as well which would grant even more control and likely a better experience for those surfing when a p2p download was occurring.


Log in to reply