|
Packit Service |
3880ab |
.TH SKBPRIO 8 "13 August 2018" "iproute2" "Linux"
|
|
Packit Service |
3880ab |
.SH NAME
|
|
Packit Service |
3880ab |
skbprio \- SKB Priority Queue
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
.SH SYNOPSIS
|
|
Packit Service |
3880ab |
.B tc qdisc ... add skbprio
|
|
Packit Service |
3880ab |
.B [ limit
|
|
Packit Service |
3880ab |
packets
|
|
Packit Service |
3880ab |
.B ]
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
.SH DESCRIPTION
|
|
Packit Service |
3880ab |
SKB Priority Queue is a queueing discipline intended to prioritize
|
|
Packit Service |
3880ab |
the most important packets during a denial-of-service (
|
|
Packit Service |
3880ab |
.B DoS
|
|
Packit Service |
3880ab |
) attack. The priority of a packet is given by
|
|
Packit Service |
3880ab |
.B skb->priority
|
|
Packit Service |
3880ab |
, where a higher value places the packet closer to the exit of the queue. When
|
|
Packit Service |
3880ab |
the queue is full, the lowest priority packet in the queue is dropped to make
|
|
Packit Service |
3880ab |
room for the packet to be added if it has higher priority. If the packet to be
|
|
Packit Service |
3880ab |
added has lower priority than all packets in the queue, it is dropped.
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
Without SKB priority queue, queue length limits must be imposed
|
|
Packit Service |
3880ab |
on individual sub-queues, and there is no straightforward way to enforce
|
|
Packit Service |
3880ab |
a global queue length limit across all priorities. SKBprio queue enforces
|
|
Packit Service |
3880ab |
a global queue length limit while not restricting the lengths of
|
|
Packit Service |
3880ab |
individual sub-queues.
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
While SKB Priority Queue is agnostic to how
|
|
Packit Service |
3880ab |
.B skb->priority
|
|
Packit Service |
3880ab |
is assigned. A typical use case is to copy
|
|
Packit Service |
3880ab |
the 6-bit DS field of IPv4 and IPv6 packets using
|
|
Packit Service |
3880ab |
.BR tc-skbedit (8).
|
|
Packit Service |
3880ab |
If
|
|
Packit Service |
3880ab |
.B skb->priority
|
|
Packit Service |
3880ab |
is greater or equal to 64, the priority is assumed to be 63.
|
|
Packit Service |
3880ab |
Priorities less than 64 are taken at face value.
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
SKB Priority Queue enables routers to locally decide which
|
|
Packit Service |
3880ab |
packets to drop under a DoS attack.
|
|
Packit Service |
3880ab |
Priorities should be assigned to packets such that the higher the priority,
|
|
Packit Service |
3880ab |
the more expected behavior a source shows.
|
|
Packit Service |
3880ab |
So sources have an incentive to play by the rules.
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
.SH ALGORITHM
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
Skbprio maintains 64 lists (priorities go from 0 to 63).
|
|
Packit Service |
3880ab |
When a packet is enqueued, it gets inserted at the
|
|
Packit Service |
3880ab |
.B tail
|
|
Packit Service |
3880ab |
of its priority list. When a packet needs to be sent out to the network, it is
|
|
Packit Service |
3880ab |
taken from the head of the highest priority list. When the queue is full,
|
|
Packit Service |
3880ab |
the packet at the tail of the lowest priority list is dropped to serve the
|
|
Packit Service |
3880ab |
ingress packet - if it is of higher priority, otherwise the ingress packet is
|
|
Packit Service |
3880ab |
dropped. This algorithm allocates as much bandwidth as possible to high
|
|
Packit Service |
3880ab |
priority packets, while only servicing low priority packets when
|
|
Packit Service |
3880ab |
there is enough bandwidth.
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
.SH PARAMETERS
|
|
Packit Service |
3880ab |
.TP
|
|
Packit Service |
3880ab |
limit
|
|
Packit Service |
3880ab |
Maximum queue size specified in packets. It defaults to 64.
|
|
Packit Service |
3880ab |
The range for this parameter is [0, UINT32_MAX].
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
.SH SEE ALSO
|
|
Packit Service |
3880ab |
.BR tc-prio (8),
|
|
Packit Service |
3880ab |
.BR tc-skbedit (8)
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
.SH AUTHORS
|
|
Packit Service |
3880ab |
Nishanth Devarajan <devarajn@uci.edu>, Michel Machado <michel@digirati.com.br>
|
|
Packit Service |
3880ab |
|
|
Packit Service |
3880ab |
This manpage maintained by Bert Hubert <ahu@ds9a.nl>
|