<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://mediawiki.comfac.net/index.php?action=history&amp;feed=atom&amp;title=Training_Lab_9%3A_Traffic_Shaping</id>
	<title>Training Lab 9: Traffic Shaping - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mediawiki.comfac.net/index.php?action=history&amp;feed=atom&amp;title=Training_Lab_9%3A_Traffic_Shaping"/>
	<link rel="alternate" type="text/html" href="https://mediawiki.comfac.net/index.php?title=Training_Lab_9:_Traffic_Shaping&amp;action=history"/>
	<updated>2026-06-05T11:00:28Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://mediawiki.comfac.net/index.php?title=Training_Lab_9:_Traffic_Shaping&amp;diff=244&amp;oldid=prev</id>
		<title>Justinaquino: Imported from FUND001-LIVE-Lab9-TrafficShaping.pdf</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.comfac.net/index.php?title=Training_Lab_9:_Traffic_Shaping&amp;diff=244&amp;oldid=prev"/>
		<updated>2026-04-23T07:10:26Z</updated>

		<summary type="html">&lt;p&gt;Imported from FUND001-LIVE-Lab9-TrafficShaping.pdf&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;__NOTOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background:#005500; color:white; padding:12px; border-radius:6px; margin-bottom:16px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Netgate pfSense Plus Fundamentals — Lab 9: Traffic Shaping&amp;#039;&amp;#039;&amp;#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;Training lab manual: FUND001-LIVE-Lab9-TrafficShaping.pdf&amp;lt;/small&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
