This is an old revision of the document!
Load balancer
Description and cases
L2 traffic balancer mode. This enhancement allows the SSG to be used as a traffic balancer based on IP addresses owned by the AS and defined as local
in asnum.dscp
. DPI functionality does not work in this mode.
A maglev
algorithm with fixed hash table size is used for traffic balancing. Determination of the output interface by the following algorithm:
1 — if src and dst ip both local, then hash is calculated based on these two addresses;
2 — if only src ip local, then hash is calculated based on src ip;
3 — if only dst ip local, hash is calculated on the basis of dst ip;
4 — hash is calculated on the basis of src and dst ip.
Based on the calculated hash value, the output interface is determined by determining the index of the hash table cell containing the interface index from the array of output interfaces. The value from the array of output interfaces is substituted into the current context and pcs_accept
is returned.
Case. Balancer on traffic mirror
Suppose a 400GB traffic mirror needs to be evenly split between four VAS platforms (Value-Added Services) performing traffic analysis, detections, etc.
In this case, SCAT will allow to balance traffic and distribute it evenly — i.e. realize the function of a balancer.
Setup and management
The following settings are required for correct operation:
- Definition of an autonomous system with IP addresses that are used by subscribers. Description
- Marking a given autonomous system as local. Description
- Define input and output interfaces in the configuration file. Input interfaces are defined in the in_dev parameter, and output interfaces in out_dev. Interfaces do not form pairs and constructions of the form are allowed:
in_dev=05-00.0:05-00.1:05-00.2:05-00.3:0b-00.0:0b-00.1:0b-00.2:0b-00.3 out_dev=08-00.0:08-00.1:08-00.2:08-00.3
Или
in_dev=05-00.0 out_dev=out_dev=08-00.0:08-00.1:08-00.2:08-00.3
- Enable balancing mode:
enable_l2_lb=true
Input parameters:
enable_l2_lb=false|true
- enable traffic balancer
lb_hash_out_dev_type = 0|1
- by which value to initialize hash table:
0 — use the internal index of the output interface
1 — use interface name from [in|out]_dev
The following types can be used asdpdk_engine
: 0 (default), 1, and 2.
Information teams
subs prop show active
— dump L2 properties of all active (non-expired) subscribers