Re: redundancy with Adsl modem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 03 Jan 2012 09:18:03 -0600, Usuário do Sistema <maiconlp@xxxxxxxxx> wrote:

Thanks, I found few documentation about lsm on Internet.

if somebody has some how to about lsm post here please.


Hi,

I don't have a "how-to" document, but I can offer some tips on the use of lsm.

lsm is a powerful, flexible system, since when lsm detects that an interface is down, it executes a user-supplied script with a bunch of parameters about the interface that changed state (either "up" or "down").  That script can in turn run your router script, passing to it whatever parameters you want (usually the interface name that changed state and the new state). I use the same router script used to initialize the router/firewall, but with different parameters.

I found it necessary to save the state of all interfaces in a bit field, saved as a decimal number in a file on disk.  That allows your router script to know which interfaces are up and which are down, so it can reconfigure load-balancing when lsm notifies that an interface has changed state..  (lsm, when it "triggers," only supplies information about the interface that changed state.  It does not pass any information about what interfaces are up and which are down.)

You can use bash's bitwise operators to retrieve and set interface state information in the bitfield.

For load-balancing, I have had excellent results with the "statistic" module in "probability" mode.  With that module, all you need to do to take an interface out of load-balancing (so it will no longer be selected for NEW connections) is to set it's "prob" value to zero, and readjust the prob values of all the other uplinks.  The routing tables and policy routing rules do not need to be changed.

--
Lloyd
--
To unsubscribe from this list: send the line "unsubscribe netfilter" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux