Hardware:
RB532A
R OS mipsle 5.2
Eth1 = LAN = 192.168.0.1/24 with DHCP
wlan = ISP1 = 192.168.1.2/24
Eth2 = ISP2 = 192.168.2.2/24
PCC is working fine, but PCQ only limits downloads from LAN users, uploads goes at full link speed.
I'm trying to limit users on LAN to 512k dowload and 128k upload.
Two questions:
Someone can help me with this?
If i have two links with 10Mb/06Mb max-limit= on queue tree would be 20480k for download and 1228k for upload?
Here is my example setup:
DHCP, DNS... and other config omited
Code: Select all
/ ip address
add address=192.168.0.1/24 network=192.168.0.0 broadcast=192.168.0.255 interface=LAN
add address=192.168.1.2/24 network=192.168.1.0 broadcast=192.168.1.255 interface=ISP1
add address=192.168.2.2/24 network=192.168.2.0 broadcast=192.168.2.255 interface=ISP2
/ ip firewall mangle
# Start mark packets for PCQ
add action=mark-packet chain=prerouting new-packet-mark=LAN-packets-up passthrough=yes src-address=192.168.0.0/24 in-interface=LAN
add action=mark-packet chain=postrouting new-packet-mark=LAN-packets-down passthrough=no dst-address=192.168.0.0/24 out-interface=LAN
# End mark packets for PCQ
add chain=prerouting dst-address=192.168.1.0/24 action=accept in-interface=LAN
add chain=prerouting dst-address=192.168.2.0/24 action=accept in-interface=LAN
add chain=prerouting in-interface=ISP1 connection-mark=no-mark action=mark-connection new-connection-mark=ISP1_conn
add chain=prerouting in-interface=ISP2 connection-mark=no-mark action=mark-connection new-connection-mark=ISP2_conn
add chain=prerouting in-interface=LAN connection-mark=no-mark dst-address-type=!local per-connection-classifier=both-addresses:2/0 action=mark-connection new-connection-mark=ISP1_conn
add chain=prerouting in-interface=LAN connection-mark=no-mark dst-address-type=!local per-connection-classifier=both-addresses:2/1 action=mark-connection new-connection-mark=ISP2_conn
add chain=prerouting connection-mark=ISP1_conn in-interface=LAN action=mark-routing new-routing-mark=to_ISP1
add chain=prerouting connection-mark=ISP2_conn in-interface=LAN action=mark-routing new-routing-mark=to_ISP2
add chain=output connection-mark=ISP1_conn action=mark-routing new-routing-mark=to_ISP1
add chain=output connection-mark=ISP2_conn action=mark-routing new-routing-mark=to_ISP2
/ ip route
add dst-address=0.0.0.0/0 gateway=192.168.1.1 routing-mark=to_ISP1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.2.1 routing-mark=to_ISP2 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.1.1 distance=1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.2.1 distance=2 check-gateway=ping
/ ip firewall nat
add chain=srcnat out-interface=ISP1 action=masquerade
add chain=srcnat out-interface=ISP2 action=masquerade
/queue type
add kind=pcq name="LAN-up" pcq-classifier=src-address pcq-limit=40 pcq-rate=128000 pcq-total-limit=7000
add kind=pcq name="LAN-down" pcq-classifier=dst-address pcq-limit=40 pcq-rate=512000 pcq-total-limit=7000
/queue tree
add name="Bandwidth Management" parent=LAN priority=8
add max-limit=1024k name="LAN Package-up" packet-mark=LAN-packets-up parent="Bandwidth Management" priority=3 queue=LAN-up
add max-limit=10240k name="LAN Package-down" packet-mark=LAN-packets-down parent="Bandwidth Management" priority=3 queue=LAN-down