Hello guys,
I have some problems with DSCP (TOS) working with HotSpot, The cache working so fine without the Queues policies (ZPH) (release the cache without limitation) and all the packets hit the cache normally, also I used some scripts to automatically move the static queues above dynamic queues on every login.
The Problem:
When I login into hotspot and do some downloading all the files that I downloaded normally saved into the cache drive, later when I came back to download the same file that I downloaded before (totally sure it's saved into the cache drive) .. it will downloading with QoS Limitation with no ZPH, but I noticed when I deleted the cookies from the HotSpot and from the Internet Explorer and login once again to the hotspot and back to download the files that I downloaded before I surprised to find the ZPH working normally without no QoS Limitation (ONLY THE FILES I DOWNLOADED IN THE FIRST LONGIN) .. back again if I need any files from the cache to pass through with ZPH I need to logout and delete all the cookies from the HotSpot as well from the Internet Explorer and login again, Please I need help with that .
/ip firewall mangle
add action=mark-packet chain=output comment="cached packets" disabled=no dscp=4 new-packet-mark=cached out-interface=LAN \
passthrough=no
add action=mark-packet chain=prerouting comment="" disabled=no new-packet-mark=all passthrough=no
/ip proxy
set always-from-cache=yes cache-administrator="webmaster" cache-drive=system cache-hit-dscp=4 cache-on-disk=yes \
enabled=yes max-cache-size=unlimited max-client-connections=600 max-fresh-time=3d max-server-connections=600 \
parent-proxy=0.0.0.0 parent-proxy-port=0 port=8080 serialize-connections=no src-address=0.0.0.0
/queue type
set default kind=pfifo name="default" pfifo-limit=50
set ethernet-default kind=pfifo name="ethernet-default" pfifo-limit=50
set wireless-default kind=sfq name="wireless-default" sfq-allot=1514 sfq-perturb=5
set synchronous-default kind=red name="synchronous-default" red-avg-packet=1000 red-burst=20 red-limit=60 \
red-max-threshold=50 red-min-threshold=10
set hotspot-default kind=sfq name="hotspot-default" sfq-allot=1514 sfq-perturb=5
add kind=pcq name="PCQ_download" pcq-classifier=dst-address pcq-limit=50 pcq-rate=4000000 pcq-total-limit=2000
add kind=pcq name="PCQ_upload" pcq-classifier=dst-address pcq-limit=50 pcq-rate=2000000 pcq-total-limit=2000
set default-small kind=pfifo name="default-small" pfifo-limit=10
/queue interface
set WAN queue=ethernet-default
set LAN queue=ethernet-default
/queue simple
add comment="" direction=both disabled=no dst-address=0.0.0.0/0 interface=all limit-at=0/0 max-limit=0/0 name="cached" \
packet-marks=cached parent=none priority=8 queue=PCQ_upload/PCQ_download target-addresses=192.168.0.0/24 \
total-queue=default-small
add comment="" direction=both disabled=yes dst-address=0.0.0.0/0 interface=all limit-at=0/0 max-limit=64000/64000 \
name="Test 1" parent=none priority=8 queue=default-small/default-small target-addresses=192.168.0.254/32 \
total-queue=default-small
/ip hotspot profile
set default dns-name="" hotspot-address=0.0.0.0 html-directory=hotspot http-cookie-lifetime=3d http-proxy=0.0.0.0:0 \
login-by=cookie,http-chap name="default" rate-limit="" smtp-server=0.0.0.0 split-user-domain=no use-radius=no
add dns-name="www.non.com" hotspot-address=192.168.0.1 html-directory=hotspot http-cookie-lifetime=3d http-proxy=0.0.0.0:0 \
login-by=cookie,http-chap name="hsprof1" rate-limit="" smtp-server=0.0.0.0 split-user-domain=no use-radius=no
/ip hotspot user profile
set default advertise=no name="default" open-status-page=always shared-users=unlimited status-autorefresh=1m \
transparent-proxy=yes
add advertise=no idle-timeout=none keepalive-timeout=2m name="TEST" on-login="/system script run queue-move" \
open-status-page=always rate-limit="32k/32k" shared-users=1 status-autorefresh=1m transparent-proxy=yes
/ip hotspot
add address-pool=dhcp_pool1 addresses-per-mac=2 disabled=no idle-timeout=5m interface=LAN keepalive-timeout=none \
name="hotspot1" profile=hsprof1
/ip hotspot service-port
set ftp disabled=no
/ip hotspot user
add comment="" disabled=no name="admin" password="" profile=default
add comment="" disabled=no name="user1" password="123" profile=TEST server=hotspot1
/system script
add name="queue-move" policy=ftp,reboot,read,write,policy,test,winbox,password source=":foreach i in=[/queue simple find \
dynamic=no] do={/queue simple move [/queue simple get \$i name] [/queue simple find dynamic=yes]}"