Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
dbajarca
New Contributor

ToS byte values for QoS on 4.0MR2

Hi Guys, I am trying to configure system-wide prioritisation for DSCP EF using ToS-based priority. I had a look at the Fortigate traffic shaping guide, but I find the documentation quite confusing. Here' s what it says:
Use the following command to list command to view information of the TOS lists and traffic. diagnose system tos-based-priority This example displays the priority value currently correlated with each possible TOS byte value. Priority values are displayed in order of their corresponding TOS byte values, which can range between 0 and 15, from lowest TOS byte value to highest. For example, if you have not configured TOS-based priorities, the following appears... 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...reflecting that all packets are currently using the same default priority, high (value 0).
Obviously, Fortinet uses 4 bits for the TOS values, but the original bit has 8. For example, for DSCP EF the TOS byte would be 101 110 00 with a decimal value of 184. Any idea how Fortigate maps these bits and how would the TOS values be calculated?
5 REPLIES 5
morrack
New Contributor

I agree that the documentation is very confusing. It would be incredibly helpfull if they would simply add a column with the 0-15 decimal value required in the DSCP to TOS table they put in the traffic shaping handbook. The answer to your question is 12. DSCP EF (46) is equivalent to TOS 184 as you mentioned, which converted to binary is 10111000. Take bits 3-6 (leftmost bit being 0, rightmost being 7) which would be 1100 in this instance, and convert to Decimal to get the required value of 12. Now - if only my fortigates running 4.0 MR3 would actually accept the commands the manual says to use for configuring this I would be all set. My issue is, I type the following and receive no errors whatsoever: config system tos-based-priority edit 12 set tos 12 set priority high next end However, if I view the configuration I just entered all I get is this: config system tos-based-priority edit 12 set tos 12 next end Likewise, if I try to do a config sys global and then set tos-base-priority medium, the commands are accepted but do not appear when showing the config. Anyone have any idea what gives with this? I' ve tried this on both FGT60B and FGT80C' s, both running 4.0MR3
Dave_Hall
Honored Contributor

I believe the default value is set to high, in which case the fortigate doesn' t display it unless you use the show full
# config system tos-based-priority
 
 (tos-based-prio~i) # show
 config system tos-based-priority
     edit 12
         set tos 12
     next
 end
 
 (tos-based-prio~i) # show full-configuration
 config system tos-based-priority
     edit 12
         set tos 12
         set priority high
     next
 end
 

NSE4/FMG-VM64/FortiAnalyzer-VM/6.0 (FWF30E/FW92D/FGT200D/FGT101E/FGT81E)/ FAP220B/221C

NSE4/FMG-VM64/FortiAnalyzer-VM/6.0 (FWF30E/FW92D/FGT200D/FGT101E/FGT81E)/ FAP220B/221C
rwpatterson
Valued Contributor III

 FGT config system global
 FGT (global) $ show
 config system global
     set admin-server-cert " local_cert" 
     set admintimeout 60
     set auth-cert " local_cert" 
     set dst enable
     set gui-lines-per-page 32
     set hostname " FGT" 
     set lcdpin ENC blah-blah-blah
     set optimize antivirus
     set refresh 5
     set tcp-timewait-timer 120
     set timezone 12
     set tos-based-priority medium
     set user-server-cert " local_cert" 
     set wireless-controller disable
 end
 
 FGT (global) $
 

Bob - self proclaimed posting junkie!
See my Fortigate related scripts at: http://fortigate.camerabob.com

Bob - self proclaimed posting junkie!See my Fortigate related scripts at: http://fortigate.camerabob.com
morrack
New Contributor

Thanks Dave, you nailed it. <rant> I think that' s kinda goofy - I sort of understand the logic of not showing default settings, but if you' ve modified the global tos-based-priority to something other than high, then high is no longer the default... anyway... </rant> FYI, for the benefit of others reading this thread in the future, I' ve also discovered while working on this that the manual incorrectly supplies the troubleshooting command " diag sys tos-based-priority" . Again, <rant> instead of an error the command is simply accepted but nothing happens</rant>. The correct form is " diag sys tos-based-priority list" .
morrack
New Contributor

Bob what model of FGT and what OS? On mine I had to use show full on the config sys global in order to see the change to medium default priority. FGT80C 4.0MR3
Labels
Top Kudoed Authors