Created
December 17, 2015 06:36
-
-
Save hrqiang/ecce34646f7a189ba0f1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if test "$1" = "stop"; then | |
tc qdisc del dev eth0 ingress | |
tc qdisc del dev ifb0 root | |
ip link set dev ifb0 down | |
else | |
modprobe ifb | |
ip link set dev ifb0 up | |
tc qdisc add dev eth0 ingress | |
tc filter add dev eth0 parent ffff: protocol ip u32 match ip src 63.209.0.73 flowid 1:1 action mirred egress redirect dev ifb0 | |
tc qdisc add dev ifb0 root netem delay 200ms | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment