/ip firewall mangle
add action=mark-connection chain=forward comment=P2p new-connection-mark=
    P2p_conn p2p=all-p2p
add action=mark-packet chain=forward connection-mark=P2p_conn 
    new-packet-mark=P2p passthrough=no
add action=mark-packet chain=forward comment=General connection-mark=
    !P2p_conn new-packet-mark=General
add action=mark-packet chain=forward comment=Small new-packet-mark=Small 
    packet-size=0-32
add action=mark-packet chain=forward new-packet-mark=Small protocol=icmp
add action=mark-packet chain=forward comment=Tcp dst-port=22,23,80,443 
    new-packet-mark=Tcp protocol=tcp
add action=mark-packet chain=forward comment=Small_Big new-packet-mark=
    Small_Big packet-size=33-512
add action=mark-packet chain=forward comment=Big new-packet-mark=Big 
    packet-size=513-1200
/queue tree
add limit-at=1M max-limit=2M name=p2p1 packet-mark=P2p parent=pppoe-out1 
    queue=default
add limit-at=2M max-limit=4M name=p2p2 packet-mark=P2p parent=global queue=
    default
add name=ClassA parent=global priority=7 queue=default
add name=ClassB parent=ClassA queue=default
add name=Leaf1 packet-mark=General parent=ClassA priority=7 queue=default
add name=Leaf2 packet-mark=Small parent=ClassB priority=3 queue=default
add name=Leaf4 packet-mark=Small_Big parent=ClassB priority=5 queue=default
add name=Leaf5 packet-mark=Big parent=ClassB priority=6 queue=default
add name=Leaf3 packet-mark=Tcp parent=ClassB priority=4 queue=default

脚本收集自网络

发表回复

后才能评论

评论(1)