Chapter 18 Traffic Shaping : Traffic shaping methods : Traffic shaping options
  
Traffic shaping options
When configuring traffic shaping for your network, there are three different methods to control the flow of network traffic to ensure that the desired traffic gets through while also limiting the bandwidth that users use for other less important or bandwidth consuming traffic. The three shaping options are:
Shared policy shaping - bandwidth management by security policies
Per-IP shaping - bandwidth management by user IP addresses
Application control shaping - bandwidth management by application
Shared policy shaping and Per-IP shaping are enabled within the security policy under Policy & Objects > Policy. Application control shaping is enabled under Security Profiles > Application Control, and setting the Action to Traffic Shaping.
The three different traffic shaping options offered by the FortiGate unit can also be enabled at the same time within the same security policy. Generally, the hierarchy for traffic shapers in FortiOS is:
Application Control shaper
Security policy shaper
Per-IP shaper
Within this hierarchy, if an application control list has a traffic shaper defined, it will always have precedence over any other security policy shaper. For example, the Facebook application control example shown in “Application control shaping” will supersede any security policy enabled traffic shapers. While the Facebook application may reach its maximum bandwidth, the user can still have the bandwidth room available from the shared shaper and, if enabled, the per-IP shaper.
Equally, any security policy shared shaper will have precedence over any per-IP shaper. However, traffic that exceeds any of these shapers will be dropped. For example, the policy shaper will take effect first, however, if the per-IP shaper limit is reached first, then traffic for that user will be dropped even if the shared shaper limit for the policy has not been exceeded.
See also 
Shared policy shaping
Per-IP shaping
Application control shaping
Enabling traffic shaping in the security policy
Type of Service priority
Differentiated Services
ToS and DSCP traffic mapping
Traffic Shaper Monitor