Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
en:dpi:dpi_components:fastbypass_monitor [2025/05/14 08:51] – [Local and Global States: Bypass Mode] elena.krasnobryzh | en:dpi:dpi_components:fastbypass_monitor [2025/05/14 11:49] (current) – [Minimal Configuration] elena.krasnobryzh | ||
---|---|---|---|
Line 120: | Line 120: | ||
===== Configuration ===== | ===== Configuration ===== | ||
==== Minimal Configuration ==== | ==== Minimal Configuration ==== | ||
- | A minimal | + | The minimum |
**Example: | **Example: | ||
<code bash> | <code bash> | ||
- | LOG_LEVEL=INFO | + | # Logging level - error and information messages |
+ | LOG_LEVEL=INFO | ||
+ | |||
+ | # interface for default listener operation | ||
+ | LISTEN_HEARTBEAT_IFS=eth0 | ||
+ | # interface for working with Bypass cards by default | ||
+ | BYPASS_CARD_IFS=eth0 | ||
+ | |||
+ | # number of unsuccessful HEARTBEAT listener for switching to Bypass mode | ||
+ | LISTEN_HEARTBEAT_FAILED=1 | ||
+ | # number of attempts to receive the default HEARTBEAT signal for the listener | ||
+ | LISTEN_HEARTBEAT_ATTEMPTS=1 | ||
+ | # default HEARTBEAT signal waiting time in milliseconds for listener | ||
+ | LISTEN_HEARTBEAT_TIMEOUT=3000 | ||
+ | |||
+ | # IP address where the daemon is waiting for HEARTBEAT signals | ||
+ | LISTEN_HB_HOST[0]=192.168.1.202 | ||
+ | # port on which the daemon expects HEARTBEAT signals | ||
+ | LISTEN_HB_PORT[0]=3000 | ||
+ | |||
+ | # IP address where the daemon is waiting for HEARTBEAT signals | ||
+ | LISTEN_HB_HOST[1]=192.168.1.202 | ||
+ | # port on which the daemon expects HEARTBEAT signals | ||
+ | LISTEN_HB_PORT[1]=3100 | ||
+ | |||
+ | # IP address of the Bypass card to which the daemon will be connected | ||
+ | BYPASS_CARD_HOST[0]=192.168.1.211 | ||
+ | |||
+ | # IP address of the Bypass card to which the daemon will be connected | ||
+ | BYPASS_CARD_HOST[1]=192.168.1.212 | ||
+ | </ | ||
+ | Above is a sample configuration for receiving HEARTBEAT signals using interface '' | ||
- | LISTEN_HEARTBEAT_IFS=eth0 | + | Bypass cards are connected on interface '' |
- | BYPASS_CARD_IFS=eth0 | + | |
- | LISTEN_HEARTBEAT_FAILED=1 | + | The default values for all listener are set to: |
- | LISTEN_HEARTBEAT_ATTEMPTS=1 | + | |
- | LISTEN_HEARTBEAT_TIMEOUT=3000 | + | |
- | LISTEN_HB_HOST[0]=192.168.1.202 | + | '' |
- | LISTEN_HB_PORT[0]=3000 | + | '' |
- | LISTEN_HB_HOST[1]=192.168.1.202 | + | When the listener does not receive a signal after one attempt within '' |
- | LISTEN_HB_PORT[1]=3100 | + | |
- | BYPASS_CARD_HOST[0]=192.168.1.211 | + | If the number of failed listeners equals or exceeds the set threshold ('' |
- | BYPASS_CARD_HOST[1]=192.168.1.212 | + | |
- | </ | + | When signals are restored, the listener is considered operational. |
- | This example configures the daemon | + | |
- | Bypass cards are connected via '' | + | If the total number of failed listeners becomes less than the threshold, the daemon returns to NORMAL mode and restores the specified IP addresses to the Bypass cards. |
- | Default | + | |
- | '' | + | ==== General Configuration ==== |
- | '' | + | |
+ | The configuration settings below apply to the overall functioning of the daemon. | ||
+ | |||
+ | The listener settings block serves as default values for those listeners that do not have specific configurations defined. The same applies to interface settings for connecting Bypass network cards. | ||
+ | |||
+ | Additionally, | ||
+ | |||
+ | <code bash> | ||
+ | # logging level (optional setting, default is INFO): | ||
+ | # INFO - error and informational messages | ||
+ | # DEBUG - error, informational, | ||
+ | LOG_LEVEL= | ||
+ | |||
+ | # network mask for specified IP addresses (optional setting, default is 32) | ||
+ | // | ||
+ | </ | ||
+ | |||
+ | <code bash> | ||
+ | # default interface for listeners that do not specify an interface name for listening to HEARTBEAT (optional) | ||
+ | LISTEN_HEARTBEAT_IFS= | ||
+ | |||
+ | # default IP address for listeners that do not specify an IP address for listening | ||
+ | // | ||
+ | |||
+ | # default number of attempts to receive a HEARTBEAT signal for listeners without a specific configuration (optional, default is 3) | ||
+ | // | ||
+ | |||
+ | # default timeout in milliseconds for HEARTBEAT signal for listeners without a specific configuration (optional, default is 3000) | ||
+ | // | ||
+ | |||
+ | # number of failed HEARTBEAT listeners to trigger Bypass mode (optional, default is 1) | ||
+ | // | ||
+ | </ | ||
+ | |||
+ | <code bash> | ||
+ | # default | ||
+ | BYPASS_CARD_IFS= | ||
+ | </ | ||
+ | |||
+ | <code bash> | ||
+ | # list of interfaces to shut down when entering Bypass mode (optional) | ||
+ | LISTEN_CUBRO_IFS= | ||
+ | |||
+ | # setting for handling interfaces listed in // | ||
+ | # 1 - shut down specified interfaces when entering Bypass mode | ||
+ | # 0 - take no action with specified interfaces when entering Bypass mode | ||
+ | LISTEN_SHUTDOWN_CUBRO_IFS_WHEN_BYPASS= | ||
+ | </ | ||
+ | |||
+ | <code bash> | ||
+ | # absolute path to the script for bringing up an interface (optional, default – see Note 2) | ||
+ | CMD_SET_UP_INTFS= | ||
+ | |||
+ | # absolute path to the script for bringing down an interface (optional, default – see Note 2) | ||
+ | CMD_SET_DOWN_INTFS= | ||
+ | |||
+ | # absolute path to the script for adding an IP address (optional, default – see Note 2) | ||
+ | CMD_ADD_IP= | ||
+ | |||
+ | # absolute path to the script for removing an IP address (optional, default – see Note 2) | ||
+ | CMD_DEL_IP= | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | |||
+ | All IP addresses specified in the configuration may be presented in the format | ||
+ | |||
+ | Important: If the IP address matches the management IP address used for SSH connections, | ||
+ | |||
+ | This important condition should be considered when configuring IP addresses to avoid conflicts with the management IP and unintended network mask changes. | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | |||
+ | The daemon configuration allows specifying custom scripts for performing basic operations such as enabling/ | ||
+ | |||
+ | The daemon expects the absolute path to a shell script in the respective configuration, | ||
+ | |||
+ | Used variables: | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | Default | ||
+ | * '' | ||
+ | | ||
+ | * '' | ||
+ | | ||
+ | </ | ||
+ | |||
+ | ==== Listener Configuration ==== | ||
+ | |||
+ | Each listener enables receiving HEARTBEAT signals from various DPI devices. Each subsequent listener is specified with the next index (e.g., [0], [1], [2]). | ||
+ | |||
+ | A listener has the following parameters for complete configuration: | ||
+ | <code bash> | ||
+ | # listener ID (optional, default is the index) | ||
+ | LISTEN_HB_ID[0]=0 | ||
+ | |||
+ | # name of the interface where the listener expects HEARTBEAT signals | ||
+ | LISTEN_HB_IFS[0]=eth0 | ||
+ | |||
+ | # IP address/ | ||
+ | LISTEN_HB_HOST[0]=192.168.1.202/ | ||
+ | |||
+ | # port for listening to HEARTBEAT signals | ||
+ | LISTEN_HB_PORT[0]=3000 | ||
+ | |||
+ | # number of attempts to receive a HEARTBEAT signal (optional, default: 3) | ||
+ | LISTEN_HB_ATTEMPTS[0]=3 | ||
+ | |||
+ | # HEARTBEAT signal timeout in milliseconds (optional, default: 3000) | ||
+ | LISTEN_HB_TIMEOUT[0]=3000 | ||
+ | |||
+ | # setting for immediate switch to Bypass mode (optional) | ||
+ | # 1 - if no HEARTBEAT signal received, switch to Bypass immediately | ||
+ | # 0 - if no HEARTBEAT signal received, switch after all attempts (default) | ||
+ | LISTEN_HB_SWITCH_IMMEDIATELY[0]=0 | ||
+ | |||
+ | # list of interfaces to shut down when entering Bypass mode (optional) | ||
+ | LISTEN_CUBRO_IFS[0]=e101-001-0, | ||
+ | |||
+ | # setting to shut down interfaces specified in LISTEN_CUBRO_IFS[N] (optional) | ||
+ | # 1 - shut down specified interfaces when entering Bypass mode | ||
+ | # 0 - take no action with specified interfaces when entering Bypass mode (default) | ||
+ | LISTEN_SHUTDOWN_CUBRO_IFS_WHEN_BYPASS[0]=1 | ||
+ | </ | ||
+ | |||
+ | ==== Bypass Network Card Interface Configuration ==== | ||
+ | |||
+ | The daemon automatically manages (adds/ | ||
+ | Each Bypass card is specified with the next index (e.g., [0], [1], [2]). | ||
+ | |||
+ | Bypass card interfaces have the following parameters for full configuration: | ||
+ | <code bash> | ||
+ | # Bypass card ID (optional, default is the index) | ||
+ | BYPASS_CARD_ID[0]= | ||
+ | |||
+ | # IP address/ | ||
+ | BYPASS_CARD_HOST[0]= | ||
+ | |||
+ | # Bypass card operation mode | ||
+ | # 0 - remove specified IP address when Bypass mode is enabled | ||
+ | # 1 - remove specified IP address when Bypass mode is enabled, add it back when Bypass mode is disabled (default) | ||
+ | BYPASS_CARD_ACTIVE[0]= | ||
- | If a listener fails to receive a signal after one attempt within 3000 ms, it is marked as failed. | + | # forced Bypass card mode |
- | If the number of failed listeners meets or exceeds the threshold | + | # 0 - disable forced mode (default) |
- | When signals are restored, the listener resumes normal operation. | + | # 1 - enable forced mode, IP address remains active regardless of daemon |
- | If the number of failed listeners falls below the threshold, the daemon switches back to NORMAL mode and restores the IPs for the Bypass cards. | + | BYPASS_CARD_FORCE[0]= |
+ | </ | ||