Cache full para Mikrotik 2.9.27
Esse vai para os colegas que não conseguiram fazer funcionar na versão 2.9.27.
/ ip firewall mangle
add chain=output protocol=tcp src-port=3128 content="X-Cache: HIT" action=mark-connection new-connection-mark=squid-connection-HIT passthrough=yes \
comment="Cache-squid" disabled=no
add chain=output connection-mark=squid-connection-HIT action=mark-packet new-packet-mark=squid-packet-HIT passthrough=no comment="" disabled=no
add chain=prerouting in-interface=Cliente src-address=172.16.0.0/16 action=mark-packet new-packet-mark=test-up passthrough=no comment="UP TRAFFIC" \
disabled=no
add chain=forward src-address=172.16.0.0/16 action=mark-connection new-connection-mark=test-conn passthrough=yes comment="CONN-MARK" disabled=no
add chain=forward in-interface=Link internet connection-mark=test-conn action=mark-packet new-packet-mark=test-down passthrough=no comment="DOWN-DIRECT \
CONNECTION" disabled=no
add chain=output out-interface=Cliente dst-address=172.16.0.0/16 action=mark-packet new-packet-mark=test-down passthrough=no comment="DOWN-VIA PROXY
disabled=no
/ queue tree
add name="downstream" parent=Cliente packet-mark=test-down limit-at=1024000 queue=default priority=1 max-limit=1024000 burst-limit=0 burst-threshold=0 \
burst-time=0s disabled=no
add name="upstream" parent=global-in packet-mark=test-up limit-at=512000 queue=default priority=1 max-limit=512000 burst-limit=0 burst-threshold=0 \
burst-time=0s disabled=no
add name="Cache-full" parent=global-out packet-mark=squid-packet-HIT limit-at=2000000 queue=default priority=8 max-limit=2000000 burst-limit=0 \
burst-threshold=0 burst-time=0s disabled=no
Ta rodando blz o seu Cache Full????
Amigo vc colocou as regras no seu mk ai e ta funcionando blz????
Vc testou nos clientes????
:itsme:
Memoria baixando conforme o uso do mk
Citação:
Postado originalmente por
Josafapalmas
Esse vai para os colegas que não conseguiram fazer funcionar na versão 2.9.27.
/ ip firewall mangle
add chain=output protocol=tcp src-port=3128 content="X-Cache: HIT" action=mark-connection new-connection-mark=squid-connection-HIT passthrough=yes \
comment="Cache-squid" disabled=no
add chain=output connection-mark=squid-connection-HIT action=mark-packet new-packet-mark=squid-packet-HIT passthrough=no comment="" disabled=no
add chain=prerouting in-interface=Cliente src-address=172.16.0.0/16 action=mark-packet new-packet-mark=test-up passthrough=no comment="UP TRAFFIC" \
disabled=no
add chain=forward src-address=172.16.0.0/16 action=mark-connection new-connection-mark=test-conn passthrough=yes comment="CONN-MARK" disabled=no
add chain=forward in-interface=Link internet connection-mark=test-conn action=mark-packet new-packet-mark=test-down passthrough=no comment="DOWN-DIRECT \
CONNECTION" disabled=no
add chain=output out-interface=Cliente dst-address=172.16.0.0/16 action=mark-packet new-packet-mark=test-down passthrough=no comment="DOWN-VIA PROXY
disabled=no
/ queue tree
add name="downstream" parent=Cliente packet-mark=test-down limit-at=1024000 queue=default priority=1 max-limit=1024000 burst-limit=0 burst-threshold=0 \
burst-time=0s disabled=no
add name="upstream" parent=global-in packet-mark=test-up limit-at=512000 queue=default priority=1 max-limit=512000 burst-limit=0 burst-threshold=0 \
burst-time=0s disabled=no
add name="Cache-full" parent=global-out packet-mark=squid-packet-HIT limit-at=2000000 queue=default priority=8 max-limit=2000000 burst-limit=0 \
burst-threshold=0 burst-time=0s disabled=no
Amigo, a regra aqui ta funcionando beleza, mais apos implementar essa regra do cache full no meu mk, percebi q a cada tempo, a memoria q tenho no mk vai baixando, isso ate q ela fique em torno de 20 mb, ate entao eu limpar o cache e reiniciar o mk p RAM ta voltando ao normal q é 460mb +/-, vc sabe o q pode ser isso?
Abraços.
cache full na versão 2.9.27
/ ip firewall nat
add chain=dstnat in-interface=Cliente protocol=tcp dst-port=80 action=redirect \to-ports=3128 comment="" disabled=no
add chain=srcnat out-interface=Link action=masquerade comment="" disabled=no
/ ip firewall mangle
add chain=output protocol=tcp src-port=3128 content="X-Cache: HIT" \action=mark-connection new-connection-mark=squid-connection-HIT \
passthrough=yes comment="Cache-squid" disabled=no
add chain=output connection-mark=squid-connection-HIT action=mark-packet \ new-packet-mark=squid-packet-HIT passthrough=yes comment="" disabled=no
/ queue tree
add name="Cache-full" parent=global-out packet-mark=squid-packet-HIT \ limit-at=100M queue=default priority=8 max-limit=100M burst-limit=0 \burst-threshold=0 burst-time=0s disabled=no
/ ip web-proxy
set enabled=yes src-address=0.0.0.0 port=3128 hostname="proxy" \
transparent-proxy=yes parent-proxy=0.0.0.0:0 \
cache-administrator=" webmaster" max-object-size=700000000KiB cache-drive=system \ max-cache-size=unlimited max-ram-cache-size=unlimited
No web-proxy é só aumentar a capacidade do "max-object-size" para 700MB (significa que qualquer arquivo com até 700MB ficará no cache para baixar a full).