Shaping Linux Traffic with tc
Вставка
- Опубліковано 4 лип 2024
- In this video we'll explore using tc (traffic control) to shape traffic in a Linux. This can enable you to do things like simulating limited bandwidth to implementing robust quality of service solutions.
blog post: octetz.com/docs/2020/2020-09-...
00:00:00 - Quality of Service
00:05:07 - Traffic Control
00:15:17 - Implementing Shaping - Наука та технологія
Your videos are incredibly good, please don't stop making them
Excellent demo even in 2023!! Much appreciated to give a sense to few of cornerstones of otherwise heavy-looking manual content
Really this is the best introduction to TC i have ever seen! Thanks.
Dude, you definitely have a talent for teaching.
TC is incredible, I did not knew that tool and the stuff you can do with it is amazing, gotta look into it ! Great Video keep up the good work !
Can't believe I watched it from beginning to the end! Great video man, thanks for making this.
This is such a high quality video that I couldn't resist my urge to subscribe! You're great at explaining stuff, Keep it going
amazing stuff, thank you very much for that informative video and sharing the script with us.
was looking for a solution for weeks now and yours did the job perfect!
You definitely have a talent for teaching.
agree here
great video, best introduction to tc I’ve ever read.
What a great video! Thanks for sharing you knowledge!
Thank you for the great video. I understanding tc much better than before. Many thanks
best description i've found on tc.. thank you !
this video was amazing
it really demystified the whole scary tc command for me
thanks man !
I was searching the way to simulate limited bandwith to make a proof of concept network with protocols HTTP and MQ, and I found your video ; great video ...
I wait for this for so long.. thank you!!!!
Such an awesome video! Keep this great work!
This is sooooo good! Thank you so much! Please keep making these videos!
Excellent. This gives me a basis to learn from! Thanks
With one word, this is “awesome”.
You saved by Bachelor's thesis one week before the deadline. Thank you so much
thanks, your explanation is fantastic =] , I'm going to watch more of your videos later this week (and recommend)!!!
Pretty awesome, Thanks for sharing this cool stuff.!!!!👍
Good job, I like your way of teaching:)
High quality video, still a great resource in 2024
it's awesome! Please keep doing it
Really awesome. You should definitely upload more videos
very good explanation .
thank u for this great video.
Very helpful, thank you for this video! :)
8:46 genius stuff. Happy that I worked with you for some time :)
Hey Jiten! Nice to hear from you and thanks :)
Nice explanation.. Thank You..
Great tutorial! Thanks
very informative! thank you!
thank you , this video gives a big help to me .
that's probably most interesting video about qos i've ever seen.
Really rad to hear, thank you!
great video, thanks!
Please keep uploading more videos. Keep it up.
Man you nailed it...
it's awesome!
Excellent explanation with design diagrams! 👏👏👏Do you have a video or blog post explaining the use of `tc` for adding jitter and packet loss?
This is awesome. Please make a video on how to transfer incoming packets on one interface (ent0)to another interface (ent1) using tc command
Awesome video. Never worked with TC. How can I add packet loss to the script you showed in the video? I tried a bunch of variants but can't get it to work.
Thanks for this detailed and yet well explained video. My interface is named "enp0s3" and changed it in the script as required. But when i run it, I get the error "Cannot find device "enp0s3" ".
I am able to send traffic via iperf. So the listening and transmission works well. What could be the reason for the cannot find device error ?
More videos please please please!!!!
Awesome! Very neat! Is there a way to activate this traffic control on specifics ports? Thanks.
Firstly, thanks for the video, really informative!
Could you please suggest how to extend the first simple bandwidth shaping example by adding some network latency (e.g. 60 ms) at the same time?
wow, simple
Hi is there some sort of instead putting ip address on dst_cidr, can we put on tls-host/server name as dest address?
I have a question. How to attach two network adapters a wifi card and ethernet port to one class in order to be shaped as singular device?
Basically I want them both share one bandwidth for download speed with one qdisc which is cake in order to remove ping spikes.
Try reading this. It's old, but good:
lartc.org/lartc.pdf
the dst cidr is for a particular server machine, Is it possible to limit for a particular application on that server ? I dont want to limit the entire server traffic. I want a particular app, it that possible ?
I set this up on a home network. It actually restricted speed (egress) to a target NOT named as CIDR1 or CIDR2. I found that I removed the "default 30" from this line in the script:
$TC qdisc add dev $IF root handle 1: htb #default 30 removed
After this, the non CIDR host speed test (via iperf3) had the expected unrestricted bandwidth results. So I then tried to find documentation on HTB and what "Default 30" was supposed to mean.
Anyone have a clue where to find the answer?
Great video and thanks for sharing. It was never detailed as mentioned in the vid what "default 30" meant. (I still learned a bunch ! :-) Thanks)
Edit.... I found that 'default' in HTB assigns all traffic not defined (filtered) to a flowid (30 in this case). Hope this helps someone, somewhere, sometime...
hello could you send example for simulate slow speed like GPRS or dialup and correct latency settings with tc because, i try it, but not working on inbound traffic just outbound, i need to working both inbound and outbound.
👋, I won't be able to create an example. But I'm hoping you're able to figure it out!
Hi Octetz
Nice videos
I need some clarifications ,
in this example , you are adding qdisc first
tc qdisc add dev eth0 root handle 1:0
then you are creating the class , and then filter.
Can we add filter to the existing qdisc or always we need to create new qdisc and then attach filter to it ,
in my case , in my system,
i just listed the qdiscs , it was showing something like below
tc qdiscs show
qdisc mq 0: dev eth0 root
qdisc pfifo_fast 0: dev eth0 parent :1 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
If i want to add a filter which qdisc i should select (there are 2 qdiscs available above),
i want to add filters to exclude some of the ports , what should be the filter commands ?
Can you please help me on this ?
so what you're saying is that it's basically the nice command, but for the network?
Hi, thanx for a good video. I've been looking for a (c++) api to control tc from my own application, but not found any good hits. Anyone with a good hint? The use case is that I dynamically want to limit bandwidth for e.g. ftp on port 21 based on criteria not possible to detect in the network traffic itself.
netlink socket - see iproute2 source code (tc folder)
This won't work on Arch Linux, we're lacking a kernel module "netem" (network emulation)
Great but it's just egrees. What about ingress?
Dear Josh
This is amazing tutorial, I need your help in addressing why am I not able to limit upload, only download gets limited.
I google lot and couldn't able get any working solutions.
I've emailed you too, i want to take your paid support from you.
Josh is battle-tested in TGIK live streaming, this is nothing for him !
hi
This is why Linux sucks, it's complete torture to do all of this using the command line.