Differences

This shows you the differences between two versions of the page.

doc:howto:packet.scheduler:packet.scheduler [2012/11/28 04:24]
uvray313
doc:howto:packet.scheduler:packet.scheduler [2013/08/10 20:50] (current)
lorema entry for sfqred
Line 1: Line 1:
 +====== Network Traffic Control ======
 +Traffic Control is the umbrella term for packet prioritizing, traffic [[#shaping|shaping]], bandwidth limiting, AQM (Active Queue Management), etc. This HowTo will help you understand and set up traffic control on your router. Is it one strategy to address problems caused by [[wp>Network congestion]].
- +| {{:meta:icons:tango:dialog-information.png?nolink}} | You //can// control, i.e. prioritize and/or shape, ANY **upload traffic**, i.e. traffic being sent from your router to the Internet. Doing so //will// solve problems that occur with congestion, i.e. [[wp>Jitter#Packet_jitter_in_computer_networks|jitter]] and delay.
-====== Traffic Control ====== +| {{:meta:icons:tango:dialog-information.png?nolink}} | You do NOT have the same level of control over **download traffic**, i.e. traffic arriving at your router from the Internet. Here, you can only drop packets but not rearrange them.\\ The dropping of TCP packets, causes the sending site to reduce its transmission rate, the dropping of UDP packets however, will only help to keep the buffer empty. |
-Traffic Control is the umbrella term for packet prioritizing, traffic [[#shaping|shaping]], bandwidth limiting, AQM (Active Queue Management), etc. This HowTo will help you understand and set up traffic control on your router. +
- +
-| {{:meta:icons:tango:dialog-information.png?nolink}} | You //can// control, i.e. prioritize and/or shape, ANY **upload traffic**, i.e. traffic being sent from your router to the Internet. Doing so //will// solve problems with congestion, [[wp>Jitter#Packet_jitter_in_computer_networks|jitter]] or delay of packets +
-| {{:meta:icons:tango:dialog-information.png?nolink}} | You do NOT have the same level of control over **download traffic**. You can control incoming TCP traffic by dropping packets, which causes the protocol to reduce the transmission rate.  This approach has no effect on UDP traffic however. |+
===== Preparations ===== ===== Preparations =====
Line 106: Line 104:
| -> [[sch_sfb]]    |  Stochastic Fair Blue                |  ??  | bla  |  |  | | -> [[sch_sfb]]    |  Stochastic Fair Blue                |  ??  | bla  |  |  |
| -> [[sch_sfq]]    |  Stochastic Fairness Queueing        |  ☒  | distibutes bandwidth for known tcp-connections fairly  |  |  ☑  | | -> [[sch_sfq]]    |  Stochastic Fairness Queueing        |  ☒  | distibutes bandwidth for known tcp-connections fairly  |  |  ☑  |
 +| -> [[sch_sfqred]] |  mixture of qfq and red              |  ?  |      | | |
| -> [[sch_tbf]]    |  Token Bucket Filter                  |  ☒  | limit bandwidth  |  |  ☑  | | -> [[sch_tbf]]    |  Token Bucket Filter                  |  ☒  | limit bandwidth  |  |  ☑  |
| -> [[sch_teql]]  |  True/Trivial Link Equalizer          |  ??  | bla  |  |  ☑  | | -> [[sch_teql]]  |  True/Trivial Link Equalizer          |  ??  | bla  |  |  ☑  |
**''Note:''** The PRIO QDisc does contain three classes, but since they cannot be configured further, PRIO is considered to be a classless QDisc. Its classes are sometimes called bands. **''Note:''** The PRIO QDisc does contain three classes, but since they cannot be configured further, PRIO is considered to be a classless QDisc. Its classes are sometimes called bands.
 +
 +==== Actions ====
 +
 +^ Action  ^^  Description  ^  kmod-sched-core  ^  kmod-sched ^
 +| [[act_police]]  | Input police filter        |  |  |
 +| [[act_nat]]    | Stateless NAT actions      | | |
 +| [[act_mirred]]  | packet mirroring and redirect actions | | |
 +| [[act_skbedit]] | | | |
 +
==== Filters ==== ==== Filters ====
Line 116: Line 124:
  * In principle it works exactly like [[doc:howto:netfilter#configuration|netfilter rules]], the only difference is that <color blue>matches</color> are called <color blue>classifiers</color> and the <color red>TARGET</color> are called <color red>VERDICT</color> in available documentation. However, since it is possible to do the filtering <del>entirely</del> with netfilter (almost, doesn't forget Layer 2 packets like arp), this does not really matter.   * In principle it works exactly like [[doc:howto:netfilter#configuration|netfilter rules]], the only difference is that <color blue>matches</color> are called <color blue>classifiers</color> and the <color red>TARGET</color> are called <color red>VERDICT</color> in available documentation. However, since it is possible to do the filtering <del>entirely</del> with netfilter (almost, doesn't forget Layer 2 packets like arp), this does not really matter.
-^ Filter  ^^  Description  ^  kmod-sched-core  ^  kmod-sched ^+^ Filter (Classifier) ^^  Description  ^  kmod-sched-core  ^  kmod-sched ^
| -> [[http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commit;h=e5dfb815181fcb186d6080ac3a091eadff2d98fe|cls_flow]]    | flow classifier  | bla  |  ☑  |  | | -> [[http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commit;h=e5dfb815181fcb186d6080ac3a091eadff2d98fe|cls_flow]]    | flow classifier  | bla  |  ☑  |  |
| -> [[cls_fw]]    | firewall classifier  | bla  |  ☑  |  | | -> [[cls_fw]]    | firewall classifier  | bla  |  ☑  |  |
Line 123: Line 131:
| -> [[cls_u32]]    | u32 classifier  | bla  |  ☑  |  | | -> [[cls_u32]]    | u32 classifier  | bla  |  ☑  |  |
| -> [[cls_basic]]    | basic classifier  | bla  |  |  ☑  | | -> [[cls_basic]]    | basic classifier  | bla  |  |  ☑  |
 +| -> [[cls_cgroup]] | [[wp>cgroups]] (Control Group) Classifier |  |  |
=== Filter with packet scheduler === === Filter with packet scheduler ===
Line 299: Line 308:
===== Terminology ===== ===== Terminology =====
-==== Queueing Discipline (QDisc) ====+**''Queueing Discipline (QDisc)''** An algorithm that manages the queue of a device, either incoming (ingress) or outgoing (egress). Also referred to as a packet scheduler. 
 +  * ''**Root QDisc**'' Not an actual queuing discipline (QDisc), but rather the location where traffic control structures can be attached to an interface for egress (outbound traffic). It can contain any of the queuing disciplines (qdiscs) with potential classes and class structures.  
 +  * ''**Ingress QDisc**'' The location where ingress (incoming traffic) filters can be attached. For practical purposes, the ingress qdisc is merely a convenient object onto which to attach a policer to limit the amount of traffic accepted on a network interface. 
 +  * ''**Classless QDisc**'' A QDisc with no configurable internal subdivisions. 
 +  * ''**Classful QDisc**'' Contains multiple classes. Some of these classes contain a further QDisc, which may again be classful, but need not be.  
 +  * ''**Work-Conserving**'' A work-conserving QDisc never delays packets. It does NOT "shape" packets. 
 +  * ''**Non-Work-Conserving**'' A non-work-conserving QDiscs may delay packets and "shape" them. This means that they sometimes refuse to pass a packet, even though they have one available. 
 +  * ''**Tail drop Queue**'' see [[wp>Tail drop]]
-An algorithm that manages the queue of a device, either incoming (ingress) or outgoing (egress). Also referred to as a packet scheduler.+**''Classes''** Classes are sub-QDiscs which allow the user to configure QoS in more detail. Classes can contain additional classes. Classes do not have a queue, do not contain any network packets and cannot contain filters.
-=== Root QDisc ===+  * ''**Leaf Class**'' End class without any child classes. Always contains a QDisc! In case one is not configure, the default pfifo_fast is used. Leaf classes give unused bandwidth back to their parent class. 
 +  * ''**Inner Class**'' Classes which contain leaf-classes. 
 +  * ''**Parent Class**'' Parent class can dynamically pass bandwidth to leaf-classes 
 +  * ''**Child Class**'' Class that has another class or a QDisc as parent and contains classes.
-Not an actual queuing discipline (QDisc), but rather the location where traffic control structures can be attached to an interface for egress (outbound traffic). It can contain any of the queuing disciplines (qdiscs) with potential classes and class structures. +**''Classifier''** Determines which class to send a packet.
-=== Ingress QDisc ===+**''Filter''** Classification can be performed using filters. A filter contains a number of conditions which if matched, make the filter match.
-The location where ingress (incoming traffic) filters can be attached. For practical purposes, the ingress qdisc is merely a convenient object onto which to attach a policer to limit the amount of traffic accepted on a network interface.+**''Scheduling''** A QDisc may, with the help of a classifier, decide that some packets need to leave earlier than others. This process is called scheduling.
-=== Classless QDisc ===+**''Shaping''** [[wp>Traffic_shaping|Traffic Shaping]] is the process of delaying packets to limit egress traffic to a maximum rate or smooth bursts.
-A QDisc with no configurable internal subdivisions.+**''Policing''** [[wp>Traffic_policing| Traffic Policing]] is the practice of dropping, marking or ignoring ingress packets that don't comply with user-defined criteria.
-=== Classful QDisc ===+**''Filters''** Filters are used by classful QDiscs to determine which class a packet will be queued to.
-Contains multiple classes. Some of these classes contain a further QDisc, which may again be classful, but need not be.  +**''TCP Turbo''** Yet another [[wp>Buzzword bingo]] term; means the prioritization of TCP ACK-packets on the upload-side
- +
-=== Work-Conserving === +
- +
-A work-conserving QDisc never delays packets. It does NOT "shape" packets. +
- +
-=== Non-Work-Conserving === +
- +
-A non-work-conserving QDiscs may delay packets and "shape" them. This means that they sometimes refuse to pass a packet, even though they have one available. +
- +
-==== Classes ==== +
- +
-Classes are sub-QDiscs which allow the user to configure QoS in more detail. Classes can contain additional classes. Classes do not have a queue, do not contain any network packets and cannot contain filters. +
- +
-=== Leaf Class === +
- +
-End class without any child classes. Always contains a QDisc! In case one is not configure, the default pfifo_fast is used. Leaf classes give unused bandwidth back to their parent class. +
- +
-=== Inner Class === +
- +
-Classes which contain leaf-classes. +
- +
-=== Parent Class === +
- +
-Parent class can dynamically pass bandwidth to leaf-classes +
- +
-=== Child Class === +
- +
-Class that has another class or a QDisc as parent and contains classes. +
- +
-==== Classifier ==== +
- +
-Determines which class to send a packet. +
- +
-==== Filter ==== +
- +
-Classification can be performed using filters. A filter contains a number of conditions which if matched, make the filter match. +
- +
-==== Scheduling ==== +
- +
-A QDisc may, with the help of a classifier, decide that some packets need to leave earlier than others. This process is called scheduling. +
- +
-==== Shaping ==== +
- +
-[[wp>Traffic_shaping|Traffic Shaping]] is the process of delaying packets to limit egress traffic to a maximum rate or smooth bursts. +
- +
-==== Policing ==== +
-[[wp>Traffic_policing| Traffic Policing]] is the practice of dropping, marking or ignoring ingress packets that don't comply with user-defined criteria. +
- +
-==== Filters ==== +
- +
-Filters are used by classful QDiscs to determine which class a packet will be queued to.+
===== Reference ===== ===== Reference =====
Line 378: Line 346:
  * [[http://linuxgazette.net/135/pfeiffer.html|TCP and Linux' Pluggable Congestion Control Algorithms]]   * [[http://linuxgazette.net/135/pfeiffer.html|TCP and Linux' Pluggable Congestion Control Algorithms]]
  * [[http://www.mail-archive.com/lartc@mailman.ds9a.nl/msg17009.html|Packet scheduler and VLANs]]   * [[http://www.mail-archive.com/lartc@mailman.ds9a.nl/msg17009.html|Packet scheduler and VLANs]]
 +
 +===== Tags =====
 +{{tag>QoS}}

Back to top

doc/howto/packet.scheduler/packet.scheduler.1354073095.txt.bz2 · Last modified: 2012/11/28 04:24 by uvray313