Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

Commit

Permalink
some comment about qdisc is wrong,it is a small mistake,but i think i…
Browse files Browse the repository at this point in the history
…t shoud be modifyed,and then nobody will confuse about it
  • Loading branch information
ChampionL committed Mar 14, 2014
1 parent 77b8df9 commit a5032cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions warden/root/linux/skeleton/net_rate.sh
Expand Up @@ -26,13 +26,13 @@ tc qdisc del dev ${network_host_iface} root 2> /dev/null || true
# delete root ingress tc qdisc
tc qdisc del dev ${network_host_iface} ingress 2> /dev/null || true

# set inbound(outside -> eth0 -> w-<cid>-0 -> w-<cid>-1) rule with tc's tbf(token bucket filter) qdisc
# set outbound(w-<cid>-1 -> w-<cid>-0 -> eth0 -> outside) rule with tbf(token bucket filter)
# rate is the bandwidth
# burst is the burst size
# latency is the maxium time the packet wait to enqueue while no token left
tc qdisc add dev ${network_host_iface} root tbf rate ${RATE}bit burst ${BURST} latency 25ms

# set outbound(w-<cid>-1 -> w-<cid>-0 -> eth0 -> outside) rule
# set inbound(outside -> eth0 -> w-<cid>-0 -> w-<cid>-1) rule with ingress qdisc
tc qdisc add dev ${network_host_iface} ingress handle ffff:

# use u32 filter with target(0.0.0.0) mask (0) to filter all the ingress packets
Expand Down

0 comments on commit a5032cc

Please sign in to comment.