Han-Gang / test

test
0 stars 0 forks source link

网络延迟 和 丢包 #5

Open Han-Gang opened 5 years ago

Han-Gang commented 5 years ago

tc qd add dev eth1 root netem delay 500ms
设置延迟500毫秒

 tc qd show
 output:  qdisc netem 8002: dev eth1 root refcnt 9 limit 1000 delay 500.0ms

查看设置 tc qdisc del dev eth1 root 删除设置

Han-Gang commented 5 years ago

加之前 tc qd show output: qdisc mq 0: dev eth1 root

Han-Gang commented 5 years ago

IPtables丢包 iptables -nvL --line-number

iptables -I INPUT -s 121.14.48.1 -m statistic --mode random --probability 0.5 -j DROP 设置丢包概率 iptables -D INPUT 1
删除