Previous: NAT, Up: Configuration


3.4 The <traffic> section

This section is used to define traffic shaping rules. These traffic shaping rules are called flows, the concept of flows is a single-parent child relationship. For instance you can define 1 major flow, within this flow you can define separate priorities and limits for different traffic such as mail, browsing and p2p traffic. This example setup might be used for a DSL internet connection where one would like to prioritize internet browsing.

The syntax of this section follows...

     <firewall>
     .
     .
     .
         # Traffic flows
         <traffic>
             <flow name="dsl_line_in" max-rate="64000" report-timeout="60">
                 <flow name="http_in" max-rate="32000" burst-rate="64000" nfmark="100">
                     http_traffic_in
                 </flow>
                 <flow name="smtp_in" max-rate="8000" burst-rate="32000" nfmark="101">
                     smtp_traffic_in
                 </flow>
                 <flow name="p2p_in" max-rate="24000" burst-rate="32000"
                         nfmark="102">
                     p2p_traffic_in
                 </flow>
             </flow>
             <flow name="dsl_line_out" max-rate="64000" report-timeout="60">
                 <flow name="http_out" max-rate="32000" burst-rate="64000" nfmark="200">
                     http_traffic_out
                 </flow>
                 <flow name="smtp_out" max-rate="8000" burst-rate="32000" nfmark="201">
                     smtp_traffic_out
                 </flow>
                 <flow name="p2p_out" max-rate="24000" burst-rate="32000" nfmark="202">
                     p2p_traffic_out
                 </flow>
             </flow>
         </traffic>
     .
     .
     .
     </firewall>


The <traffic> ... </traffic> tags have no parameters.

Valid sub-tags and their parameters are detailed below...