RTNETLINK answers :No such file or directory error

前端 未结 4 1665
攒了一身酷
攒了一身酷 2021-02-07 16:43
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         


        
4条回答
  •  广开言路
    2021-02-07 17:05

    RTNETLINK answers :No such file or directory comes for 2 reason.

    • Executing tc qdisc with wrong options
    • Or Kernel module sch_netem is missing

    So check first sch_netem is installed in your machine by using command lsmod -l. If it is missing install using command modprobe sch_netem.

    Even after installing sch_netem, if you get this same error means you are executing with wrong option. For example you can add a impairment on a network interface using ip qdisc add dev .... Similarly for removing this you can do ip qdisc delete dev.... If you are trying to delete an impairment without any prior add means, then also you get this error. And also for wrong options also you get this error.

提交回复
热议问题