Dual PPPOE and load balancing.
Actually I haven't got any problem, just want to ask someone to explain me how it works.
I have 2x connections, both are PPPOE with the same speed, but… the problem is that they have different usage limits. Let's say one is 10GB another 20GB per month. When limit is reached speed goes down to minimum. Now my question is - how pfSense will start working when it reach limit on smaller connection. Let's say both connections are 2 Mbps. After the limit it goes down to 256 Kbps, how pfSense will work then?
Doe's it make sense instead have multi wan gateway to reconnect second PPPOE after the first one reach the limit?
Thanks for help.
There is nothing in pfSense that can detect if the upstream link effective bandwidth has been cut by the ISP.
If you want to just load balance most of your traffic, then you can put different weights on Gateway1 and Gateway2 so that twice as many sessions are allocated on Gateway2. That could potentially help so that 10GB on Gateway1 is used up at about the same time as 20GB on Gateway2.
But actually I suspect that the 1/3 of sessions allocated to Gateway1 will simply get better performance as they will have a whole 2Mbps link to themselves. The 2/3 of connections on Gateway2 will each be slower, but Gateway2 will also run along at 2 Mbps. So Gateway1is likely to run out of quota early anyway.
You could average things out more by messing with limiters also, so that traffic from Gateway1 is limited to 1Mbps - that will make the quota last longer!
After Gateway1 quota is finished, then you would need to change the gateway weights so that the balance is even more skewed. For big speed differences like that, it can be annoying for users, particularly when there are not lots of users, the sucker who happens to be allocated to the slow Gateway1 can only go at 256Kbps. Others who are lucky on Gateway2 might get much faster if their other friends on Gateway2 are not doing bandwidth intensive things.
In a lot of ways, it would be much easier if Gateway1 stopped working completely when its quota runs out. Then the gateway monitor would detect it and all the traffic would be direced to Gateway2.
But how actually balancer works?
If it detect 4 users in total will it push 2 users on one pppoe and another 2 users on another pppoe?
There is nowhere on interface settings to tell that this connection is that speed and another that speed and then balancer would always divide whole traffic on a half or on three parts if we would have 3x pppoe and so on - is it something like this? What will happen if one user will download movies on full available speed and another 5 users just browsing websites - what will happen in this case?
I am just trying understand how it works ?
The balancing just happens by states/connections. Each time something makes a new connection it gets allocated round-robin to the next gateway in the gateway group. Allocation is spread around according to the weight of each gateway, so for:
Gateway1 = weight 1
Gateway2 = weight 2
User connection state 1 goes to Gateway1
User connection state 2 goes to Gateway2
User connection state 3 goes to Gateway2
and then round and round.
Because it is just allocation of number of states, then it does rely on "random" allocation so that users/states that are watching streaming video get mixed around with users/states that are doing less intensive stuff.
If all the video-streamers happen to get their states on the one gateway, then bad luck, they compete with each other.
If there are very few users/states then the "randomness" is not so effective - you will have more times when the allocation does not average out so well.
A single user, even application programme can happily spread over multiple gateways. e.g. when I stay back after hours and use a download manager that makes multiple connections to download bits of a file in parallel, those connections get spread around the gateways and I end up getting effective total download speed = sum of the gateway link speeds.
Thanks for reply, this gives me a picture of this mechanism. I will configure it tomorrow and test it, and later I will think about usage for each connection.
I might be lucky, because both connections are from the same ISP, I might be able to negotiate to summarize all usage and divide it on half and half for each connection - this would be the best solution in this configuration.
I was only worry that if I ask them to divide it on half then at the end of month I would find out that one connection is already reach the limit and on another I still have like 20% left to use and I was wondering how it would affect service quality for every single user. I dont want them to come to me and complain that at the end of month in one moment they can watch youtube with 2Mbps and in another moment (another movie) with 256Kbps.