@@ -18,7 +18,7 @@ tc \- show / manipulate traffic control
\fIBLOCK_INDEX\fR ] qdisc
[ qdisc specific parameters ]
.P
-
+.
.B tc
.RI "[ " OPTIONS " ]"
.B class [ add | change | replace | delete | show ] dev
@@ -29,7 +29,7 @@ tc \- show / manipulate traffic control
\fIclass-id\fR ] qdisc
[ qdisc specific parameters ]
.P
-
+.
.B tc
.RI "[ " OPTIONS " ]"
.B filter [ add | change | replace | delete | get ] dev
@@ -121,13 +121,13 @@ tc \- show / manipulate traffic control
.P
.ti 8
.IR OPTIONS " := {"
-\fB[ -force ] -b\fR[\fIatch\fR] \fB[ filename ] \fR|
-\fB[ \fB-n\fR[\fIetns\fR] name \fB] \fR|
-\fB[ \fB-N\fR[\fIumeric\fR] \fB] \fR|
-\fB[ \fB-nm \fR| \fB-nam\fR[\fIes\fR] \fB] \fR|
-\fB[ \fR{ \fB-cf \fR| \fB-c\fR[\fIonf\fR] \fR} \fB[ filename ] \fB] \fR
-\fB[ -t\fR[imestamp\fR] \fB\] \fR| \fB[ -t\fR[short\fR] \fR| \fB[
--o\fR[neline\fR] \fB]\fR }
+\fB[ \-force ] \-b\fR[\fIatch\fR] \fB[ filename ] \fR|
+\fB[ \fB\-n\fR[\fIetns\fR] name \fB] \fR|
+\fB[ \fB\-N\fR[\fIumeric\fR] \fB] \fR|
+\fB[ \fB\-nm \fR| \fB\-nam\fR[\fIes\fR] \fB] \fR|
+\fB[ \fR{ \fB\-cf \fR| \fB\-c\fR[\fIonf\fR] \fR} \fB[ filename ] \fB]\fR
+\fB[ \-t\fR[imestamp\fR] \fB] \fR| \fB[ \-t\fR[short\fR] \fR| \fB[
+\-o\fR[neline\fR] \fB]\fR }
.ti 8
.IR FORMAT " := {"
@@ -142,25 +142,30 @@ tc \- show / manipulate traffic control
.SH DESCRIPTION
.B Tc
-is used to configure Traffic Control in the Linux kernel. Traffic Control consists
-of the following:
+is used to configure Traffic Control in the Linux kernel.
+Traffic Control consists of the following:
.TP
SHAPING
-When traffic is shaped, its rate of transmission is under control. Shaping may
-be more than lowering the available bandwidth - it is also used to smooth out
-bursts in traffic for better network behaviour. Shaping occurs on egress.
+When traffic is shaped, its rate of transmission is under control.
+Shaping may be more than lowering the available bandwidth \(en
+it is also used to smooth out
+bursts in traffic for better network behaviour.
+Shaping occurs on egress.
.TP
SCHEDULING
-By scheduling the transmission of packets it is possible to improve interactivity
-for traffic that needs it while still guaranteeing bandwidth to bulk transfers. Reordering
-is also called prioritizing, and happens only on egress.
+By scheduling the transmission of packets
+it is possible to improve interactivity
+for traffic that needs it while still guaranteeing bandwidth to bulk transfers.
+Reordering is also called prioritizing,
+and happens only on egress.
.TP
POLICING
Whereas shaping deals with transmission of traffic, policing pertains to traffic
-arriving. Policing thus occurs on ingress.
+arriving.
+Policing thus occurs on ingress.
.TP
DROPPING
@@ -173,7 +178,7 @@ classes and filters.
.SH QDISCS
.B qdisc
-is short for 'queueing discipline' and it is elementary to
+is short for \&'queueing discipline' and it is elementary to
understanding traffic control. Whenever the kernel needs to send a
packet to an interface, it is
.B enqueued
@@ -181,12 +186,13 @@ to the qdisc configured for that interfa
tries to get as many packets as possible from the qdisc, for giving them
to the network adaptor driver.
-A simple QDISC is the 'pfifo' one, which does no processing at all and is a pure
-First In, First Out queue. It does however store traffic when the network interface
+A simple QDISC is the \&'pfifo' one, which does no processing at all and is a pure
+First In, First Out queue.
+It does however store traffic when the network interface
can't handle it momentarily.
.SH CLASSES
-Some qdiscs can contain classes, which contain further qdiscs - traffic may
+Some qdiscs can contain classes, which contain further qdiscs \(en traffic may
then be enqueued in any of the inner qdiscs, which are within the
.B classes.
When the kernel tries to dequeue a packet from such a
@@ -207,7 +213,7 @@ available. This differs per qdisc.
It is important to notice that filters reside
.B within
-qdiscs - they are not masters of what happens.
+qdiscs \(en they are not masters of what happens.
The available filters are:
.TP
@@ -227,7 +233,9 @@ Filter packets based on the control grou
for details.
.TP
flow, flower
-Flow-based classifiers, filtering packets based on their flow (identified by selectable keys). See
+Flow-based classifiers,
+filtering packets based on their flow (identified by selectable keys).
+See
.BR tc-flow "(8) and"
.BR tc-flower (8)
for details.
@@ -249,7 +257,9 @@ Filter packets based on traffic control
.BR tc-tcindex (8).
.TP
u32
-Generic filtering on arbitrary packet data, assisted by syntax to abstract common operations. See
+Generic filtering on arbitrary packet data,
+assisted by syntax to abstract common operations.
+See
.BR tc-u32 (8)
for details.
.TP
@@ -326,7 +336,8 @@ separate queue with less priority so tha
latency of critical traffic.
.TP
ingress
-This is a special qdisc as it applies to incoming traffic on an interface, allowing for it to be filtered and policed.
+This is a special qdisc as it applies to incoming traffic on an interface,
+allowing for it to be filtered and policed.
.TP
mqprio
The Multiqueue Priority Qdisc is a simple queuing discipline that allows
@@ -343,11 +354,12 @@ band is not stopped prior to dequeuing a
.TP
netem
Network Emulator is an enhancement of the Linux traffic control facilities that
-allow one to add delay, packet loss, duplication and more other characteristics to
+allow one to add delay, packet loss,
+duplication and more other characteristics to
packets outgoing from a selected network interface.
.TP
pfifo_fast
-Standard qdisc for 'Advanced Router' enabled kernels. Consists of a three-band
+Standard qdisc for \&'Advanced Router' enabled kernels. Consists of a three-band
queue which honors Type of Service flags, as well as the priority that may be
assigned to a packet.
.TP
@@ -364,13 +376,13 @@ large bandwidth applications.
sfb
Stochastic Fair Blue is a classless qdisc to manage congestion based on
packet loss and link utilization history while trying to prevent
-non-responsive flows (i.e. flows that do not react to congestion marking
+non-responsive flows (i.e.\& flows that do not react to congestion marking
or dropped packets) from impacting performance of responsive flows.
Unlike RED, where the marking probability has to be configured, BLUE
tries to determine the ideal marking probability automatically.
.TP
sfq
-Stochastic Fairness Queueing reorders queued traffic so each 'session'
+Stochastic Fairness Queueing reorders queued traffic so each \&'session'
gets to send a packet in turn.
.TP
tbf
@@ -412,7 +424,7 @@ DRR
The Deficit Round Robin Scheduler is a more flexible replacement for Stochastic
Fairness Queuing. Unlike SFQ, there are no built-in queues \-\- you need to add
classes and then set up filters to classify packets accordingly. This can be
-useful e.g. for using RED qdiscs with different settings for particular
+useful e.g.\& for using RED qdiscs with different settings for particular
traffic. There is no default class \-\- if a packet cannot be classified, it is
dropped.
.TP
@@ -427,7 +439,11 @@ bandwidth-sharing bands to implement the
802.1Qaz.
.TP
HFSC
-Hierarchical Fair Service Curve guarantees precise bandwidth and delay allocation for leaf classes and allocates excess bandwidth fairly. Unlike HTB, it makes use of packet dropping to achieve low delays which interactive sessions benefit from.
+Hierarchical Fair Service Curve guarantees precise bandwidth
+and delay allocation for leaf classes and allocates excess bandwidth fairly.
+Unlike HTB,
+it makes use of packet dropping to achieve low delays
+which interactive sessions benefit from.
.TP
HTB
The Hierarchy Token Bucket implements a rich linksharing hierarchy of
@@ -479,8 +495,8 @@ Type of Service
Some qdiscs have built in rules for classifying packets based on the TOS field.
.TP
skb->priority
-Userspace programs can encode a \fIclass-id\fR in the 'skb->priority' field using
-the SO_PRIORITY option.
+Userspace programs can encode a \fIclass-id\fR in the \&'skb->priority' field
+using the SO_PRIORITY option.
.P
Each node within the tree can have its own filters but higher level filters
may also point directly to lower classes.
@@ -507,10 +523,11 @@ of all ones, and unspecified is all zero
QDISCS
A qdisc, which potentially can have children, gets assigned a
.B major
-number, called a 'handle', leaving the
+number, called a \&'handle', leaving the
.B minor
-number namespace available for classes. The handle is expressed as '10:'.
-It is customary to explicitly assign a handle to qdiscs expected to have children.
+number namespace available for classes. The handle is expressed as \&'10:'.
+It is customary to explicitly assign a handle to qdiscs
+expected to have children.
.TP
CLASSES
@@ -518,7 +535,7 @@ Classes residing under a qdisc share the
.B major
number, but each have a separate
.B minor
-number called a 'classid' that has no relation to their
+number called a \&'classid' that has no relation to their
parent classes, only to their parent qdisc. The same naming custom as for
qdiscs applies.
@@ -535,9 +552,9 @@ see the man pages for individual qdiscs.
RATES
Bandwidths or rates.
These parameters accept a floating point number, possibly followed by
-either a unit (both SI and IEC units supported), or a float followed by a '%'
+either a unit (both SI and IEC units supported), or a float followed by a \&'%'
character to specify the rate as a percentage of the device's speed
-(e.g. 5%, 99.5%). Warning: specifying the rate as a percentage means a fraction
+(e.g.\& 5%, 99.5%). Warning: specifying the rate as a percentage means a fraction
of the current speed; if the speed changes, the value will not be recalculated.
.RS
.TP
@@ -637,8 +654,8 @@ so we can specify a max size of 42949672
VALUES
Other values without a unit.
These parameters are interpreted as decimal by default, but you can
-indicate TC to interpret them as octal and hexadecimal by adding a '0'
-or '0x' prefix respectively.
+indicate TC to interpret them as octal and hexadecimal by adding a \&'0'
+or \&'0x' prefix respectively.
.SH TC COMMANDS
The following commands are available for qdiscs, classes and filter:
@@ -646,7 +663,8 @@ The following commands are available for
add
Add a qdisc, class or filter to a node. For all entities, a
.B parent
-must be passed, either by passing its ID or by attaching directly to the root of a device.
+must be passed,
+either by passing its ID or by attaching directly to the root of a device.
When creating a qdisc or a filter, it can be named with the
.B handle
parameter. A class is named with the
@@ -655,21 +673,23 @@ parameter.
.TP
delete
-A qdisc can be deleted by specifying its handle, which may also be 'root'. All subclasses and their leaf qdiscs
+A qdisc can be deleted by specifying its handle, which may also be \&'root'.
+All subclasses and their leaf qdiscs
are automatically deleted, as well as any filters attached to them.
.TP
change
-Some entities can be modified 'in place'. Shares the syntax of 'add', with the exception
-that the handle cannot be changed and neither can the parent. In other words,
-.B
-change
+Some entities can be modified \&'in place'.
+Shares the syntax of \&'add', with the exception
+that the handle cannot be changed and neither can the parent.
+In other words,
+.B change
cannot move a node.
.TP
replace
-Performs a nearly atomic remove/add on an existing node id. If the node does not exist yet
-it is created.
+Performs a nearly atomic remove/add on an existing node id.
+If the node does not exist yet, it is created.
.TP
get
@@ -678,7 +698,8 @@ Displays a single filter given the inter
.TP
show
-Displays all filters attached to the given interface. A valid parent ID must be passed.
+Displays all filters attached to the given interface.
+A valid parent ID must be passed.
.TP
link
@@ -692,8 +713,10 @@ adding/deleting qdiscs, filters or actio
The following command is available for\fB\ monitor\fR\ :
.TP
\fBfile\fR
-If the file option is given, the \fBtc\fR does not listen to kernel events, but opens
-the given file and dumps its contents. The file has to be in binary
+If the file option is given,
+the \fBtc\fR does not listen to kernel events,
+but opens the given file and dumps its contents.
+The file has to be in binary
format and contain netlink messages.
.SH OPTIONS
@@ -704,9 +727,10 @@ read commands from provided file or stan
First failure will cause termination of tc.
.TP
-.BR "\-force"
+.B \-force
don't terminate tc on errors in batch mode.
-If there were any errors during execution of the commands, the application return code will be non zero.
+If there were any errors during execution of the commands,
+the application return code will be non zero.
.TP
.BR "\-o" , " \-oneline"
@@ -729,15 +753,15 @@ to the specified network namespace
Actually it just simplifies executing of:
.B ip netns exec
-.IR NETNS
+.I NETNS
.B tc
-.RI "[ " OPTIONS " ] " OBJECT " { " COMMAND " | "
+.RI "[ " OPTIONS " ] " OBJECT " { " COMMAND " |"
.BR help " }"
to
.B tc
-.RI "-n[etns] " NETNS " [ " OPTIONS " ] " OBJECT " { " COMMAND " | "
+.RI "\-n[etns] " NETNS " [ " OPTIONS " ] " OBJECT " { " COMMAND " |"
.BR help " }"
.TP
@@ -747,17 +771,20 @@ converting it to human readable name.
.TP
.BR "\-cf" , " \-conf " <FILENAME>
-specifies path to the config file. This option is used in conjunction with other options (e.g.
-.BR -nm ")."
+specifies path to the config file.
+This option is used in conjunction with other options (e.g.\&
+.BR \-nm ")."
.TP
.BR "\-t", " \-timestamp"
-When\fB\ tc monitor\fR\ runs, print timestamp before the event message in format:
+When\fB\ tc monitor\fR\ runs,
+print timestamp before the event message in format:
Timestamp: <Day> <Month> <DD> <hh:mm:ss> <YYYY> <usecs> usec
.TP
.BR "\-ts", " \-tshort"
-When\fB\ tc monitor\fR\ runs, prints short timestamp before the event message in format:
+When\fB\ tc monitor\fR\ runs,
+prints short timestamp before the event message in format:
[<YYYY>-<MM>-<DD>T<hh:mm:ss>.<ms>]
.SH FORMAT
@@ -777,19 +804,20 @@ output raw hex values for handles.
.TP
.BR "\-p", " \-pretty"
-for u32 filter, decode offset and mask values to equivalent filter commands based on TCP/IP.
+for u32 filter,
+decode offset and mask values to equivalent filter commands based on TCP/IP.
In JSON output, add whitespace to improve readability.
.TP
-.BR "\-iec"
-print rates in IEC units (ie. 1K = 1024).
+.B \-iec
+print rates in IEC units (i.e.\& 1K = 1024).
.TP
.BR "\-g", " \-graph"
shows classes as ASCII graph. Prints generic stats info under each class if
-.BR "-s"
+.B \-s
option was specified. Classes can be filtered only by
-.BR "dev"
+.B dev
option.
.TP
@@ -814,7 +842,7 @@ Display results in JSON format.
resolve class name from
.B /etc/iproute2/tc_cls
file or from file specified by
-.B -cf
+.B \-cf
option. This file is just a mapping of
.B classid
to class name:
@@ -838,13 +866,13 @@ to class name:
.RS
.B tc
will not fail if
-.B -nm
+.B \-nm
was specified without
-.B -cf
+.B \-cf
option but
.B /etc/iproute2/tc_cls
file does not exist, which makes it possible to pass
-.B -nm
+.B \-nm
option for creating
.B tc
alias.
@@ -853,17 +881,16 @@ alias.
.TP
.BR "\-br" , " \-brief"
Print only essential data needed to identify the filter and action (handle,
-cookie, etc.) and stats. This option is currently only supported by
+cookie, etc.\&) and stats. This option is currently only supported by
.BR "tc filter show " and " tc actions ls " commands.
.SH "EXAMPLES"
-.PP
-tc -g class show dev eth0
+tc \-g class show dev eth0
.RS 4
Shows classes as ASCII graph on eth0 interface.
.RE
.PP
-tc -g -s class show dev eth0
+tc \-g \-s class show dev eth0
.RS 4
Shows classes as ASCII graph with stats info under each class.
.RE
@@ -905,7 +932,8 @@ was written by Alexey N. Kuznetsov and a
.BR tc-tcindex (8),
.BR tc-u32 (8),
.br
-.RB "User documentation at " http://lartc.org/ ", but please direct bugreports and patches to: " <netdev@vger.kernel.org>
+.RB "User documentation at " http://lartc.org/ ", \
+but please direct bugreports and patches to: " <netdev@vger.kernel.org>
.SH AUTHOR
Manpage maintained by bert hubert (ahu@ds9a.nl)