File tree 1 file changed +11
-4
lines changed
1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -10,10 +10,17 @@ URL=http://127.0.0.1/file
10
10
mkdir -p tmp
11
11
12
12
type tc 2> /dev/null && (
13
- tc qdisc add dev $DEV root handle 1: prio
14
- tc qdisc add dev $DEV parent 1:3 handle 30: netem delay $DELAY
15
- tc filter add dev $DEV parent 1:0 protocol ip u32 match ip dport $PORT 0xffff flowid 1:3
16
- tc filter add dev $DEV parent 1:0 protocol ip u32 match ip sport $PORT 0xffff flowid 1:3
13
+ tc qdisc add dev $DEV root handle 1: htb
14
+ tc class add dev $DEV parent 1: classid 1:1 htb rate 2mbps
15
+ tc class add dev $DEV parent 1:1 classid 1:6 htb rate 2mbps ceil 1mbps prio 0
16
+ tc filter add dev $DEV parent 1:0 prio 0 protocol ip handle 6 fw flowid 1:6
17
+
18
+ tc filter add dev $DEV parent 1:0 protocol ip u32 match ip dport $PORT 0xffff flowid 1:6
19
+ tc filter add dev $DEV parent 1:0 protocol ip u32 match ip sport $PORT 0xffff flowid 1:6
20
+
21
+ # iptables -D OUTPUT -t mangle -p tcp --sport 8388 -j MARK --set-mark 6
22
+ # iptables -A OUTPUT -t mangle -p tcp --sport 8388 -j MARK --set-mark 6
23
+
17
24
tc qdisc show dev lo
18
25
)
19
26
You can’t perform that action at this time.
0 commit comments