Sample Header Ad - 728x90

ipfw dummynet per ip fair traffic shaping

2 votes
0 answers
190 views
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: 1. What is the difference between 0xffffffff and 0x00000000 and what should be used for per ip fair shaping ? 2. What is the size of queue should be sеt for pipe, because as I understand this is quite important? 3. Maybe there is a more simple way to achieve this task?
Asked by Никита (21 rep)
Dec 17, 2019, 10:18 AM