Chapter 17 Traffic Shaping for FortiOS 5.0 : Traffic shaping methods : Type of Service priority
  
Type of Service priority
Type of service (ToS) is an 8-bit field in the IP header that enables you to determine how the IP datagram should be delivered, using criteria of Delay, Throughput, Priority, Reliability, and Cost. Each quality helps gateways determine the best way to route datagrams. A router maintains a ToS value for each route in its routing table. The lowest priority ToS is 0, the highest is 7 when bits 3, 4, and 5 are all set to 1. There are 4 other bits that are seldom used or reserved that are not included here.
Together these bits are the tos variable of the tos‑based-priority command. The router tries to match the ToS of the datagram to the ToS on one of the possible routes to the destination. If there is no match, the datagram is sent over a zero ToS route. Using increased quality may increase the cost of delivery because better performance may consume limited network resources.
Each bit represents the priority as per RFC 1349:
1000 - minimize delay
0100 - maximize throughput
0010 - maximize reliability
0001 - minimize monetary cost
The TOS value is set in the CLI using the commands:
config system tos-based-priority
edit <sequence_number>
set tos [0-15]
set priority [high | medium | low]
end
Where tos is the value of the type of service bit in the IP datagram header with a value between 0 and 15, and priority is the priority of this type of service priority. These priority levels conform to the firewall traffic shaping priorities, as defined in RFC 1349.
For example, if you want to configure the FortiGate unit so that reliability is the first priority, set the tos value to 4.
config system tos-based-priority
edit 1
set tos 4
set priority high
end
For a list of ToS values and their DSCP equivalents see “Tos and DSCP mapping”.
See also 
Shared policy shaping
Per-IP shaping
Application control shaping
Type of Service priority
Differentiated Services
Tos and DSCP mapping
Traffic Shaper Monitor