Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
linux_router:tc [2024-06-23 Sun wk25 07:52] – [Links] baumkplinux_router:tc [2024-06-23 Sun wk25 08:14] (current) – [TC - Traffic Control] baumkp
Line 3: Line 3:
 The Linux kernel's network stack has network traffic control and shaping features. The iproute2 package installs the tc command to control these via the command line.\\ The Linux kernel's network stack has network traffic control and shaping features. The iproute2 package installs the tc command to control these via the command line.\\
 Queuing controls how data is sent; receiving data is much more reactive with fewer network-oriented controls. However, since TCP/IP packets are sent using a slow start the system starts sending the packets slow and keeps sending them faster and faster until packets start getting rejected - it is therefore possible to control how much traffic is received on a LAN by dropping packets that arrive at a router before they get forwarded. There are more relevant details, but they do not touch directly on queuing logic. Queuing controls how data is sent; receiving data is much more reactive with fewer network-oriented controls. However, since TCP/IP packets are sent using a slow start the system starts sending the packets slow and keeps sending them faster and faster until packets start getting rejected - it is therefore possible to control how much traffic is received on a LAN by dropping packets that arrive at a router before they get forwarded. There are more relevant details, but they do not touch directly on queuing logic.
 +
 +  *''sudo sysctl -a | grep qdisc'' shows current default settings
 +  *''sudo sysctl -a | grep net.'' shows all the net. parameters, additional deeper filters net.core, net.ipv4, net.ipv6, net.mptcp, and net.netfilter.  There are a few additionals not shown in deeper filters!
 +  *''sudo tc qdisc show  dev eno1'' shows current setting of interface ''dev eno1''
 +
 +it would seem that Linux has default settings for network interfaces, e.g.:
 +<code>qdisc mq 0: root 
 +qdisc fq_codel 0: parent :4 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64 
 +qdisc fq_codel 0: parent :3 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64 
 +qdisc fq_codel 0: parent :2 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64 
 +qdisc fq_codel 0: parent :1 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64 </code>
  
 ====Links==== ====Links====
Line 13: Line 24:
     *[[https://www.b1c1l1.com/blog/2020/04/19/linux-home-router-download-bufferbloat-analysis/|Linux Home Router Download Bufferbloat Analysis|]]     *[[https://www.b1c1l1.com/blog/2020/04/19/linux-home-router-download-bufferbloat-analysis/|Linux Home Router Download Bufferbloat Analysis|]]
     *[[https://www.bufferbloat.net/projects/codel/wiki/Best_practices_for_benchmarking_Codel_and_FQ_Codel/#tuning-these-algorithms|Best Practices for Benchmarking CoDel and FQ CoDel]]     *[[https://www.bufferbloat.net/projects/codel/wiki/Best_practices_for_benchmarking_Codel_and_FQ_Codel/#tuning-these-algorithms|Best Practices for Benchmarking CoDel and FQ CoDel]]
 +  *[[https://en.wikipedia.org/wiki/Tc_(Linux)|wikipedia TC]] A bit dated, but base references....
   *[[https://tldp.org/HOWTO/Traffic-Control-HOWTO/index.html|Traffic Control HOWTO]]   *[[https://tldp.org/HOWTO/Traffic-Control-HOWTO/index.html|Traffic Control HOWTO]]
   *[[https://lartc.org/|Linux Advanced Routing & Traffic Control]]   *[[https://lartc.org/|Linux Advanced Routing & Traffic Control]]