.\" Automatically generated by Pandoc 1.17.2 .nh .\" .TH "fireqos\-match" "5" "Built 21 Jan 2017" "FireQOS Reference" "3.1.1" .hy .SH NAME .PP fireqos\-match \- QOS traffic match .SH SYNOPSIS .PP {match|match4|match6|match46} \f[I]optional\-match\-params\f[] .SH DESCRIPTION .PP Writing \f[C]match\f[] inherits the IPv4/IPv6 version from its enclosing class (see fireqos\-class(5)). .PP Writing \f[C]match4\f[] includes only IPv4 traffic in the match. .PP Writing \f[C]match6\f[] includes only IPv6 traffic in the match. .PP Writing \f[C]match46\f[] includes both IPv4 and IPv6 traffic in the match. .PP You can add as many \f[C]match\f[] statements as you like to a FireQOS configuration. They assign traffic to a class: by default to the class after which they are declared. .PP The sequence that matches appear in the configuration defines their priority, with the first match being given a \f[C]prio\f[] of 10, with 10 added for each subsequent match (10, 20, 30, ...). .PP Matches can have their priority assigned explicitly with the \f[C]prio\f[] parameter. See fireqos\-params\-match(5). .PP If one \f[C]match\f[] statement generates multiple tc(8) \f[C]filter\f[] statements, all filters generated by the same \f[C]match\f[] statement will have the same \f[C]prio\f[]. .RS .PP \f[B]Note\f[] .PP \f[C]match\f[] rules are attached to the parent of the \f[C]class\f[] they appear in. Within the configuration they are written under a class, but in reality they are attached to their class parent, so that they classify the parent\[aq]s traffic that they match, into the class. .RE .PP It is also possible to group all \f[C]match\f[] statements together below the classes. This allows them to be arranged in preferred order, without the need for any explicit \f[C]prio\f[] parameters. In this case however, each match statement must specify to which class it classifies the packets it matches, using the \f[C]class\f[] parameter. See fireqos\-params\-match(5) and the examples below. .PP You can also write \f[C]client\f[] and \f[C]server\f[] statements, much like FireHOL allows, with the same service definitions. For FireQOS however, the client ports are ignored. \f[C]server\f[] statements match the server ports on this linux side, while \f[C]client\f[] statements match the server ports on the remote side. .PP Example: .IP .nf \f[C] \ \ \ \ server_myrtp_ports="10000:10100" \ \ \ \ interface\ eth0\ lan\ bidirectional\ rate\ 1Gbit \ \ \ \ \ \ class\ voip \ \ \ \ \ \ \ \ server\ sip \ \ \ \ \ \ \ \ client\ sip \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ server\ myrtp \ \ \ \ \ \ class\ dns \ \ \ \ \ \ \ \ server\ dns \ \ \ \ \ \ class\ mail \ \ \ \ \ \ \ \ server\ smtp \f[] .fi .SH PARAMETERS .TP .B \f[I]optional\-match\-params\f[] The set of optional parameters which describe this match. See fireqos\-params\-match(5). .RS .RE .SH EXAMPLES .PP Match traffic within classes: .IP .nf \f[C] \ \ \ \ interface\ eth0\ lan\ output\ rate\ 1Gbit \ \ \ \ \ \ class\ voip \ \ \ \ \ \ \ \ match\ udp\ ports\ 5060,10000:10100 \ \ \ \ \ \ class\ dns \ \ \ \ \ \ \ \ match\ udp\ port\ 53 \ \ \ \ \ \ class\ mail \ \ \ \ \ \ \ \ match\ tcp\ port\ 25 \f[] .fi .PP Matches split out and explicitly assigning traffic to classes (N.B. without the \f[C]class\f[] parameters, all traffic would be classified into \[aq]mail\[aq]): .IP .nf \f[C] \ \ \ \ interface\ eth0\ lan\ output\ rate\ 1Gbit \ \ \ \ \ \ class\ voip \ \ \ \ \ \ class\ dns \ \ \ \ \ \ class\ mail \ \ \ \ \ \ match\ udp\ ports\ 5060,10000:10100\ class\ voip \ \ \ \ \ \ match\ tcp\ port\ 25\ class\ mail \ \ \ \ \ \ match\ tcp\ port\ 80\ class\ web \f[] .fi .SH SEE ALSO .IP \[bu] 2 fireqos\-params\-match(5) \- QOS match parameters .IP \[bu] 2 fireqos(1) \- FireQOS program .IP \[bu] 2 fireqos.conf(5) \- FireQOS configuration file .IP \[bu] 2 fireqos\-interface(5) \- QOS interface definition .IP \[bu] 2 fireqos\-class(5) \- QOS class definition .IP \[bu] 2 FireHOL Website (http://firehol.org/) .IP \[bu] 2 FireQOS Online PDF Manual (http://firehol.org/fireqos-manual.pdf) .IP \[bu] 2 FireQOS Online Documentation (http://firehol.org/documentation/) .IP \[bu] 2 tc(8) (http://lartc.org/manpages/tc.html) \- show / manipulate traffic control settings .SH AUTHORS FireHOL Team.