我如何才能对来自不同来源的数据包进行优先排序?

我如何才能对来自不同来源的数据包进行优先排序?

我正在尝试将数据包流优先于进入路由器的其他数据包。我正在运行 twitch 和其他一些后台进程(iperf、其他 youtube live 等),我想将 twitch 流优先于它们。我正在使用 tc 的 prio 来制作 3 个频段。

使用的命令:

  1. tc qdisc add dev ppp0 root handle 1: prio bands 3

  2. tc qdisc add dev ppp0 parent 1:1 sfq perturb 16

  3. tc qdisc add dev ppp0 parent 1:2 sfq perturb 16

  4. 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 中的数据包。

相关内容