Why does this tc ingress limit command not work? (bandwidth drops off to nothing)2019 Community Moderator ElectionDefault mark for packets using iptablesWhy don't the following commands work to limit traffic to port 21 using tc?Traffic shaping with tc does not workIptables: what does this command do?Limit bandwidth of individual HTTP requests while not throttling total bandwidthWhy does ddrescue not utilize full bandwidth?HTB traffic shaper - download speed degradesquid tproxy does not workLink Aggregation (Bonding) for bandwidth does not work when Link Aggregation Groups (LAG) set on smart switchRate limiting with tc on vlans
Could solar power be utilized and substitute coal in the 19th Century
Is it possible to use .desktop files to open local pdf files on specific pages with a browser?
Divine apple island
How should I respond when I lied about my education and the company finds out through background check?
Why did the EU agree to delay the Brexit deadline?
Is there a word to describe the feeling of being transfixed out of horror?
Drawing a topological "handle" with Tikz
Longest common substring in linear time
Can someone explain how this makes sense electrically?
What (else) happened July 1st 1858 in London?
How to color a curve
Customize circled numbers
Wrapping Cryptocurrencies for interoperability sake
Why is Arduino resetting while driving motors?
Did arcade monitors have same pixel aspect ratio as TV sets?
Has Darkwing Duck ever met Scrooge McDuck?
What is this type of notehead called?
MAXDOP Settings for SQL Server 2014
Global amount of publications over time
Remove Expired Scratch Orgs From VSCode
Is there a conventional notation or name for the slip angle?
When quoting, must I also copy hyphens used to divide words that continue on the next line?
Do the concepts of IP address and network interface not belong to the same layer?
Flux received by a negative charge
Why does this tc ingress limit command not work? (bandwidth drops off to nothing)
2019 Community Moderator ElectionDefault mark for packets using iptablesWhy don't the following commands work to limit traffic to port 21 using tc?Traffic shaping with tc does not workIptables: what does this command do?Limit bandwidth of individual HTTP requests while not throttling total bandwidthWhy does ddrescue not utilize full bandwidth?HTB traffic shaper - download speed degradesquid tproxy does not workLink Aggregation (Bonding) for bandwidth does not work when Link Aggregation Groups (LAG) set on smart switchRate limiting with tc on vlans
I'm trying to police my downstream bandwith for a given port - but it seems unless I have a gigantic limit and burst, the download stops completely
IF="wlp3s0"
LIMIT="100kbit"
BURST="100kbit"
PORT="80"
echo "resetting tc"
tc qdisc del dev $IF ingress
echo "setting tc"
tc filter add dev $IF parent ffff:
protocol ip prio 1
u32 match ip dport $PORT 0xffff
police rate $LIMIT burst $BURST drop
flowid :1
tc filter add dev $IF parent ffff:
protocol ip prio 1
u32 match ip sport $PORT 0xffff
police rate $LIMIT burst $BURST drop
flowid :1
I've been tweaking things for quite some time, trying out all sorts of different values for limit and burst - wgetting chozabu.net/testfile (12mb)
any suggestions very welcome!
iptables bandwidth tc
bumped to the homepage by Community♦ yesterday
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I'm trying to police my downstream bandwith for a given port - but it seems unless I have a gigantic limit and burst, the download stops completely
IF="wlp3s0"
LIMIT="100kbit"
BURST="100kbit"
PORT="80"
echo "resetting tc"
tc qdisc del dev $IF ingress
echo "setting tc"
tc filter add dev $IF parent ffff:
protocol ip prio 1
u32 match ip dport $PORT 0xffff
police rate $LIMIT burst $BURST drop
flowid :1
tc filter add dev $IF parent ffff:
protocol ip prio 1
u32 match ip sport $PORT 0xffff
police rate $LIMIT burst $BURST drop
flowid :1
I've been tweaking things for quite some time, trying out all sorts of different values for limit and burst - wgetting chozabu.net/testfile (12mb)
any suggestions very welcome!
iptables bandwidth tc
bumped to the homepage by Community♦ yesterday
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I'm trying to police my downstream bandwith for a given port - but it seems unless I have a gigantic limit and burst, the download stops completely
IF="wlp3s0"
LIMIT="100kbit"
BURST="100kbit"
PORT="80"
echo "resetting tc"
tc qdisc del dev $IF ingress
echo "setting tc"
tc filter add dev $IF parent ffff:
protocol ip prio 1
u32 match ip dport $PORT 0xffff
police rate $LIMIT burst $BURST drop
flowid :1
tc filter add dev $IF parent ffff:
protocol ip prio 1
u32 match ip sport $PORT 0xffff
police rate $LIMIT burst $BURST drop
flowid :1
I've been tweaking things for quite some time, trying out all sorts of different values for limit and burst - wgetting chozabu.net/testfile (12mb)
any suggestions very welcome!
iptables bandwidth tc
I'm trying to police my downstream bandwith for a given port - but it seems unless I have a gigantic limit and burst, the download stops completely
IF="wlp3s0"
LIMIT="100kbit"
BURST="100kbit"
PORT="80"
echo "resetting tc"
tc qdisc del dev $IF ingress
echo "setting tc"
tc filter add dev $IF parent ffff:
protocol ip prio 1
u32 match ip dport $PORT 0xffff
police rate $LIMIT burst $BURST drop
flowid :1
tc filter add dev $IF parent ffff:
protocol ip prio 1
u32 match ip sport $PORT 0xffff
police rate $LIMIT burst $BURST drop
flowid :1
I've been tweaking things for quite some time, trying out all sorts of different values for limit and burst - wgetting chozabu.net/testfile (12mb)
any suggestions very welcome!
iptables bandwidth tc
iptables bandwidth tc
asked Dec 9 '16 at 4:00
ChozabuChozabu
867
867
bumped to the homepage by Community♦ yesterday
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ yesterday
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
I am not quite sure about the wlan interface you are using but I guess you are missing the virtual interface which is supposed to redirect the traffic from ethX or in your case wlan3s0 into ifb which than controls the incoming packet
So, something similar to
modprobe ifb numifbs=1
ip link set dev ifb0 up
tc filter add dev wlp3s0 parent ffff: protocol ip u32 match u32 0 0 action mirred egress redirect dev ifb0
tc qdisc add dev $VIRTUAL root handle 2: htb
tc filter add dev $VIRTUAL protocol ip parent 2: prio 1 u32 match ip sport $PORT 0xffff police rate $LIMIT burst $BURST drop
flowid :1
I have created a bash script which allows you to filter bandwidth for incoming and/or outgoing traffic on specific ip address (or network)
https://gist.github.com/ole1986/d9d6be5218affd41796610a35e3b069c
Usage: ./traffic-control.sh [-r|--remove] [-i|--incoming] [-o|--outgoing] <IP>
Arguments:
-r|--remove : removes all traffic control being set
-i|--incoming : limit the bandwidth only for incoming packetes
-o|--outgoing : limit the bandwidth only for outgoing packetes
<IP> : the ip address to limit the traffic for
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f329099%2fwhy-does-this-tc-ingress-limit-command-not-work-bandwidth-drops-off-to-nothing%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I am not quite sure about the wlan interface you are using but I guess you are missing the virtual interface which is supposed to redirect the traffic from ethX or in your case wlan3s0 into ifb which than controls the incoming packet
So, something similar to
modprobe ifb numifbs=1
ip link set dev ifb0 up
tc filter add dev wlp3s0 parent ffff: protocol ip u32 match u32 0 0 action mirred egress redirect dev ifb0
tc qdisc add dev $VIRTUAL root handle 2: htb
tc filter add dev $VIRTUAL protocol ip parent 2: prio 1 u32 match ip sport $PORT 0xffff police rate $LIMIT burst $BURST drop
flowid :1
I have created a bash script which allows you to filter bandwidth for incoming and/or outgoing traffic on specific ip address (or network)
https://gist.github.com/ole1986/d9d6be5218affd41796610a35e3b069c
Usage: ./traffic-control.sh [-r|--remove] [-i|--incoming] [-o|--outgoing] <IP>
Arguments:
-r|--remove : removes all traffic control being set
-i|--incoming : limit the bandwidth only for incoming packetes
-o|--outgoing : limit the bandwidth only for outgoing packetes
<IP> : the ip address to limit the traffic for
add a comment |
I am not quite sure about the wlan interface you are using but I guess you are missing the virtual interface which is supposed to redirect the traffic from ethX or in your case wlan3s0 into ifb which than controls the incoming packet
So, something similar to
modprobe ifb numifbs=1
ip link set dev ifb0 up
tc filter add dev wlp3s0 parent ffff: protocol ip u32 match u32 0 0 action mirred egress redirect dev ifb0
tc qdisc add dev $VIRTUAL root handle 2: htb
tc filter add dev $VIRTUAL protocol ip parent 2: prio 1 u32 match ip sport $PORT 0xffff police rate $LIMIT burst $BURST drop
flowid :1
I have created a bash script which allows you to filter bandwidth for incoming and/or outgoing traffic on specific ip address (or network)
https://gist.github.com/ole1986/d9d6be5218affd41796610a35e3b069c
Usage: ./traffic-control.sh [-r|--remove] [-i|--incoming] [-o|--outgoing] <IP>
Arguments:
-r|--remove : removes all traffic control being set
-i|--incoming : limit the bandwidth only for incoming packetes
-o|--outgoing : limit the bandwidth only for outgoing packetes
<IP> : the ip address to limit the traffic for
add a comment |
I am not quite sure about the wlan interface you are using but I guess you are missing the virtual interface which is supposed to redirect the traffic from ethX or in your case wlan3s0 into ifb which than controls the incoming packet
So, something similar to
modprobe ifb numifbs=1
ip link set dev ifb0 up
tc filter add dev wlp3s0 parent ffff: protocol ip u32 match u32 0 0 action mirred egress redirect dev ifb0
tc qdisc add dev $VIRTUAL root handle 2: htb
tc filter add dev $VIRTUAL protocol ip parent 2: prio 1 u32 match ip sport $PORT 0xffff police rate $LIMIT burst $BURST drop
flowid :1
I have created a bash script which allows you to filter bandwidth for incoming and/or outgoing traffic on specific ip address (or network)
https://gist.github.com/ole1986/d9d6be5218affd41796610a35e3b069c
Usage: ./traffic-control.sh [-r|--remove] [-i|--incoming] [-o|--outgoing] <IP>
Arguments:
-r|--remove : removes all traffic control being set
-i|--incoming : limit the bandwidth only for incoming packetes
-o|--outgoing : limit the bandwidth only for outgoing packetes
<IP> : the ip address to limit the traffic for
I am not quite sure about the wlan interface you are using but I guess you are missing the virtual interface which is supposed to redirect the traffic from ethX or in your case wlan3s0 into ifb which than controls the incoming packet
So, something similar to
modprobe ifb numifbs=1
ip link set dev ifb0 up
tc filter add dev wlp3s0 parent ffff: protocol ip u32 match u32 0 0 action mirred egress redirect dev ifb0
tc qdisc add dev $VIRTUAL root handle 2: htb
tc filter add dev $VIRTUAL protocol ip parent 2: prio 1 u32 match ip sport $PORT 0xffff police rate $LIMIT burst $BURST drop
flowid :1
I have created a bash script which allows you to filter bandwidth for incoming and/or outgoing traffic on specific ip address (or network)
https://gist.github.com/ole1986/d9d6be5218affd41796610a35e3b069c
Usage: ./traffic-control.sh [-r|--remove] [-i|--incoming] [-o|--outgoing] <IP>
Arguments:
-r|--remove : removes all traffic control being set
-i|--incoming : limit the bandwidth only for incoming packetes
-o|--outgoing : limit the bandwidth only for outgoing packetes
<IP> : the ip address to limit the traffic for
answered Jan 8 '17 at 18:11


Ole KOle K
1011
1011
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f329099%2fwhy-does-this-tc-ingress-limit-command-not-work-bandwidth-drops-off-to-nothing%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown