Prioritizing Critical Traffic on pfSense with the Built‑In Traffic Shaper
Learn how to use pfSense’s Traffic Shaper to give your VoIP or gaming traffic a priority boost while keeping overall bandwidth healthy. Step‑by‑step guide, iperf3 example, and trade‑off warnings.
17 Oct 2025, 00:39 UTC

The Problem: Latency‑Sensitive Traffic on a Shared LAN
In many offices and homes, a single broadband link serves web browsing, file downloads, VoIP, remote gaming, and other services. When a large file download starts, it can consume most of the available bandwidth, causing jitter and packet loss for time‑critical traffic. Administrators often ask: How can I keep my voice calls smooth without cutting off everyone else’s internet?
Why Use the pfSense Traffic Shaper?
pfSense’s Traffic Shaper is a queue‑based scheduler that lets you assign bandwidth limits and priority levels to traffic classes. It is fully supported in every official release, lives in /conf/config.xml, and can be managed through the WebGUI or by editing the XML directly. The shaper supports two scheduling modes:
- Priority – pre‑emptive, best‑effort for high‑priority traffic.
- Fair Queue – shares bandwidth evenly but can be tuned to favor specific classes.
Choosing the right mode and class configuration is key to balancing performance and fairness.
Setting Up a Shaper Queue
- Navigate to
Firewall > Traffic Shaper.- Click Add to create a new queue.
- Give it a descriptive name, e.g.,
VoiceAndGaming. - Set the Bandwidth to the maximum you want to reserve for this queue (e.g., 10 Mbps).
- Choose Priority as the scheduler if you need strict pre‑emptive handling.
- Apply the queue to the interface that carries the traffic (typically
WANor a specific VLAN). Use theApply Queues to Interfacecheckbox. - Save and apply changes.
Defining High‑ and Low‑Priority Classes
- Within the newly created queue, click Add Class.
- Class Name:
HighPriority - Match Criteria: Source/Destination IP (e.g.,
192.168.1.0/24), Destination Port (e.g.,5060for SIP), or Protocol. - Bandwidth: 5 Mbps (half of the queue).
- Priority Level:
1(highest).
- Class Name:
- Add another class for low‑priority traffic.
- Class Name:
LowPriority - Match Criteria: All other traffic (use a catch‑all rule).
- Bandwidth: 5 Mbps.
- Priority Level:
5.
- Class Name:
- Save and apply the configuration.
Testing with iperf3
To verify that the shaper is working, run iperf3 from two client machines on the LAN. The server should be listening on the WAN IP or on a dedicated test interface.
On the Server (any machine with iperf3 installed)
sudo iperf3 -s
Run this as root or with sudo on the machine that will act as the server. No special permissions beyond sudo are required.
On the High‑Priority Client
iperf3 -c 192.168.1.10 -t 30 --set-priority 1
Replace 192.168.1.10 with the server’s IP. The --set-priority 1 flag tags the stream as high priority for pfSense to recognize.
On the Low‑Priority Client
iperf3 -c 192.168.1.10 -t 30
Run this on a second machine without the priority flag.
Observing Results
- In the server’s terminal, you should see two separate results: the high‑priority stream achieving closer to 5 Mbps, and the low‑priority stream limited to the remaining bandwidth.
- In pfSense, navigate to
Status > Traffic Shaperand view the real‑time statistics for theVoiceAndGamingqueue. The high‑priority class should show higher throughput and lower queue depth. - After a reboot, verify that the queue and classes persist by checking
/conf/config.xmlfor theshaperentries.
Trade‑offs and Limitations
- CPU Load: On low‑end routers, enabling many classes can raise CPU usage. Monitor with
htopor pfSense’sStatus > System Logs > System > Traffic Shaper. If CPU > 80 % during heavy traffic, consider simplifying the class hierarchy. - Over‑Granularity: Too many narrow classes can cause unpredictable packet scheduling and may even degrade overall throughput.
- Fair Queue vs. Priority: The default Fair Queue mode may not honor strict priority unless explicitly configured. Use the Priority scheduler for latency‑sensitive applications.
- Mis‑tuned Limits: Setting a bandwidth limit that is too low for a critical service can unintentionally throttle it. Perform baseline tests before deployment.
Actionable Checklist
- Confirm pfSense version:
System > About. - Create a queue named
VoiceAndGamingwith a total bandwidth of 10 Mbps. - Define two classes:
HighPriority(5 Mbps, priority 1) andLowPriority(5 Mbps, priority 5). - Apply the queue to the relevant interface.
- Run iperf3 tests from two clients as described.
- Check queue statistics in
Status > Traffic Shaperto confirm expected throughput. - Verify persistence by inspecting
/conf/config.xmlafter a reboot. - Monitor CPU usage; if high, reduce the number of classes or increase hardware resources.
By following this sequence, you can confidently prioritize VoIP, gaming, or any latency‑sensitive traffic on pfSense while maintaining overall network health.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.