when i have 2 or more bandwidth from 2 or more 3 providers

hi

i have 2 bandwidth from 2 provider.

i want to use from both ( load balance ) by packet or other ways that you offer.

also i want that if one of the bandwidth found problem for example disconnect or have packet loss or latency the router automatically found that and send packets trough another gateway and after that the problem solved router change the condition to time that wasnt any problem.

also if you have other offers please say me about that

thanks

Search the forum for PCC or look at the wiki for PCC. It meats all of your conditions. There are a couple of more reliable ways to discover if a route is down or not than what is provided by default. You can write a script that will perform the functions for you, or there a method that does not use scripts, but relies upon using scope for the route and the check-gateway function.

From your conditions, a script might be the way for you to go as you will have more control over how it measures things, namely with specifying the timeout of the pings and the number of pings sent for the test group. As an example, normally a ping defaults to 1 second timeout, if you want it longer or shorter you can specify that in the script.

can you sat me about difference load balancing,

what is NTH and what is ECMP? say me about difference

thnaks

NTH is an older version, and not as stable as PCC for load balancing. It works, but it can cause broken connections. With PCC you get more control of how it will choose to load balance traffic, like setting it so the same src. IP and dst. IP will always use the same internet connection, this can be required for certain sites like banking sites that will often require multiple connections to work.

ECMP is the easiest load balancing setup to make, it however like NTTH is an older setup and has the drawbacks of potentially make broken connections like mentioned above. I believe that it also has a problem of occasionally clearing out the connections table, this will break things like downloads part way through if it happens. ECMP also has no allowances for loosing a link.

I use PCC on several networks where we have two internet gateways. With 30 - 40 clients on each I notice that one gateway always gets about 10 times more traffic than the other.

My mangle rules/routes are pretty much identical to the example in the Wiki.

How can I get a more even balance of traffic through both gateways?

Weight one route higher than the other with more PCC rules or choose a method that will randomize it a bit more. PCC is based on CONNECTIONS not on bandwidth. All of your connection mark mangle rules should be close to having the same number of packets being processed through them. The router has no way of knowing how much bandwidth any given connection will consume or how long it will last, so there is always the chance of one getting hit more for bandwidth depending on how that particular connection is marked.

Depending on the PCC classifier used, things may be inherently slanted on your specific network. If you’re using src-address, and .10 is a host on your network that causes ten times as much traffic as all other hosts combined, you’ll observe what you’re seeing. PCC is stable in that src-address is always going to match the same for the same source address, and that traffic from that source will subsequently always be put on the same link.