Traffic Shaper Theory
The available bandwidth is forcibly divided into "pipes". Traffic may be buffered into a pipe by one of a series of "queues". Finally, "Rules" define what kind of traffic is directed into which queue or pipe.
It looks something like this.
Flow diagram describing the m0n0wall traffic shaper
The theory behind traffic shaping is fairly simple. You will create several "pipes" which are essentially separate paths through the router. Each pipe is assigned a certain slice of the available bandwidth. In my case, I have two pipes for outbound traffic and one for inbound traffic.
m0n0wall traffic shaper pipes menu
The sum of the bandwidth assigned to all the outbound pipes should be slightly less than your worst measured outbound connection speed. By doing this, you ensure that you will never actually saturate your outbound connection. As long as the connection is not saturated, the router is the defining factor in what traffic gets out first.
In addition to the pipes, you also establish queues within the router. Queues let you assign varying priorities to different types of traffic. Each queue can be directed to a specific pipe and assigned a "weight".
m0n0wall traffic shaper queues menu
Queues, by their nature, are buffers to handle traffic that is being delayed as it is passes through the router. You can select to direct VOIP traffic directly into a pipe, with no associated queue. This will assure minimum latency for VOIP traffic.
Traffic shaper rules are created to direct traffic based upon the properties you select. A rule can direct all traffic from a specific source or destination IP address, or in my case, IP range, into a particular queue & pipe. Selectivity can also be based upon port, protocol, network interface, etc.
It's also worth noting that this is the menu in m0n0wall where you can direct traffic based upon TOS (Type of Service) tags. So the basic mechanism of DiffServ QoS is actually a facet of the traffic shaper. This gives a lot of flexibility, which may be enough of a reason to go the extra cost of m0n0wall over a lower-priced consumer router.
m0n0wall traffic shaper rule editing menu
If all this seems a little much to understand, you're in luck. m0n0wall provides an automatic setup tool called "Magic Shaper". You only need to tell it the measured connection speeds. This function will then establish all the required pipes and queues.