RTNETLINK answers :No such file or directory error

前端 未结 3 792
臣服心动
臣服心动 2021-02-07 17:03
1. ETH=$1
2. LATENCY=$2
3. LOSS=$3
4. JITTER=$4
5. BW=$5
6. sudo /sbin/tc qdisc del dev eth0 root
7. sudo /sbin/tc qdisc add dev eth0 root handle 1: netem delay $LATENCY         


        
3条回答
  •  别跟我提以往
    2021-02-07 17:11

    Your handles and parent handles don't match. e.g change to:

    7. sudo /sbin/tc qdisc add dev eth0 root handle 1:1 netem delay $LATENCY $JITTER 
    8. sudo /sbin/tc qdisc add dev eth0 parent 1:1 handle 10:1 netem loss $LOSS
    9. sudo /sbin/tc qdisc add dev eth0 parent 10:1 handle 20:1 htb default 1
    10.sudo /sbin/tc class add dev eth0 parent 20:1 classid 0:1 htb rate $BW ceil $BW
    

    and it should work.

提交回复
热议问题