1082 lines
36 KiB
HTML
1082 lines
36 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of CAKE</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>CAKE</H1>
|
|
Section: Linux (8)<BR>Updated: 19 July 2018<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
CAKE - Common Applications Kept Enhanced (CAKE)
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>tc qdisc ... cake</B>
|
|
|
|
<BR>
|
|
|
|
[
|
|
<B>bandwidth</B>
|
|
|
|
RATE |
|
|
<B>unlimited*</B>
|
|
|
|
|
|
|
<B>autorate-ingress</B>
|
|
|
|
]
|
|
<BR>
|
|
|
|
[
|
|
<B>rtt</B>
|
|
|
|
TIME |
|
|
<B>datacentre</B>
|
|
|
|
|
|
|
<B>lan</B>
|
|
|
|
|
|
|
<B>metro</B>
|
|
|
|
|
|
|
<B>regional</B>
|
|
|
|
|
|
|
<B>internet*</B>
|
|
|
|
|
|
|
<B>oceanic</B>
|
|
|
|
|
|
|
<B>satellite</B>
|
|
|
|
|
|
|
<B>interplanetary</B>
|
|
|
|
]
|
|
<BR>
|
|
|
|
[
|
|
<B>besteffort</B>
|
|
|
|
|
|
|
<B>diffserv8</B>
|
|
|
|
|
|
|
<B>diffserv4</B>
|
|
|
|
|
|
|
<B>diffserv3*</B>
|
|
|
|
]
|
|
<BR>
|
|
|
|
[
|
|
<B>flowblind</B>
|
|
|
|
|
|
|
<B>srchost</B>
|
|
|
|
|
|
|
<B>dsthost</B>
|
|
|
|
|
|
|
<B>hosts</B>
|
|
|
|
|
|
|
<B>flows</B>
|
|
|
|
|
|
|
<B>dual-srchost</B>
|
|
|
|
|
|
|
<B>dual-dsthost</B>
|
|
|
|
|
|
|
<B>triple-isolate*</B>
|
|
|
|
]
|
|
<BR>
|
|
|
|
[
|
|
<B>nat</B>
|
|
|
|
|
|
|
<B>nonat*</B>
|
|
|
|
]
|
|
<BR>
|
|
|
|
[
|
|
<B>wash</B>
|
|
|
|
|
|
|
<B>nowash*</B>
|
|
|
|
]
|
|
<BR>
|
|
|
|
[
|
|
<B>split-gso*</B>
|
|
|
|
|
|
|
<B>no-split-gso</B>
|
|
|
|
]
|
|
<BR>
|
|
|
|
[
|
|
<B>ack-filter</B>
|
|
|
|
|
|
|
<B>ack-filter-aggressive</B>
|
|
|
|
|
|
|
<B>no-ack-filter*</B>
|
|
|
|
]
|
|
<BR>
|
|
|
|
[
|
|
<B>memlimit</B>
|
|
|
|
LIMIT ]
|
|
<BR>
|
|
|
|
[
|
|
<B>fwmark</B>
|
|
|
|
MASK ]
|
|
<BR>
|
|
|
|
[
|
|
<B>ptm</B>
|
|
|
|
|
|
|
<B>atm</B>
|
|
|
|
|
|
|
<B>noatm*</B>
|
|
|
|
]
|
|
<BR>
|
|
|
|
[
|
|
<B>overhead</B>
|
|
|
|
N |
|
|
<B>conservative</B>
|
|
|
|
|
|
|
<B>raw*</B>
|
|
|
|
]
|
|
<BR>
|
|
|
|
[
|
|
<B>mpu</B>
|
|
|
|
N ]
|
|
<BR>
|
|
|
|
[
|
|
<B>ingress</B>
|
|
|
|
|
|
|
<B>egress*</B>
|
|
|
|
]
|
|
<BR>
|
|
|
|
(* marks defaults)
|
|
<P>
|
|
<P>
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
CAKE (Common Applications Kept Enhanced) is a shaping-capable queue discipline
|
|
which uses both AQM and FQ. It combines COBALT, which is an AQM algorithm
|
|
combining Codel and BLUE, a shaper which operates in deficit mode, and a variant
|
|
of DRR++ for flow isolation. 8-way set-associative hashing is used to virtually
|
|
eliminate hash collisions. Priority queuing is available through a simplified
|
|
diffserv implementation. Overhead compensation for various encapsulation
|
|
schemes is tightly integrated.
|
|
<P>
|
|
All settings are optional; the default settings are chosen to be sensible in
|
|
most common deployments. Most people will only need to set the
|
|
<B>bandwidth</B>
|
|
|
|
parameter to get useful results, but reading the
|
|
<B>Overhead Compensation</B>
|
|
|
|
and
|
|
<B>Round Trip Time</B>
|
|
|
|
sections is strongly encouraged.
|
|
<P>
|
|
<A NAME="lbAE"> </A>
|
|
<H2>SHAPER PARAMETERS</H2>
|
|
|
|
CAKE uses a deficit-mode shaper, which does not exhibit the initial burst
|
|
typical of token-bucket shapers. It will automatically burst precisely as much
|
|
as required to maintain the configured throughput. As such, it is very
|
|
straightforward to configure.
|
|
<P>
|
|
|
|
<B>unlimited</B>
|
|
|
|
(default)
|
|
<BR>
|
|
|
|
<TT> </TT>No limit on the bandwidth.<BR>
|
|
<P>
|
|
|
|
<B>bandwidth</B>
|
|
|
|
RATE
|
|
<BR>
|
|
|
|
<TT> </TT>Set the shaper bandwidth. See<BR>
|
|
<B><A HREF="/cgi-bin/man/man2html?8+tc">tc</A>(8)</B>
|
|
|
|
or examples below for details of the RATE value.
|
|
<P>
|
|
|
|
<B>autorate-ingress</B>
|
|
|
|
<BR>
|
|
|
|
<TT> </TT>Automatic capacity estimation based on traffic arriving at this qdisc.<BR>
|
|
This is most likely to be useful with cellular links, which tend to change
|
|
quality randomly. A
|
|
<B>bandwidth</B>
|
|
|
|
parameter can be used in conjunction to specify an initial estimate. The shaper
|
|
will periodically be set to a bandwidth slightly below the estimated rate. This
|
|
estimator cannot estimate the bandwidth of links downstream of itself.
|
|
<P>
|
|
<A NAME="lbAF"> </A>
|
|
<H2>OVERHEAD COMPENSATION PARAMETERS</H2>
|
|
|
|
The size of each packet on the wire may differ from that seen by Linux. The
|
|
following parameters allow CAKE to compensate for this difference by internally
|
|
considering each packet to be bigger than Linux informs it. To assist users who
|
|
are not expert network engineers, keywords have been provided to represent a
|
|
number of common link technologies.
|
|
<P>
|
|
<A NAME="lbAG"> </A>
|
|
<H3>Manual Overhead Specification</H3>
|
|
|
|
<B>overhead</B>
|
|
|
|
BYTES
|
|
<BR>
|
|
|
|
<TT> </TT>Adds BYTES to the size of each packet. BYTES may be negative; values<BR>
|
|
between -64 and 256 (inclusive) are accepted.
|
|
<P>
|
|
|
|
<B>mpu</B>
|
|
|
|
BYTES
|
|
<BR>
|
|
|
|
<TT> </TT>Rounds each packet (including overhead) up to a minimum length<BR>
|
|
BYTES. BYTES may not be negative; values between 0 and 256 (inclusive)
|
|
are accepted.
|
|
<P>
|
|
|
|
<B>atm</B>
|
|
|
|
<BR>
|
|
|
|
<TT> </TT>Compensates for ATM cell framing, which is normally found on ADSL links.<BR>
|
|
This is performed after the
|
|
<B>overhead</B>
|
|
|
|
parameter above. ATM uses fixed 53-byte cells, each of which can carry 48 bytes
|
|
payload.
|
|
<P>
|
|
|
|
<B>ptm</B>
|
|
|
|
<BR>
|
|
|
|
<TT> </TT>Compensates for PTM encoding, which is normally found on VDSL2 links and<BR>
|
|
uses a 64b/65b encoding scheme. It is even more efficient to simply
|
|
derate the specified shaper bandwidth by a factor of 64/65 or 0.984. See
|
|
ITU G.992.3 Annex N and IEEE 802.3 Section 61.3 for details.
|
|
<P>
|
|
|
|
<B>noatm</B>
|
|
|
|
<BR>
|
|
|
|
<TT> </TT>Disables ATM and PTM compensation.<BR>
|
|
<P>
|
|
<A NAME="lbAH"> </A>
|
|
<H3>Failsafe Overhead Keywords</H3>
|
|
|
|
These two keywords are provided for quick-and-dirty setup. Use them if you
|
|
can't be bothered to read the rest of this section.
|
|
<P>
|
|
|
|
<B>raw</B>
|
|
|
|
(default)
|
|
<BR>
|
|
|
|
<TT> </TT>Turns off all overhead compensation in CAKE. The packet size reported<BR>
|
|
by Linux will be used directly.
|
|
<P>
|
|
|
|
<TT> </TT>Other overhead keywords may be added after "raw". The effect of this is<BR>
|
|
to make the overhead compensation operate relative to the reported packet size,
|
|
not the underlying IP packet size.
|
|
<P>
|
|
|
|
<B>conservative</B>
|
|
|
|
<BR>
|
|
|
|
<TT> </TT>Compensates for more overhead than is likely to occur on any<BR>
|
|
widely-deployed link technology.
|
|
<BR>
|
|
|
|
<TT> </TT>Equivalent to<BR>
|
|
<B>overhead 48 atm.</B>
|
|
|
|
<P>
|
|
<A NAME="lbAI"> </A>
|
|
<H3>ADSL Overhead Keywords</H3>
|
|
|
|
Most ADSL modems have a way to check which framing scheme is in use. Often this
|
|
is also specified in the settings document provided by the ISP. The keywords in
|
|
this section are intended to correspond with these sources of information. All
|
|
of them implicitly set the
|
|
<B>atm</B>
|
|
|
|
flag.
|
|
<P>
|
|
|
|
<B>pppoa-vcmux</B>
|
|
|
|
<BR>
|
|
|
|
<TT> </TT>Equivalent to<BR>
|
|
<B>overhead 10 atm</B>
|
|
|
|
<P>
|
|
|
|
<B>pppoa-llc</B>
|
|
|
|
<BR>
|
|
|
|
<TT> </TT>Equivalent to<BR>
|
|
<B>overhead 14 atm</B>
|
|
|
|
<P>
|
|
|
|
<B>pppoe-vcmux</B>
|
|
|
|
<BR>
|
|
|
|
<TT> </TT>Equivalent to<BR>
|
|
<B>overhead 32 atm</B>
|
|
|
|
<P>
|
|
|
|
<B>pppoe-llcsnap</B>
|
|
|
|
<BR>
|
|
|
|
<TT> </TT>Equivalent to<BR>
|
|
<B>overhead 40 atm</B>
|
|
|
|
<P>
|
|
|
|
<B>bridged-vcmux</B>
|
|
|
|
<BR>
|
|
|
|
<TT> </TT>Equivalent to<BR>
|
|
<B>overhead 24 atm</B>
|
|
|
|
<P>
|
|
|
|
<B>bridged-llcsnap</B>
|
|
|
|
<BR>
|
|
|
|
<TT> </TT>Equivalent to<BR>
|
|
<B>overhead 32 atm</B>
|
|
|
|
<P>
|
|
|
|
<B>ipoa-vcmux</B>
|
|
|
|
<BR>
|
|
|
|
<TT> </TT>Equivalent to<BR>
|
|
<B>overhead 8 atm</B>
|
|
|
|
<P>
|
|
|
|
<B>ipoa-llcsnap</B>
|
|
|
|
<BR>
|
|
|
|
<TT> </TT>Equivalent to<BR>
|
|
<B>overhead 16 atm</B>
|
|
|
|
<P>
|
|
|
|
See also the Ethernet Correction Factors section below.
|
|
<P>
|
|
<A NAME="lbAJ"> </A>
|
|
<H3>VDSL2 Overhead Keywords</H3>
|
|
|
|
ATM was dropped from VDSL2 in favour of PTM, which is a much more
|
|
straightforward framing scheme. Some ISPs retained PPPoE for compatibility with
|
|
their existing back-end systems.
|
|
<P>
|
|
|
|
<B>pppoe-ptm</B>
|
|
|
|
<BR>
|
|
|
|
<TT> </TT>Equivalent to<BR>
|
|
<B>overhead 30 ptm</B>
|
|
|
|
<P>
|
|
<BR>
|
|
|
|
<TT> </TT>PPPoE: 2B PPP + 6B PPPoE +<BR>
|
|
<BR>
|
|
|
|
<TT> </TT>ETHERNET: 6B dest MAC + 6B src MAC + 2B ethertype + 4B Frame Check Sequence +<BR>
|
|
<BR>
|
|
|
|
<TT> </TT>PTM: 1B Start of Frame (S) + 1B End of Frame (Ck) + 2B TC-CRC (PTM-FCS)<BR>
|
|
<BR>
|
|
|
|
<P>
|
|
|
|
<B>bridged-ptm</B>
|
|
|
|
<BR>
|
|
|
|
<TT> </TT>Equivalent to<BR>
|
|
<B>overhead 22 ptm</B>
|
|
|
|
<BR>
|
|
|
|
<TT> </TT>ETHERNET: 6B dest MAC + 6B src MAC + 2B ethertype + 4B Frame Check Sequence +<BR>
|
|
<BR>
|
|
|
|
<TT> </TT>PTM: 1B Start of Frame (S) + 1B End of Frame (Ck) + 2B TC-CRC (PTM-FCS)<BR>
|
|
<BR>
|
|
|
|
<P>
|
|
|
|
See also the Ethernet Correction Factors section below.
|
|
<P>
|
|
<A NAME="lbAK"> </A>
|
|
<H3>DOCSIS Cable Overhead Keyword</H3>
|
|
|
|
DOCSIS is the universal standard for providing Internet service over cable-TV
|
|
infrastructure.
|
|
<P>
|
|
In this case, the actual on-wire overhead is less important than the packet size
|
|
the head-end equipment uses for shaping and metering. This is specified to be
|
|
an Ethernet frame including the CRC (aka FCS).
|
|
<P>
|
|
|
|
<B>docsis</B>
|
|
|
|
<BR>
|
|
|
|
<TT> </TT>Equivalent to<BR>
|
|
<B>overhead 18 mpu 64 noatm</B>
|
|
|
|
<P>
|
|
<A NAME="lbAL"> </A>
|
|
<H3>Ethernet Overhead Keywords</H3>
|
|
|
|
<P>
|
|
|
|
<B>ethernet</B>
|
|
|
|
<BR>
|
|
|
|
<TT> </TT>Accounts for Ethernet's preamble, inter-frame gap, and Frame Check<BR>
|
|
Sequence. Use this keyword when the bottleneck being shaped for is an
|
|
actual Ethernet cable.
|
|
<BR>
|
|
|
|
<TT> </TT>Equivalent to<BR>
|
|
<B>overhead 38 mpu 84 noatm</B>
|
|
|
|
<P>
|
|
|
|
<B>ether-vlan</B>
|
|
|
|
<BR>
|
|
|
|
<TT> </TT>Adds 4 bytes to the overhead compensation, accounting for an IEEE 802.1Q<BR>
|
|
VLAN header appended to the Ethernet frame header. NB: Some ISPs use one or
|
|
even two of these within PPPoE; this keyword may be repeated as necessary to
|
|
express this.
|
|
<P>
|
|
<A NAME="lbAM"> </A>
|
|
<H2>ROUND TRIP TIME PARAMETERS</H2>
|
|
|
|
Active Queue Management (AQM) consists of embedding congestion signals in the
|
|
packet flow, which receivers use to instruct senders to slow down when the queue
|
|
is persistently occupied. CAKE uses ECN signalling when available, and packet
|
|
drops otherwise, according to a combination of the Codel and BLUE AQM algorithms
|
|
called COBALT.
|
|
<P>
|
|
Very short latencies require a very rapid AQM response to adequately control
|
|
latency. However, such a rapid response tends to impair throughput when the
|
|
actual RTT is relatively long. CAKE allows specifying the RTT it assumes for
|
|
tuning various parameters. Actual RTTs within an order of magnitude of this
|
|
will generally work well for both throughput and latency management.
|
|
<P>
|
|
At the 'lan' setting and below, the time constants are similar in magnitude to
|
|
the jitter in the Linux kernel itself, so congestion might be signalled
|
|
prematurely. The flows will then become sparse and total throughput reduced,
|
|
leaving little or no back-pressure for the fairness logic to work against. Use
|
|
the "metro" setting for local lans unless you have a custom kernel.
|
|
<P>
|
|
|
|
<B>rtt</B>
|
|
|
|
TIME
|
|
<BR>
|
|
|
|
<TT> </TT>Manually specify an RTT.<BR>
|
|
<P>
|
|
|
|
<B>datacentre</B>
|
|
|
|
<BR>
|
|
|
|
<TT> </TT>For extremely high-performance 10GigE+ networks only. Equivalent to<BR>
|
|
<B>rtt 100us.</B>
|
|
|
|
<P>
|
|
|
|
<B>lan</B>
|
|
|
|
<BR>
|
|
|
|
<TT> </TT>For pure Ethernet (not Wi-Fi) networks, at home or in the office. Don't<BR>
|
|
use this when shaping for an Internet access link. Equivalent to
|
|
<B>rtt 1ms.</B>
|
|
|
|
<P>
|
|
|
|
<B>metro</B>
|
|
|
|
<BR>
|
|
|
|
<TT> </TT>For traffic mostly within a single city. Equivalent to<BR>
|
|
<B>rtt 10ms.</B>
|
|
|
|
<P>
|
|
|
|
<B>regional</B>
|
|
|
|
<BR>
|
|
|
|
<TT> </TT>For traffic mostly within a European-sized country. Equivalent to<BR>
|
|
<B>rtt 30ms.</B>
|
|
|
|
<P>
|
|
|
|
<B>internet</B>
|
|
|
|
(default)
|
|
<BR>
|
|
|
|
<TT> </TT>This is suitable for most Internet traffic. Equivalent to<BR>
|
|
<B>rtt 100ms.</B>
|
|
|
|
<P>
|
|
|
|
<B>oceanic</B>
|
|
|
|
<BR>
|
|
|
|
<TT> </TT>For Internet traffic with generally above-average latency, such as that<BR>
|
|
suffered by Australasian residents. Equivalent to
|
|
<B>rtt 300ms.</B>
|
|
|
|
<P>
|
|
|
|
<B>satellite</B>
|
|
|
|
<BR>
|
|
|
|
<TT> </TT>For traffic via geostationary satellites. Equivalent to<BR>
|
|
<B>rtt 1000ms.</B>
|
|
|
|
<P>
|
|
|
|
<B>interplanetary</B>
|
|
|
|
<BR>
|
|
|
|
<TT> </TT>So named because Jupiter is about 1 light-hour from Earth. Use this to<BR>
|
|
(almost) completely disable AQM actions. Equivalent to
|
|
<B>rtt 3600s.</B>
|
|
|
|
<P>
|
|
<A NAME="lbAN"> </A>
|
|
<H2>FLOW ISOLATION PARAMETERS</H2>
|
|
|
|
With flow isolation enabled, CAKE places packets from different flows into
|
|
different queues, each of which carries its own AQM state. Packets from each
|
|
queue are then delivered fairly, according to a DRR++ algorithm which minimises
|
|
latency for "sparse" flows. CAKE uses a set-associative hashing algorithm to
|
|
minimise flow collisions.
|
|
<P>
|
|
These keywords specify whether fairness based on source address, destination
|
|
address, individual flows, or any combination of those is desired.
|
|
<P>
|
|
|
|
<B>flowblind</B>
|
|
|
|
<BR>
|
|
|
|
<TT> </TT>Disables flow isolation; all traffic passes through a single queue for<BR>
|
|
each tin.
|
|
<P>
|
|
|
|
<B>srchost</B>
|
|
|
|
<BR>
|
|
|
|
<TT> </TT>Flows are defined only by source address. Could be useful on the egress<BR>
|
|
path of an ISP backhaul.
|
|
<P>
|
|
|
|
<B>dsthost</B>
|
|
|
|
<BR>
|
|
|
|
<TT> </TT>Flows are defined only by destination address. Could be useful on the<BR>
|
|
ingress path of an ISP backhaul.
|
|
<P>
|
|
|
|
<B>hosts</B>
|
|
|
|
<BR>
|
|
|
|
<TT> </TT>Flows are defined by source-destination host pairs. This is host<BR>
|
|
isolation, rather than flow isolation.
|
|
<P>
|
|
|
|
<B>flows</B>
|
|
|
|
<BR>
|
|
|
|
<TT> </TT>Flows are defined by the entire 5-tuple of source address, destination<BR>
|
|
address, transport protocol, source port and destination port. This is the type
|
|
of flow isolation performed by SFQ and fq_codel.
|
|
<P>
|
|
|
|
<B>dual-srchost</B>
|
|
|
|
<BR>
|
|
|
|
<TT> </TT>Flows are defined by the 5-tuple, and fairness is applied first over<BR>
|
|
source addresses, then over individual flows. Good for use on egress traffic
|
|
from a LAN to the internet, where it'll prevent any one LAN host from
|
|
monopolising the uplink, regardless of the number of flows they use.
|
|
<P>
|
|
|
|
<B>dual-dsthost</B>
|
|
|
|
<BR>
|
|
|
|
<TT> </TT>Flows are defined by the 5-tuple, and fairness is applied first over<BR>
|
|
destination addresses, then over individual flows. Good for use on ingress
|
|
traffic to a LAN from the internet, where it'll prevent any one LAN host from
|
|
monopolising the downlink, regardless of the number of flows they use.
|
|
<P>
|
|
|
|
<B>triple-isolate</B>
|
|
|
|
(default)
|
|
<BR>
|
|
|
|
<TT> </TT>Flows are defined by the 5-tuple, and fairness is applied over source<BR>
|
|
*and* destination addresses intelligently (ie. not merely by host-pairs), and
|
|
also over individual flows. Use this if you're not certain whether to use
|
|
dual-srchost or dual-dsthost; it'll do both jobs at once, preventing any one
|
|
host on *either* side of the link from monopolising it with a large number of
|
|
flows.
|
|
<P>
|
|
|
|
<B>nat</B>
|
|
|
|
<BR>
|
|
|
|
<TT> </TT>Instructs Cake to perform a NAT lookup before applying flow-isolation<BR>
|
|
rules, to determine the true addresses and port numbers of the packet, to
|
|
improve fairness between hosts "inside" the NAT. This has no practical effect
|
|
in "flowblind" or "flows" modes, or if NAT is performed on a different host.
|
|
<P>
|
|
|
|
<B>nonat</B>
|
|
|
|
(default)
|
|
<BR>
|
|
|
|
<TT> </TT>Cake will not perform a NAT lookup. Flow isolation will be performed<BR>
|
|
using the addresses and port numbers directly visible to the interface Cake is
|
|
attached to.
|
|
<P>
|
|
<A NAME="lbAO"> </A>
|
|
<H2>PRIORITY QUEUE PARAMETERS</H2>
|
|
|
|
CAKE can divide traffic into "tins" based on the Diffserv field. Each tin has
|
|
its own independent set of flow-isolation queues, and is serviced based on a WRR
|
|
algorithm. To avoid perverse Diffserv marking incentives, tin weights have a
|
|
"priority sharing" value when bandwidth used by that tin is below a threshold,
|
|
and a lower "bandwidth sharing" value when above. Bandwidth is compared against
|
|
the threshold using the same algorithm as the deficit-mode shaper.
|
|
<P>
|
|
Detailed customisation of tin parameters is not provided. The following presets
|
|
perform all necessary tuning, relative to the current shaper bandwidth and RTT
|
|
settings.
|
|
<P>
|
|
|
|
<B>besteffort</B>
|
|
|
|
<BR>
|
|
|
|
<TT> </TT>Disables priority queuing by placing all traffic in one tin.<BR>
|
|
<P>
|
|
|
|
<B>precedence</B>
|
|
|
|
<BR>
|
|
|
|
<TT> </TT>Enables legacy interpretation of TOS "Precedence" field. Use of this<BR>
|
|
preset on the modern Internet is firmly discouraged.
|
|
<P>
|
|
|
|
<B>diffserv4</B>
|
|
|
|
<BR>
|
|
|
|
<TT> </TT>Provides a general-purpose Diffserv implementation with four tins:<BR>
|
|
<BR>
|
|
|
|
<TT> </TT><TT> </TT>Bulk (CS1), 6.25% threshold, generally low priority.<BR>
|
|
<BR>
|
|
|
|
<TT> </TT><TT> </TT>Best Effort (general), 100% threshold.<BR>
|
|
<BR>
|
|
|
|
<TT> </TT><TT> </TT>Video (AF4x, AF3x, CS3, AF2x, CS2, TOS4, TOS1), 50% threshold.<BR>
|
|
<BR>
|
|
|
|
<TT> </TT><TT> </TT>Voice (CS7, CS6, EF, VA, CS5, CS4), 25% threshold.<BR>
|
|
<P>
|
|
|
|
<B>diffserv3</B>
|
|
|
|
(default)
|
|
<BR>
|
|
|
|
<TT> </TT>Provides a simple, general-purpose Diffserv implementation with three tins:<BR>
|
|
<BR>
|
|
|
|
<TT> </TT><TT> </TT>Bulk (CS1), 6.25% threshold, generally low priority.<BR>
|
|
<BR>
|
|
|
|
<TT> </TT><TT> </TT>Best Effort (general), 100% threshold.<BR>
|
|
<BR>
|
|
|
|
<TT> </TT><TT> </TT>Voice (CS7, CS6, EF, VA, TOS4), 25% threshold, reduced Codel interval.<BR>
|
|
<P>
|
|
<P>
|
|
|
|
<B>fwmark</B>
|
|
|
|
MASK
|
|
<BR>
|
|
|
|
<TT> </TT>This options turns on fwmark-based overriding of CAKE's tin selection.<BR>
|
|
If set, the option specifies a bitmask that will be applied to the fwmark
|
|
associated with each packet. If the result of this masking is non-zero, the
|
|
result will be right-shifted by the number of least-significant unset bits in
|
|
the mask value, and the result will be used as a the tin number for that packet.
|
|
This can be used to set policies in a firewall script that will override CAKE's
|
|
built-in tin selection.
|
|
<P>
|
|
<A NAME="lbAP"> </A>
|
|
<H2>OTHER PARAMETERS</H2>
|
|
|
|
<B>memlimit</B>
|
|
|
|
LIMIT
|
|
<BR>
|
|
|
|
<TT> </TT>Limit the memory consumed by Cake to LIMIT bytes. Note that this does<BR>
|
|
not translate directly to queue size (so do not size this based on bandwidth
|
|
delay product considerations, but rather on worst case acceptable memory
|
|
consumption), as there is some overhead in the data structures containing the
|
|
packets, especially for small packets.
|
|
<P>
|
|
<TT> </TT>By default, the limit is calculated based on the bandwidth and RTT<BR>
|
|
settings.
|
|
<P>
|
|
<P>
|
|
|
|
<B>wash</B>
|
|
|
|
<P>
|
|
<BR>
|
|
|
|
<TT> </TT>Traffic entering your diffserv domain is frequently mis-marked in<BR>
|
|
transit from the perspective of your network, and traffic exiting yours may be
|
|
mis-marked from the perspective of the transiting provider.
|
|
<P>
|
|
Apply the wash option to clear all extra diffserv (but not ECN bits), after
|
|
priority queuing has taken place.
|
|
<P>
|
|
If you are shaping inbound, and cannot trust the diffserv markings (as is the
|
|
case for Comcast Cable, among others), it is best to use a single queue
|
|
"besteffort" mode with wash.
|
|
<P>
|
|
<P>
|
|
|
|
<B>split-gso</B>
|
|
|
|
<P>
|
|
<BR>
|
|
|
|
<TT> </TT>This option controls whether CAKE will split General Segmentation<BR>
|
|
Offload (GSO) super-packets into their on-the-wire components and
|
|
dequeue them individually.
|
|
<P>
|
|
<BR>
|
|
|
|
Super-packets are created by the networking stack to improve efficiency.
|
|
However, because they are larger they take longer to dequeue, which
|
|
translates to higher latency for competing flows, especially at lower
|
|
bandwidths. CAKE defaults to splitting GSO packets to achieve the lowest
|
|
possible latency. At link speeds higher than 10 Gbps, setting the
|
|
no-split-gso parameter can increase the maximum achievable throughput by
|
|
retaining the full GSO packets.
|
|
<P>
|
|
<A NAME="lbAQ"> </A>
|
|
<H2>OVERRIDING CLASSIFICATION WITH TC FILTERS</H2>
|
|
|
|
<P>
|
|
CAKE supports overriding of its internal classification of packets through the
|
|
tc filter mechanism. Packets can be assigned to different priority tins by
|
|
setting the
|
|
<B>priority</B>
|
|
|
|
field on the skb, and the flow hashing can be overridden by setting the
|
|
<B>classid</B>
|
|
|
|
parameter.
|
|
<P>
|
|
<P>
|
|
|
|
<B>Tin override</B>
|
|
|
|
<P>
|
|
<BR>
|
|
|
|
<BR> To assign a priority tin, the major number of the priority field needs
|
|
to match the qdisc handle of the cake instance; if it does, the minor number
|
|
will be interpreted as the tin index. For example, to classify all ICMP packets
|
|
as 'bulk', the following filter can be used:
|
|
<P>
|
|
<BR>
|
|
|
|
<BR> # tc qdisc replace dev eth0 handle 1: root cake diffserv3
|
|
<BR> # tc filter add dev eth0 parent 1: protocol ip prio 1 \
|
|
<BR> u32 match icmp type 0 0 action skbedit priority 1:1
|
|
<P>
|
|
<P>
|
|
|
|
<B>Flow hash override</B>
|
|
|
|
<P>
|
|
<BR>
|
|
|
|
<BR> To override flow hashing, the classid can be set. CAKE will interpret
|
|
the major number of the classid as the host hash used in host isolation mode,
|
|
and the minor number as the flow hash used for flow-based queueing. One or both
|
|
of those can be set, and will be used if the relevant flow isolation parameter
|
|
is set (i.e., the major number will be ignored if CAKE is not configured in
|
|
hosts mode, and the minor number will be ignored if CAKE is not configured in
|
|
flows mode).
|
|
<P>
|
|
<BR>
|
|
|
|
This example will assign all ICMP packets to the first queue:
|
|
<P>
|
|
<BR>
|
|
|
|
<BR> # tc qdisc replace dev eth0 handle 1: root cake
|
|
<BR> # tc filter add dev eth0 parent 1: protocol ip prio 1 \
|
|
<BR> u32 match icmp type 0 0 classid 0:1
|
|
<P>
|
|
<BR>
|
|
|
|
If only one of the host and flow overrides is set, CAKE will compute the other
|
|
hash from the packet as normal. Note, however, that the host isolation mode
|
|
works by assigning a host ID to the flow queue; so if overriding both host and
|
|
flow, the same flow cannot have more than one host assigned. In addition, it is
|
|
not possible to assign different source and destination host IDs through the
|
|
override mechanism; if a host ID is assigned, it will be used as both source and
|
|
destination host.
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<A NAME="lbAR"> </A>
|
|
<H2>EXAMPLES</H2>
|
|
|
|
# tc qdisc delete root dev eth0
|
|
<BR>
|
|
|
|
# tc qdisc add root dev eth0 cake bandwidth 100Mbit ethernet
|
|
<BR>
|
|
|
|
# tc -s qdisc show dev eth0
|
|
<BR>
|
|
|
|
qdisc cake 1: root refcnt 2 bandwidth 100Mbit diffserv3 triple-isolate rtt 100.0ms noatm overhead 38 mpu 84
|
|
<BR> Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
|
|
<BR> backlog 0b 0p requeues 0
|
|
<BR> memory used: 0b of 5000000b
|
|
<BR> capacity estimate: 100Mbit
|
|
<BR> min/max network layer size: 65535 / 0
|
|
<BR> min/max overhead-adjusted size: 65535 / 0
|
|
<BR> average network hdr offset: 0
|
|
<P>
|
|
<BR> Bulk Best Effort Voice
|
|
<BR> thresh 6250Kbit 100Mbit 25Mbit
|
|
<BR> target 5.0ms 5.0ms 5.0ms
|
|
<BR> interval 100.0ms 100.0ms 100.0ms
|
|
<BR> pk_delay 0us 0us 0us
|
|
<BR> av_delay 0us 0us 0us
|
|
<BR> sp_delay 0us 0us 0us
|
|
<BR> pkts 0 0 0
|
|
<BR> bytes 0 0 0
|
|
<BR> way_inds 0 0 0
|
|
<BR> way_miss 0 0 0
|
|
<BR> way_cols 0 0 0
|
|
<BR> drops 0 0 0
|
|
<BR> marks 0 0 0
|
|
<BR> ack_drop 0 0 0
|
|
<BR> sp_flows 0 0 0
|
|
<BR> bk_flows 0 0 0
|
|
<BR> un_flows 0 0 0
|
|
<BR> max_len 0 0 0
|
|
<BR> quantum 300 1514 762
|
|
<P>
|
|
After some use:
|
|
<BR>
|
|
|
|
# tc -s qdisc show dev eth0
|
|
<P>
|
|
qdisc cake 1: root refcnt 2 bandwidth 100Mbit diffserv3 triple-isolate rtt 100.0ms noatm overhead 38 mpu 84
|
|
<BR> Sent 44709231 bytes 31931 pkt (dropped 45, overlimits 93782 requeues 0)
|
|
<BR> backlog 33308b 22p requeues 0
|
|
<BR> memory used: 292352b of 5000000b
|
|
<BR> capacity estimate: 100Mbit
|
|
<BR> min/max network layer size: 28 / 1500
|
|
<BR> min/max overhead-adjusted size: 84 / 1538
|
|
<BR> average network hdr offset: 14
|
|
<P>
|
|
<BR> Bulk Best Effort Voice
|
|
<BR> thresh 6250Kbit 100Mbit 25Mbit
|
|
<BR> target 5.0ms 5.0ms 5.0ms
|
|
<BR> interval 100.0ms 100.0ms 100.0ms
|
|
<BR> pk_delay 8.7ms 6.9ms 5.0ms
|
|
<BR> av_delay 4.9ms 5.3ms 3.8ms
|
|
<BR> sp_delay 727us 1.4ms 511us
|
|
<BR> pkts 2590 21271 8137
|
|
<BR> bytes 3081804 30302659 11426206
|
|
<BR> way_inds 0 46 0
|
|
<BR> way_miss 3 17 4
|
|
<BR> way_cols 0 0 0
|
|
<BR> drops 20 15 10
|
|
<BR> marks 0 0 0
|
|
<BR> ack_drop 0 0 0
|
|
<BR> sp_flows 2 4 1
|
|
<BR> bk_flows 1 2 1
|
|
<BR> un_flows 0 0 0
|
|
<BR> max_len 1514 1514 1514
|
|
<BR> quantum 300 1514 762
|
|
<P>
|
|
<A NAME="lbAS"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?8+tc">tc</A></B>(8),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?8+tc-codel">tc-codel</A></B>(8),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?8+tc-fq_codel">tc-fq_codel</A></B>(8),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?8+tc-htb">tc-htb</A></B>(8)
|
|
|
|
<P>
|
|
<A NAME="lbAT"> </A>
|
|
<H2>AUTHORS</H2>
|
|
|
|
Cake's principal author is Jonathan Morton, with contributions from
|
|
Tony Ambardar, Kevin Darbyshire-Bryant, Toke Høiland-Jørgensen,
|
|
Sebastian Moeller, Ryan Mounce, Dean Scarff, Nils Andreas Svee, and Dave Täht.
|
|
<P>
|
|
This manual page was written by Loganaden Velvindron. Please report corrections
|
|
to the Linux Networking mailing list <<A HREF="mailto:netdev@vger.kernel.org">netdev@vger.kernel.org</A>>.
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="1"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="2"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="3"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="4"><A HREF="#lbAE">SHAPER PARAMETERS</A><DD>
|
|
<DT id="5"><A HREF="#lbAF">OVERHEAD COMPENSATION PARAMETERS</A><DD>
|
|
<DL>
|
|
<DT id="6"><A HREF="#lbAG">Manual Overhead Specification</A><DD>
|
|
<DT id="7"><A HREF="#lbAH">Failsafe Overhead Keywords</A><DD>
|
|
<DT id="8"><A HREF="#lbAI">ADSL Overhead Keywords</A><DD>
|
|
<DT id="9"><A HREF="#lbAJ">VDSL2 Overhead Keywords</A><DD>
|
|
<DT id="10"><A HREF="#lbAK">DOCSIS Cable Overhead Keyword</A><DD>
|
|
<DT id="11"><A HREF="#lbAL">Ethernet Overhead Keywords</A><DD>
|
|
</DL>
|
|
<DT id="12"><A HREF="#lbAM">ROUND TRIP TIME PARAMETERS</A><DD>
|
|
<DT id="13"><A HREF="#lbAN">FLOW ISOLATION PARAMETERS</A><DD>
|
|
<DT id="14"><A HREF="#lbAO">PRIORITY QUEUE PARAMETERS</A><DD>
|
|
<DT id="15"><A HREF="#lbAP">OTHER PARAMETERS</A><DD>
|
|
<DT id="16"><A HREF="#lbAQ">OVERRIDING CLASSIFICATION WITH TC FILTERS</A><DD>
|
|
<DT id="17"><A HREF="#lbAR">EXAMPLES</A><DD>
|
|
<DT id="18"><A HREF="#lbAS">SEE ALSO</A><DD>
|
|
<DT id="19"><A HREF="#lbAT">AUTHORS</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:06:17 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|