Community discussions

MikroTik App
 
cylent
Member
Member
Topic Author
Posts: 383
Joined: Sun May 28, 2006 10:30 am

cache hit from squid as well as webproxy

Tue Mar 27, 2012 12:47 pm

I have somewhat succeeded in this but half way

i am trying to push out whats in the proxy cache at full speeds to the user over-riding their speed limit.

first, i have hotspot and pppoe on my router.
i have then enabled transparent proxy with:
;;; transparent proxy
     chain=dstnat action=redirect to-ports=8080 protocol=tcp dst-port=80
this pushes everything for port 80 to the mt web proxy and it works!

then on my the MT proxy i have enabled upstream proxy to my squid pfsense box.
and thats also working.
[admin@mt] /ip proxy> print
                 enabled: yes
             src-address: 0.0.0.0
                    port: 8080
            parent-proxy: 10.111.63.41
       parent-proxy-port: 3128
     cache-administrator: admin
          max-cache-size: 50000KiB
           cache-on-disk: no
  max-client-connections: 1000
  max-server-connections: 1000
          max-fresh-time: 3d
   serialize-connections: no
       always-from-cache: no
          cache-hit-dscp: 4
             cache-drive: system
then a mangle rule:
chain=output action=mark-packet new-packet-mark=cache-hit0 passthrough=no dscp=4
and queue:
name="queue1" parent=global-out packet-mark=cache-hit0 limit-at=0 queue=default priority=8 max-limit=0 
     burst-limit=0 burst-threshold=0 burst-time=0s 
now heres the thing;
this works and i see the user gets bursted to higher speeds however its only pulling stuff from the mt web-proxy.
i need it to also pull stuff from the squid pfsense box.

how can i achieve that?
 
jackman
Frequent Visitor
Frequent Visitor
Posts: 57
Joined: Tue Mar 13, 2012 5:30 am
Location: Jakarta, Indonesia
Contact:

Re: cache hit from squid as well as webproxy

Wed Mar 28, 2012 12:00 pm

chain=output action=mark-packet new-packet-mark=cache-hit0 passthrough=no dscp=4
On those code you have marked the packet hit on your Mikrotik define by dscp=4. You need to define or find out the tos/dscp of your hit packet came from pfsense. I hear about zph option but never use it before.

The point is,you will need another packet mark base on dscp/tos came from pfsense and you could make a shapper for this packet mark.

Who is online

Users browsing this forum: Bing [Bot], ShindigNZ and 93 guests