Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   (View Single Post)  
Old 18th May 2009
Enemy Enemy is offline
New User
Join Date: May 2009
Posts: 3
Question [FreeBSD + PF cbq + borrow] Dynamic shaping

Hi all,

Before now I've only used IPFW + Dummynet, but decided to use PF and ALTQ for dynamic shaping. But I can't make it use whole bandwidth when there is only one host on, so the link is free, borrow parameter is designed to expand parent bandwidth when it is free, but not in my case

current configuration gives host only 50% of bandwidth even when the link is free,
here is PF config:
ext_if="rl0" # 
int_if="rl1" # 
lan="" # LAN
set loginterface $ext_if

table <user1_ips> {, } #IP addresses of user1
table <user2_ips> { } #IP of user2
scrub in all
# IN
altq on $int_if cbq bandwidth 100Mb queue { inet_in, default_in }
queue inet_in bandwidth 512Kb { user1_in, user2_in }
queue user1_in bandwidth 50% cbq(red, borrow)
queue user2_in bandwidth 50% cbq(red, borrow)
queue default_in bandwidth 99% cbq(default)

altq on $ext_if cbq bandwidth 100Mb queue { inet_out, default_out }
queue inet_out bandwidth 256Kb { user1_out, user2_out }
queue user1_out bandwidth 50% cbq(red, borrow)
queue user2_out bandwidth 50% cbq(red, borrow)
queue default_out bandwidth 99% cbq(default)

nat on $ext_if from $lan to !$lan -> $ext_if

# Queues
# IN
pass in on $int_if from <user1_ips> to !$lan queue user1_out no state
pass in on $int_if from <user2_ips> to !$lan queue user2_out no state
pass out on $int_if from !$lan to <user1_ips> queue user1_in no state
pass out on $int_if from !$lan to <user2_ips> queue user2_in no state
Also, when I'll solve this problem, I'd like to make different shapes for local-IX traffic and overseas (World) traffic, what's the best way to do this with this config?

Reply With Quote

borrow, cbq, freebsd, pf filter

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic Traffic Shaping LordZ OpenBSD Security 6 19th January 2009 04:30 PM
Ajax dynamic table/spreadsheet robbak Programming 1 7th June 2008 10:33 PM
dhcpd problems... dynamic and static leases present edhunter FreeBSD General 7 16th May 2008 02:34 PM

All times are GMT. The time now is 10:31 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick