Hi!
I have an FreeBSD box as my network gateway. We are two families living under same roof, so we have an assorted number of devices using our internet link (adsl, 15mbps down/1.5mbps up) at same time. Sometimes one device is using almost all the upload bandwidth causing an horrible slow down on our network. I partially addressed this after reading an article on prioritizing empty TCP ACKs.
I wanna know if would be possible to divide available bandwidth between devices in use while allowing them to borrow free bandwidth. Ex:
set global upload limit to 1.5mbps
set global download limit to 15mbps
set min per user upload limit to 150kbps
set min per user download limit to 1500kbps
If is plenty of band available, allow devices to use it. Eg: sometimes it's just one device, it should have access to all or almost all band. On the moment a second device start to use WAN, divide global limit between those two and so on.
Is that possible?
My actual pf.conf:
Thanks in advance!
I have an FreeBSD box as my network gateway. We are two families living under same roof, so we have an assorted number of devices using our internet link (adsl, 15mbps down/1.5mbps up) at same time. Sometimes one device is using almost all the upload bandwidth causing an horrible slow down on our network. I partially addressed this after reading an article on prioritizing empty TCP ACKs.
I wanna know if would be possible to divide available bandwidth between devices in use while allowing them to borrow free bandwidth. Ex:
set global upload limit to 1.5mbps
set global download limit to 15mbps
set min per user upload limit to 150kbps
set min per user download limit to 1500kbps
If is plenty of band available, allow devices to use it. Eg: sometimes it's just one device, it should have access to all or almost all band. On the moment a second device start to use WAN, divide global limit between those two and so on.
Is that possible?
My actual pf.conf:
Code:
# Macros
########
ext_if = "em0"
int_if = "re0" # macro for internal interface
localnet = $int_if:network
# Tables
########
table <sshguard> persist
table <blockedips> persist file "/etc/pf.blocked.conf"
# Options
#########
set skip on lo0
# Traffic Normalization
#######################
scrub in all no-df random-id max-mss 1440
# Queueing
##########
altq on $ext_if priq bandwidth 1350Kb queue { q_pri, q_def }
queue q_pri priority 7
queue q_def priority 1 priq(default)
# Translation
#############
nat on $ext_if from $localnet to any -> ($ext_if)
# Packet Filtering
##################
antispoof for $ext_if
antispoof for $int_if
#UPNP
pass out on $ext_if proto tcp from $ext_if to any flags S/SA \
keep state queue (q_def, q_pri)
pass in on $ext_if proto tcp from any to $ext_if flags S/SA \
keep state queue (q_def, q_pri)
pass from { lo0, $localnet } to any keep state
Thanks in advance!