dynamic shaping or smth like that :)

Dear Sirs,

I've got FTP server running behind linux firewall, but in short plans I will replace it with freebsd FreeBSD one and PF (I love PF). so as new FW will be used, we would like to implement such a thing like a dynamic shaping, which means, that when some client logs in and starts transfer, the traffic will be shaped equally between number of users. If every client had s static IP I could do something like this with PF shaping mechanism and borrow function, but IPs are not known (clients use DHCP IPs). Can PF handle this? or IPFW? Or do I need some other type of load-balancer?

Thanks..
 
Well, I know, what is ALTQ in general (and I gave an example in my post, when cCBQbq could be in use), but it is not suitable for my situation.
But I've never played with HFSC, seems like it should solve this problem?
 
You usually don't shape based on a user, you shape traffic based on protocol/functionality.

You would, for example limit FTP traffic so it doesn't interfere with your VoIP. If only one user uses FTP he/she is lucky and gets a lot of bandwidth (but not enough to interfere with VoIP). If more users start FTP'ing that available bandwidth is split up.
 
Oh, I gave wrong information (due to poor English? I don't use google translate, I swear :D)

There is no some real priority for anything more behind the firewall. So the thing I managed to make is to share the overall bandwidth more or less equally between all the incoming ftp connections. I even could say more: I would like to share the overall bandwidth between all incoming connections (I would say between incoming IPs). Today I fall in such a situation, when some clients with high speed connections start to download via FTP or UDP, they get all the 40 Mbits bandwidth we have for that department and others, who manage to connect to ftp or udp services transfer files too slow and frequently their connections get timed-out.

So I want to make it shaped more or less equally among incoming IPs.
 
overmind, thanks for your post, but I do know how ALTQ works. I'd like to know if I am able to resolve my problem using ALTQ. The rules in those configurations are bound to IP addresses. Unfortunately I don't know what IP addresses our clients use, as these are not clients on our LAN network. These are WAN clients from over the world, that connect to our server. Some of them have high speed connections, some of them low. Those who have high speed connections are using all of our available bandwidth, preventing users with less high speed connections getting data from our FTP and UDP servers. I want to shape/share our available bandwidth dynamically and more or less equally between those clients despite number of clients. Is there something that could solve my problem? :)
 
I think you can do dynamic shaping only with ipfw.

See this link: http://www.freebsdonline.com/content/view/725/531/

Read Example 5. Router with IPFW Nat Dynamic Limits. That example limits upload to 128Kbps and download to 256Kbps. Instead of hardcoded values, define two variables for upload and download. Note that the value of 256Kbps is for all computers combined. Instead of that value use your own bandwidth values (total upload and total download bandwidth).

This solution is done by using dummynet instead of ALTQ.

You can test your bandwidth with: http://www.numion.com.

If you can accomplish that with PF, I am interested too.
 
Back
Top