This lab covers limiters and traffic shaping at an introductory level.&lt;br /&gt;
&lt;br /&gt;
We will configure limiters to restrict HQ LAN hosts to &amp;#039;&amp;#039;&amp;#039;2 Mb down / 512 Kb up&amp;#039;&amp;#039;&amp;#039;. The mask option of limiters is used to configure this limit on a &amp;#039;&amp;#039;&amp;#039;per-IP basis&amp;#039;&amp;#039;&amp;#039; — so each IP in the LAN gets its own 2 Mb down, 512 Kb up pipe.&lt;br /&gt;
&lt;br /&gt;
== Understanding Limiter Direction ==&lt;br /&gt;
&lt;br /&gt;
Limiters are applied to firewall rules by specifying them under &amp;#039;&amp;#039;&amp;#039;In&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;Out&amp;#039;&amp;#039;&amp;#039; in the advanced options. The direction of traffic is from the perspective of that interface of the firewall.&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Traffic coming into the LAN NIC&amp;#039;&amp;#039;&amp;#039; = upload traffic&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Traffic leaving the LAN NIC&amp;#039;&amp;#039;&amp;#039; = download traffic&lt;br /&gt;
&lt;br /&gt;
The mask of limiters can be configured on a &amp;#039;&amp;#039;&amp;#039;source address&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;destination address&amp;#039;&amp;#039;&amp;#039; basis:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Limiter !! Mask Setting !! Reason&lt;br /&gt;
|-&lt;br /&gt;
| Download (2M-down) || Destination addresses || Traffic leaving the LAN interface has internal clients&amp;#039; IPs as the destination.&lt;br /&gt;
|-&lt;br /&gt;
| Upload (512K-up) || Source addresses || Traffic entering the LAN interface is sourced from internal clients&amp;#039; IPs.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Configuring Limiters ==&lt;br /&gt;
&lt;br /&gt;
On &amp;#039;&amp;#039;&amp;#039;fw1-HQ&amp;#039;&amp;#039;&amp;#039;, browse to &amp;#039;&amp;#039;&amp;#039;Firewall → Traffic Shaper → Limiters&amp;#039;&amp;#039;&amp;#039; tab. Click &amp;#039;&amp;#039;&amp;#039;New Limiter&amp;#039;&amp;#039;&amp;#039; to add a new limiter.&lt;br /&gt;
&lt;br /&gt;
=== Download Limiter ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Setting !! Value&lt;br /&gt;
|-&lt;br /&gt;
| Name || 2M-down&lt;br /&gt;
|-&lt;br /&gt;
| Enable || (checked)&lt;br /&gt;
|-&lt;br /&gt;
| Bandwidth || 2 Mbit/s&lt;br /&gt;
|-&lt;br /&gt;
| Mask || Destination addresses&lt;br /&gt;
|-&lt;br /&gt;
| Description || 2 Mb down per-IP&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Leave the remainder at defaults and click &amp;#039;&amp;#039;&amp;#039;Save&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== Upload Limiter ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Setting !! Value&lt;br /&gt;
|-&lt;br /&gt;
| Name || 512K-up&lt;br /&gt;
|-&lt;br /&gt;
| Enable || (checked)&lt;br /&gt;
|-&lt;br /&gt;
| Bandwidth || 512 Kbps&lt;br /&gt;
|-&lt;br /&gt;
| Mask || Source addresses&lt;br /&gt;
|-&lt;br /&gt;
| Description || 512 Kb up per-IP&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Leave the remainder at defaults, click &amp;#039;&amp;#039;&amp;#039;Save&amp;#039;&amp;#039;&amp;#039;, then &amp;#039;&amp;#039;&amp;#039;Apply Changes&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
== Applying Limiters to Firewall Rules ==&lt;br /&gt;
&lt;br /&gt;
Just configuring the limiters doesn&amp;#039;t make them active. They must be assigned to a firewall rule to be applied.&lt;br /&gt;
&lt;br /&gt;
# Browse to &amp;#039;&amp;#039;&amp;#039;Firewall → Rules → LAN&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
# Edit the &amp;#039;&amp;#039;&amp;#039;&amp;quot;Default allow LAN to any&amp;quot;&amp;#039;&amp;#039;&amp;#039; rule.&lt;br /&gt;
# Scroll down under &amp;#039;&amp;#039;&amp;#039;Advanced&amp;#039;&amp;#039;&amp;#039;, and click the &amp;#039;&amp;#039;&amp;#039;Advanced&amp;#039;&amp;#039;&amp;#039; button to the right of &amp;#039;&amp;#039;&amp;#039;In/Out&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
# For the &amp;#039;&amp;#039;&amp;#039;In&amp;#039;&amp;#039;&amp;#039; limiter, choose &amp;#039;&amp;#039;&amp;#039;512K-up&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
# For the &amp;#039;&amp;#039;&amp;#039;Out&amp;#039;&amp;#039;&amp;#039; limiter, choose &amp;#039;&amp;#039;&amp;#039;2M-down&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
# Click &amp;#039;&amp;#039;&amp;#039;Save&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;Apply Changes&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Back at the LAN firewall rules screen, you&amp;#039;ll see the &amp;#039;&amp;#039;&amp;#039;(a)&amp;#039;&amp;#039;&amp;#039; icon to the left of the default LAN rule, meaning one or more advanced options are specified on that rule. Hover your mouse cursor over that button to see what is configured.&lt;br /&gt;
&lt;br /&gt;
== Testing Limiters ==&lt;br /&gt;
&lt;br /&gt;
# Pull up &amp;#039;&amp;#039;&amp;#039;Status → Traffic Graph → WAN&amp;#039;&amp;#039;&amp;#039; on fw1-HQ.&lt;br /&gt;
# Run a speed test (e.g., speedtest.net).&lt;br /&gt;
# You should see speeds of approximately &amp;#039;&amp;#039;&amp;#039;2 Mb down, 512 Kb up&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
== Traffic Shaper Basic Configuration (Wizard) ==&lt;br /&gt;
&lt;br /&gt;
In this section we configure a basic traffic shaping setup prioritizing VoIP over all else at the branch location (fw1-branch).&lt;br /&gt;
&lt;br /&gt;
=== Wizard Setup ===&lt;br /&gt;
&lt;br /&gt;
# Browse to &amp;#039;&amp;#039;&amp;#039;Firewall → Traffic Shaper → Wizards&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
# Choose &amp;#039;&amp;#039;&amp;#039;traffic_shaper_wizard_multi_all.xml&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
# At the first screen, specify &amp;#039;&amp;#039;&amp;#039;1&amp;#039;&amp;#039;&amp;#039; for the number of WAN and LAN connections and click &amp;#039;&amp;#039;&amp;#039;Next&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
# Choose &amp;#039;&amp;#039;&amp;#039;PRIQ&amp;#039;&amp;#039;&amp;#039; for both download and upload schedulers.&lt;br /&gt;
# Specify connection bandwidth as &amp;#039;&amp;#039;&amp;#039;100 Mbit/s&amp;#039;&amp;#039;&amp;#039; upload and download.&lt;br /&gt;
# Click &amp;#039;&amp;#039;&amp;#039;Next&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
# Check &amp;#039;&amp;#039;&amp;#039;&amp;quot;Prioritize Voice over IP traffic&amp;quot;&amp;#039;&amp;#039;&amp;#039;. Fill in &amp;#039;&amp;#039;&amp;#039;128 Kbit/s&amp;#039;&amp;#039;&amp;#039; for upload and download bandwidth (not actually used with PRIQ).&lt;br /&gt;
# Click &amp;#039;&amp;#039;&amp;#039;Next&amp;#039;&amp;#039;&amp;#039; three times past penalty box, peer-to-peer networking, and network games.&lt;br /&gt;
# At the &amp;#039;&amp;#039;&amp;#039;&amp;quot;Raise or lower other applications&amp;quot;&amp;#039;&amp;#039;&amp;#039; screen, enable it and choose &amp;#039;&amp;#039;&amp;#039;VNC&amp;#039;&amp;#039;&amp;#039; as higher priority.&lt;br /&gt;
# Click &amp;#039;&amp;#039;&amp;#039;Finish&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
== Reviewing Firewall Rule Shaping Configuration ==&lt;br /&gt;
&lt;br /&gt;
Browse to &amp;#039;&amp;#039;&amp;#039;Firewall → Rules → Floating&amp;#039;&amp;#039;&amp;#039; to see the traffic shaper rules added by the wizard. These are match rules which specify the appropriate queue for each type of traffic.&lt;br /&gt;
&lt;br /&gt;
* The VoIP traffic classification ends up as a rule matching all UDP traffic from any source to any destination, with queue &amp;#039;&amp;#039;&amp;#039;qVoIP&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
* All traffic not matching a floating rule specifying a queue will go into the &amp;#039;&amp;#039;&amp;#039;default queue&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
== Reviewing Shaper Queue Configuration ==&lt;br /&gt;
&lt;br /&gt;
Browse to &amp;#039;&amp;#039;&amp;#039;Firewall → Traffic Shaper&amp;#039;&amp;#039;&amp;#039;. The &amp;#039;&amp;#039;&amp;#039;By Interface&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;By Queue&amp;#039;&amp;#039;&amp;#039; tabs both show configured queues (two different layouts of the same data).&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;By Queue&amp;#039;&amp;#039;&amp;#039; is typically used for manual configuration.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;By Interface&amp;#039;&amp;#039;&amp;#039; is the standard review view.&lt;br /&gt;
* You can click &amp;#039;&amp;#039;&amp;#039;&amp;quot;Remove Shaper&amp;quot;&amp;#039;&amp;#039;&amp;#039; on the &amp;#039;&amp;#039;&amp;#039;By Interface&amp;#039;&amp;#039;&amp;#039; tab to remove and disable traffic shaping.&lt;br /&gt;
&lt;br /&gt;
== Testing and Checking Status ==&lt;br /&gt;
&lt;br /&gt;
# Reset all states: &amp;#039;&amp;#039;&amp;#039;Diagnostics → States → Reset States&amp;#039;&amp;#039;&amp;#039; tab → click &amp;#039;&amp;#039;&amp;#039;Reset&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
# Browse to &amp;#039;&amp;#039;&amp;#039;Status → Queues&amp;#039;&amp;#039;&amp;#039; and monitor while generating traffic.&lt;br /&gt;
# Run a speed test — the speed test traffic will fall into the &amp;#039;&amp;#039;&amp;#039;default queue&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
== Generating SIP Traffic ==&lt;br /&gt;
&lt;br /&gt;
Use &amp;#039;&amp;#039;&amp;#039;SIPp&amp;#039;&amp;#039;&amp;#039; on the test systems:&lt;br /&gt;
&lt;br /&gt;
On &amp;#039;&amp;#039;&amp;#039;remote-host&amp;#039;&amp;#039;&amp;#039; (100.64.0.50):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
training@remote-host:~$ sipp -sn uas&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On &amp;#039;&amp;#039;&amp;#039;branch-client&amp;#039;&amp;#039;&amp;#039; (172.18.1.100):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
training@branch-client:~$ sipp -sn uac 100.64.0.50&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These commands initiate 10 SIP calls per second indefinitely. View &amp;#039;&amp;#039;&amp;#039;Status → Queues&amp;#039;&amp;#039;&amp;#039; while running to see traffic in the VoIP queue.&lt;br /&gt;
&lt;br /&gt;
== Long-term Monitoring ==&lt;br /&gt;
&lt;br /&gt;
When traffic shaping is enabled, RRD graphs include queue statistics and queue drops.&lt;br /&gt;
&lt;br /&gt;
# Browse to &amp;#039;&amp;#039;&amp;#039;Status → Monitoring&amp;#039;&amp;#039;&amp;#039; and click the wrench icon.&lt;br /&gt;
# For &amp;#039;&amp;#039;&amp;#039;Left Axis&amp;#039;&amp;#039;&amp;#039;, choose &amp;#039;&amp;#039;&amp;#039;Queues&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
# The &amp;#039;&amp;#039;&amp;#039;Queue Drops&amp;#039;&amp;#039;&amp;#039; graph shows packets dropped from each queue.&lt;br /&gt;
&lt;br /&gt;
Ideally, you want to see &amp;#039;&amp;#039;&amp;#039;0 drops&amp;#039;&amp;#039;&amp;#039; across all high-priority queues, with drops limited to lower or default priority traffic.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background:#f0f8ff; padding:10px; border-left:4px solid #005500;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Previous Module:&amp;#039;&amp;#039;&amp;#039; [[Training:_Traffic_Shaping|Section 9 — Traffic Shaping (Slides)]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Source Attribution ==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Document:&amp;#039;&amp;#039;&amp;#039; FUND001-LIVE-Lab9-TrafficShaping.pdf&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Course:&amp;#039;&amp;#039;&amp;#039; pfSense Plus Fundamentals and Practical Applications&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Copyright:&amp;#039;&amp;#039;&amp;#039; © 2021 Rubicon Communications, LLC (Netgate)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Extracted and formatted for internal training wiki.&amp;#039;&amp;#039;&amp;#039;&lt;/div&gt;</summary>
		<author><name>Justinaquino</name></author>
	</entry>
</feed>