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

Multi tool use
Multi tool use

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










2















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!










share|improve this question














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.



















    2















    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!










    share|improve this question














    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.

















      2












      2








      2








      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!










      share|improve this question














      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






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      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.






















          1 Answer
          1






          active

          oldest

          votes


















          0














          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





          share|improve this answer






















            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
            );



            );













            draft saved

            draft discarded


















            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









            0














            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





            share|improve this answer



























              0














              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





              share|improve this answer

























                0












                0








                0







                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





                share|improve this answer













                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






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jan 8 '17 at 18:11









                Ole KOle K

                1011




                1011



























                    draft saved

                    draft discarded
















































                    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.




                    draft saved


                    draft discarded














                    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





















































                    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







                    va8liiqef,8vJI1bVnR,u,V4sGRUCjCSQqrIHa9Jv,gH1v9w1FZcY3UtsHyy
                    TpSjyM

                    Popular posts from this blog

                    getting Checkpoint VPN SSL Network Extender working in the command lineHow to connect to CheckPoint VPN on Ubuntu 18.04LTS?Will the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayVPN SSL Network Extender in FirefoxLinux Checkpoint SNX tool configuration issuesCheck Point - Connect under Linux - snx + OTPSNX VPN Ububuntu 18.XXUsing Checkpoint VPN SSL Network Extender CLI with certificateVPN with network manager (nm-applet) is not workingWill the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayImport VPN config files to NetworkManager from command lineTrouble connecting to VPN using network-manager, while command line worksStart a VPN connection with PPTP protocol on command linestarting a docker service daemon breaks the vpn networkCan't connect to vpn with Network-managerVPN SSL Network Extender in FirefoxUsing Checkpoint VPN SSL Network Extender CLI with certificate

                    NetworkManager fails with “Could not find source connection”Trouble connecting to VPN using network-manager, while command line worksHow can I be notified about state changes to a VPN adapterBacktrack 5 R3 - Refuses to connect to VPNFeed all traffic through OpenVPN for a specific network namespace onlyRun daemon on startup in Debian once openvpn connection establishedpfsense tcp connection between openvpn and lan is brokenInternet connection problem with web browsers onlyWhy does NetworkManager explicitly support tun/tap devices?Browser issues with VPNTwo IP addresses assigned to the same network card - OpenVPN issues?Cannot connect to WiFi with nmcli, although secrets are provided

                    Marilyn Monroe Ny fiainany manokana | Jereo koa | Meny fitetezanafanitarana azy.