[root@hot logs]# tc qdisc del dev eth0 root
RTNETLINK answers: No such file or directory
[root@hot logs]# tc qdisc add dev eth0 root handle 1: htb
[root@hot logs]# tc class add dev eth0 parent 1: classid 1:1 htb rate 500mbit ceil 500mbit
[root@hot logs]# tc class add dev eth0 parent 1:1 classid 1:10 htb rate 500mbit ceil 500mbit
[root@hot logs]# tc qdisc add dev eth0 parent 1:10 sfq perturb 10
[root@hot logs]# tc filter add dev eth0 protocol ip parent 1: prio 50 u32 match ip dst 0.0.0.0/0 flowid 1:10
[root@hot logs]#
nload 查看 网卡流量
hb操作记录,已经生效,限速500M
tc qdisc del dev eth0 root
tc qdisc add dev eth0 root handle 1: htb
tc class add dev eth0 parent 1: classid 1:1 htb rate 500mbit ceil 500mbit
tc class add dev eth0 parent 1:1 classid 1:10 htb rate 500mbit ceil 500mbit
tc qdisc add dev eth0 parent 1:10 sfq perturb 10
tc filter add dev eth0 protocol ip parent 1: prio 50 u32 match ip dst 0.0.0.0/0 flowid 1:10
# 默认让所有的流量都从这个通过