如果你需要做网络优化你可以做小包优先的策略。
以下提供两种小包优先的配置方法
较简单的小包优先配置方法:
/ ip firewall mangle
更改 MSS
add chain=forward protocol=tcp tcp-flags=syn action=change-mss new-mss=1440
comment="" disabled=no
设置包大小 0-32 字节的为 small
add chain=forward packet-size=0-32 action=mark-packet new-packet-mark=small
passthrough=yes comment="" disabled=no
设置包大小为 33-511 字节的为 small_BIG
add chain=forward packet-size=33-511 action=mark-packet new-packet-mark=small
_BIG passthrough=yes comment="" disabled=no
设置包大小为 512-1500 字节的为 big
add chain=forward packet-size=512-1500 action=mark-packet new-packet-mark=big
passthrough=yes comment="" disabled=no
parent=lan ,lan 是内网的接口, 下面依次设置刚刚标记的包的优先级和带宽 (带宽根据实际
网络情况设置 ) priority :small 5 ,small_BIG 6 ,big 8
/ queue tree
add name="small" parent=lan packet-mark=small limit-at=0 queue=default priority=5
max-limit=8M burst-limit=0 burst-threshold=0 burst-time=0s disabled=no
add name="small_big" parent=lan packet-mark=small_BIG limit-at=0 queue=default
priority=6 max-limit=8M burst-limit=0 burst-threshold=0 burst-time=0s disabled=no
add name="big" parent=lan packet-mark=big limit-at=0
较详细的小包优先配置方法:
/ ip firewall mangle
add chain=forward protocol=tcp tcp-flags=syn action=change-mss new-mss=1440
comment="" disabled=no
add chain=forward p2p=all-p2p action=mark-connection
new-connection-mark=p2p_conn passthrough=yes comment="" disabled=no