小编Tho*_*mas的帖子

IPv6 的 Linux tc 流量整形

我已经使用 tc 和 htb 进行了流量整形,并且 IPv4 一切正常。现在我想将传入 IPv6 ssh/sftp 流量的带宽限制在合理的范围内,这样就不会干扰更关键的流量。简而言之,没有任何效果:

tc class add dev eth0 parent 1:0 classid 1:14 htb rate 3000kbit ceil 3000kbit prio 3

ip6tables -A POSTROUTING -t mangle -o eth0 -p tcp --dport 22 -j MARK --set-mark 14
tc filter add dev eth0 parent 1:0 protocol ip handle 14 fw flowid 1:14
# or
tc filter add dev eth0 parent 1:0 protocol ipv6 u32 match ip6 protocol 6 0xff match ip6 dport 22 0xffff flowid 1:14
# …
Run Code Online (Sandbox Code Playgroud)

linux ipv6 traffic-shaping bandwidth-control

5
推荐指数
1
解决办法
3721
查看次数

标签 统计

bandwidth-control ×1

ipv6 ×1

linux ×1

traffic-shaping ×1