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

some comment about qdisc is wrong,it is a small mistake,but i think it s... #56

Merged
merged 1 commit into from Jun 4, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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