I want to shape traffic in such way, that no specific user could exhaust WAN connection that much so other users would be affected. I have ISP link with 100Mbits/s bandwidth and sometimes some users can exhaust it when they download something from internet or via vpn from smb in remote office. So, I came out with following rules:
#traffic shaping for office users
#$ipfw pipe 1 config bw 100Mbits/s
#$ipfw queue 1 config pipe 1 weight 2 mask dst-ip 0xffffffff
#traffic from internet to local subnets (wi-fi and wire) going to the queue
#$ipfw add queue 1 ip from any to { 172.30.0.0/24 or 172.30.1.0/24 } in recv em0
# the same thing but with lower weight for guest wi-fi
#$ipfw add queue 1 ip from any to 192.168.0.0/23 in recv em0
#traffic from remote office via vpn going to the queue
#$ipfw add queue 1 ip from any to any in recv tun101
#$ipfw add queue 1 ip from any to any in recv tun100
So, the thing is, that I don't exactly understand following:
- What is the difference between 0xffffffff and 0x00000000 and what should be used for per ip fair shaping ?
- What is the size of queue should be sеt for pipe, because as I understand this is quite important?
- Maybe there is a more simple way to achieve this task?
/usr/share/examples/pf
also provide the examples that perform exactly what you're looking for. :) – somebody Mar 4 '20 at 22:37