0

let's say I have three subnets: 192.168.0.0/24 with 100 mbps uplink 192.168.1.0/24 with 100 mbps uplink 192.168.2.0/24 with 500 mbps unlink

I need to limit the bandwith against example.com so they can occupy up at max 1/3 of their bandwitdh.

acl firstNet src 192.168.0.0/24
acl secondNet src 192.168.1.0/24
acl thirdNet src 192.168.2.0/24
acl example dstdomain .example.com

delay_pools 2
delay_class 1 1
delay_class 2 1

delay_parameters 1 4200000/4200000
delay_parameters 2 20800000/20800000

delay_access 1 allow example firstNet secondNet
delay access 2 allow example thirdNet

This is not working anyhow. Can you kindly tell me where I'm wrong?

Thanks

1 Answers1

0

Delay pools are very tricky. You should deny access of any other client for each pool or they may fall from one pool to another.

delay_access 1 allow example firstNet secondNet
delay_access 1 deny all
delay access 2 allow example thirdNet
delay_access 2 deny all

Bear in mind that delay pools are not very effective in high loads. Especially with big bucket sizes. Try reducing bucket size to few kilo bytes. If no satisfactory results, try using per subnet and per IP pools. That will increase buckets and pools and gives squid a better chance of bandwidth management.

MTG
  • 193
  • 6
  • Thanks MGT for your answer! I will try this first; unluckily my network isn't exactly per-ip-friendly (~ 8.000 addresses with /14 masks in 140 working places all over a country)... – Matteo Fabbroni Apr 12 '18 at 09:00
  • that was based on experience. delay pool type 1 cannot handle all those connections. do not forget to reduce bucket size. – MTG Apr 12 '18 at 11:11