Advanced filters for (re-)classifying packets

Linux Advanced Routing & Traffic Control HOWTO
Prev |  | Next

# Chapter 12. Advanced filters for (re-)classifying packets

As explained in the section on classful queueing disciplines, filters are needed to classify packets into any of the sub-queues. These filters are called from within the classful qdisc.

Here is an incomplete list of classifiers available:

fw

  Bases the decision on how the firewall has marked the packet. This can be the easy way out if you don't want to learn tc filter syntax. See the Queueing chapter for details.

u32

  Bases the decision on fields within the packet (i.e. source IP address, etc)

route

  Bases the decision on which route the packet will be routed by

rsvp, rsvp6

  Routes packets based on RSVP . Only useful on networks you control - the Internet does not respect RSVP.

tcindex

  Used in the DSMARK qdisc, see the relevant section.

Note that in general there are many ways in which you can classify packet and that it generally comes down to preference as to which system you wish to use.

Classifiers in general accept a few arguments in common. They are listed here for convenience:

protocol

  The protocol this classifier will accept. Generally you will only be accepting only IP traffic. Required.

parent

  The handle this classifier is to be attached to. This handle must be an already existing class. Required.

prio

  The priority of this classifier. Lower numbers get tested first.

handle

  This handle means different things to different filters.

All the following sections will assume you are trying to shape the traffic going to `HostA`. They will assume that the root class has been configured on 1: and that the class you want to send the selected traffic to is 1:1.

Prev | Home | Next
Netfilter & iproute - marking packets |  | The `u32` classifier