![](https://csdnimg.cn/release/download_crawler_static/3600618/bg5.jpg)
Chapter 2
tc: Linux Advanced
Routing and Traffic Control
Traffic control (tc) is part of the linux iproute2 package which allows the user
to access networking features. The package itself has three main features: mon-
itoring the system, traffic classification, and traffic manipulation. The tc part
in the package can be used
• to configure qdiscs as well as
• to configure packet classification into qdiscs.
A general description of the iproute2 package can be found in an online manual
at http://lartc.org/howto. To save time, this section repeats all relevant parts of
creating qdiscs that can b e found in the online manual before giving more details
on packet classification. The first part of the section describes how different
queueing disciplines (qdiscs) can be attached to one outgoing network interface.
The second part explains how packets can be classified into the schedulers based
on packet properties such as the source or destination ip address header field.
2.1 tc qdiscs and classes
2.1.1 Terminology
Queueing Discipline (qdisc) packet queue with an algorithm
that decides when to send which packet
Classless qdisc qdisc with no configurable internal subdivision
Classful qdisc qdisc that may contain classes
classful qdiscs allow packet classification
Root qdisc a root qdisc is attached to each network interface
either classful or classless
egress qdisc works on outgoing traffic
only egress qdiscs are considered in this manual
ingress qdisc works on incoming traffic
see the lartc manual for more detail
Class classes either contain other classes, or a qdisc is attached
Filter classification can b e performed using filters
4