![我如何才能对来自不同来源的数据包进行优先排序?](https://linux22.com/image/1593256/%E6%88%91%E5%A6%82%E4%BD%95%E6%89%8D%E8%83%BD%E5%AF%B9%E6%9D%A5%E8%87%AA%E4%B8%8D%E5%90%8C%E6%9D%A5%E6%BA%90%E7%9A%84%E6%95%B0%E6%8D%AE%E5%8C%85%E8%BF%9B%E8%A1%8C%E4%BC%98%E5%85%88%E6%8E%92%E5%BA%8F%EF%BC%9F.png)
我正在尝试将数据包流优先于进入路由器的其他数据包。我正在运行 twitch 和其他一些后台进程(iperf、其他 youtube live 等),我想将 twitch 流优先于它们。我正在使用 tc 的 prio 来制作 3 个频段。
使用的命令:
tc qdisc add dev ppp0 root handle 1: prio bands 3
tc qdisc add dev ppp0 parent 1:1 sfq perturb 16
tc qdisc add dev ppp0 parent 1:2 sfq perturb 16
tc qdisc add dev ppp0 parent 1:3 tbf rate 128kbit buffer 100000 latency 100s
我获取了频段 2 中的所有数据包和其他频段上的一些数据包。但我尝试通过应用过滤器将 twitch 的数据包放入频段 1:
tc filter add dev ppp0 parent 1: protocol ip prio 1 u32 match ip sport 443 0xffff flowid 1:1
实际上什么也没发生。但我仍然只收到频段 2 中的数据包。