Traffic Control or TC (1)

(To be continued …)

Simple Limit

  • Down/Up to 8~9 Mb
tc qdisc add dev IF_NAME root tbf rate 8mbit burst 10kb latency 70ms peakrate 9mbit minburst 1540
  • Down 8Mb / Up 1Mb
# —– #
U32=”tc filter add dev $IF protocol ip parent 1:0 prio 1 u32″
tc qdisc add dev $IF root handle 1: htb default 30
tc class add dev $IF parent 1: classid 1:1 htb rate $DNLD
tc class add dev $IF parent 1: classid 1:2 htb rate $UPLD
$U32 match ip dst $IP/32 flowid 1:1
$U32 match ip src $IP/32 flowid 1:2

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s