对 iptables 过滤的流量使用 netem

对 iptables 过滤的流量使用 netem

我想仅将 netem 用于桥上的部分流量。

编辑1

所以,我至少能弄清楚一些事情。

tc qdisc del dev eth0.1 root
tc qdisc add dev eth0.1 root handle 1: prio
tc qdisc add dev eth0.1 parent 1:3 handle 30: netem delay 500ms

然而,我无法对此进行 fwmark 过滤器。如果我尝试这样做-j MARK --set-mark 6,我无法使用以下方法过滤它tc filter

tc filter add dev eth0.1 parent 1:0 u32 match mark 0x0006 0x0006 flowid 1:3

当我直接输入 filter 时tc filter,数据包被延迟(证明过滤有效)。当我在 iptables 中使用 -j DROP 时,数据包将被丢弃(证明 iptables 与数据包匹配)。

但我仍然无法将其结合起来。

相关内容