Sup*_*tik 3 tc
在 Linux tc 中使用“u32 match ip sport 80”我可以匹配端口 80,但是如何匹配端口范围 10000 - 20000 ?
小智 5
您可以使用 ematch - 扩展匹配 - 而不是 u32 过滤器,它支持“小于”和“大于”比较。看看手册页。
以下匹配源端口在70-90范围内的数据包(不包括)
tc filter add dev eth0 parent 1: protocol ip prio 1 基本匹配“cmp(u16 at 0 layer transport gt 70) and cmp(u16 at 0 layer transport lt 90)” flowid 1:3
归档时间:
15 年,7 月 前
查看次数:
11683 次
最近记录:
9 年 前