I am trying to use the tc
command to manipulate traffic on the docker0 interface.
I run the commands
tc qdisc del dev docker0 root
tc qdisc add dev docker0 root handle 1: tbf rate 100mbps burst 1600 limit 1
I believe this is what it does:
tbf
: Specifies the TBF qdisc to be used.rate 100mbps
: Sets the maximum bandwidth rate to 100 Mbps for the docker0 interface.burst 1600
: Sets the maximum amount of data that can be transmitted in a single burst to 1600 bytes.limit 1
: Limits the token bucket size to 1 token, which limits the amount of data that can be sent at any given time to the burst size.
However, after setting this rule, I can no longer ping containers that are already running and attached to the default docker0 interface. I can also no longer build images that contain commands such as RUN apt-get update -y
.
Why is this the case. Can this qdisc configuration not be used alone?
rate 100mbps
sets the rate to 100 megaBYTES per second (i.e. 800mbit), andburst 1600
sets the burst rate to 1600 bits per second - that looks odd for a start, andlimit
specifies the number of bytes that can be queued waiting for tokens to become available - according to documentation