Blame doc/keepalived.conf.SYNOPSIS

Packit Service 5956c7
This file describe all the Keepalived available keywords. The keepalived.conf
Packit Service 5956c7
file is compounded by three configurations parts :
Packit Service 5956c7
Packit Service 5956c7
    * Globals configurations
Packit Service 5956c7
    * VRRP configuration
Packit Service 5956c7
    * LVS configuration
Packit Service 5956c7
    * BFD configuration
Packit Service 5956c7
Packit Service 5956c7
0. Comment string
Packit Service 5956c7
Packit Service 5956c7
There is 2 valid comment valid string : # or ! If you want to add comment
Packit Service 5956c7
in you configuration file use this char.
Packit Service 5956c7
Packit Service 5956c7
0.1. Parameter syntax
Packit Service 5956c7
Packit Service 5956c7
<BOOL> is one of on|off|true|false|yes|no or omitted which defaults to on
Packit Service 5956c7
Packit Service 5956c7
0.2. Conditional configuration and configuration id
Packit Service 5956c7
Packit Service 5956c7
The config-id defaults to the first part of the node name as returned by
Packit Service 5956c7
uname, and can be overridden with the -i or --config-id command line option.
Packit Service 5956c7
Packit Service 5956c7
Any configuration line starting with (i.e. before any whitespace) '@' is a
Packit Service 5956c7
conditional configuration line.  The word immediately following (i.e.
Packit Service 5956c7
without any space) the '@' character is compared against the config-id,
Packit Service 5956c7
and if they don't match, the configuration line is ignored.
Packit Service 5956c7
Packit Service 5956c7
Alternatively, '@^' is a negative comparison, so if the word immediately
Packit Service 5956c7
following does NOT match the config-id, the configuration line IS included.
Packit Service 5956c7
Packit Service 5956c7
The purpose of this is to allow a single configuration file to be used for
Packit Service 5956c7
multiple systems, where the only differences are likely to be the router_id,
Packit Service 5956c7
vrrp instance priorities, and possibly interface names.
Packit Service 5956c7
Packit Service 5956c7
For example:
Packit Service 5956c7
Packit Service 5956c7
global_defs
Packit Service 5956c7
{
Packit Service 5956c7
@main   router_id main_router
Packit Service 5956c7
@backup router_id backup_router
Packit Service 5956c7
}
Packit Service 5956c7
...
Packit Service 5956c7
vrrp_instance VRRP1 {
Packit Service 5956c7
    ...
Packit Service 5956c7
@main    unicast_src_ip 1.2.3.4
Packit Service 5956c7
@backup  unicast_src_ip 1.2.3.5
Packit Service 5956c7
@backup2 unicast_src_ip 1.2.3.6
Packit Service 5956c7
Packit Service 5956c7
    unicast_peer {
Packit Service 5956c7
@^main        1.2.3.4
Packit Service 5956c7
@^backup      1.2.3.5
Packit Service 5956c7
@^backup2     1.2.3.6
Packit Service 5956c7
    }
Packit Service 5956c7
}
Packit Service 5956c7
Packit Service 5956c7
If keepalived is invoked with -i main, or if -i is not specified and the node
Packit Service 5956c7
name is main.SOMETHING, then the router_id will be set to main_router,
Packit Service 5956c7
if invoked with -i backup, or the node name is backup, then backup_router,
Packit Service 5956c7
if not invoked with -i and the node name is not main or backup, or with
Packit Service 5956c7
-i anything else, then the router_id will not be set.
Packit Service 5956c7
Packit Service 5956c7
The unicast peers for main will be 1.2.3.5 and 1.2.3.6.
Packit Service 5956c7
Packit Service 5956c7
0.3. Scripts
Packit Service 5956c7
Packit Service 5956c7
There are three classes of scripts can be configured to be executed.
Packit Service 5956c7
Packit Service 5956c7
a. Notify scripts that are run when a vrrp instance or vrrp group changes state,
Packit Service 5956c7
   or a virtual server quorum changes between up and down.
Packit Service 5956c7
Packit Service 5956c7
b. vrrp tracking scripts that will cause vrrp instances to go down it they exit
Packit Service 5956c7
   a non-zero exist status, or if a weight is specified will add or subtract the
Packit Service 5956c7
   weight to/from the priority of that vrrp instance.
Packit Service 5956c7
Packit Service 5956c7
c. LVS checker misc scripts that will cause a real server to be configured down
Packit Service 5956c7
   if they exit with a non-zero status.
Packit Service 5956c7
Packit Service 5956c7
By default the scripts will be executed by user keepalived_script if that user
Packit Service 5956c7
exists, or if not by root, but for each script the user/group under which it is
Packit Service 5956c7
to be executed can be specified.
Packit Service 5956c7
Packit Service 5956c7
There are significant security implications if scripts are executed with root
Packit Service 5956c7
privileges, especially if the scripts themselves are modifiable or replaceable
Packit Service 5956c7
by a non root user. Consequently, security checks are made at startup to ensure
Packit Service 5956c7
that if a script is executed by root, then it cannot be modified or replaced by
Packit Service 5956c7
a non root user.
Packit Service 5956c7
Packit Service 5956c7
All scripts should be written so that they will terminate on receipt of a SIGTERM
Packit Service 5956c7
signal. Scripts will be sent SIGTERM if their parent terminates, or it is a script
Packit Service 5956c7
the keepalived is awaiting its exit status and it has run for too long.
Packit Service 5956c7
Packit Service 5956c7
0.4 include directive
Packit Service 5956c7
Packit Service 5956c7
It is possible to include further configuration files from within a configuration
Packit Service 5956c7
file, and this can be done to any depth.
Packit Service 5956c7
Packit Service 5956c7
The format of the include directive is:
Packit Service 5956c7
include FILENAME
Packit Service 5956c7
Packit Service 5956c7
FILENAME can be a fully qualified or relative pathname, and can include wildcards,
Packit Service 5956c7
including csh style brace expressions such as "{foo/{,cat,dog},bar}" if glob()
Packit Service 5956c7
supports them.
Packit Service 5956c7
Packit Service 5956c7
After opening an included file, the current directory is set to the directory of
Packit Service 5956c7
the file itself, so any relative paths included from a file are relative to the
Packit Service 5956c7
directory of the including file itself.
Packit Service 5956c7
Packit Service 5956c7
0.5 Parameter substitution
Packit Service 5956c7
Packit Service 5956c7
Substitutable parameters can be specified. The format for defining a parameter is:
Packit Service 5956c7
$PARAMETER=VALUE
Packit Service 5956c7
where there must be no space before the '=' and only whitespace may preceed to '$'.
Packit Service 5956c7
Empty values are allowed.
Packit Service 5956c7
Packit Service 5956c7
Parameter names can be made up of any combination of A-Za-z0-9 and _, but cannot start
Packit Service 5956c7
with a digit. Parameter names starting with an underscore should be considered
Packit Service 5956c7
reserved names that keepalived will define for various pre-defined options.
Packit Service 5956c7
Packit Service 5956c7
After a parameter is defined, any occurrence of $PARAMETER followed by
Packit Service 5956c7
whitespace, or any occurrence of ${PARAMETER} (which need not be followed by
Packit Service 5956c7
whitespace) will be replaced by VALUE.
Packit Service 5956c7
Packit Service 5956c7
Replacement is recursive, so that if a parameter value itself includes a
Packit Service 5956c7
replaceable parameter, then after the first substitution, the parameter
Packit Service 5956c7
in the value will then be replaced; the substitution is done at replacement
Packit Service 5956c7
time and not at definition time, so for example:
Packit Service 5956c7
Packit Service 5956c7
$ADDRESS_BASE=10.2.${ADDRESS_BASE_SUB}
Packit Service 5956c7
$ADDRESS_BASE_SUB=0
Packit Service 5956c7
    ${ADDRESS_BASE}.100/32
Packit Service 5956c7
$ADDRESS_BASE_SUB=10
Packit Service 5956c7
    ${ADDRESS_BASE}.100/32
Packit Service 5956c7
Packit Service 5956c7
will produce:
Packit Service 5956c7
    10.2.0.100/32
Packit Service 5956c7
    10.2.10.100/32
Packit Service 5956c7
Packit Service 5956c7
Note in the above examples the use of both ADDRESS_BASE and ADDRESS_BASE_SUB
Packit Service 5956c7
required braces ({}) since the parameters were not followed by whitespace
Packit Service 5956c7
(after the first substitution which produced 10.2.${ADDRESS_BASE_SUB}.100/32
Packit Service 5956c7
the parameter is still not followed by whitespace).
Packit Service 5956c7
Packit Service 5956c7
If a parameter is not defined, it will not be replaced at all, so for
Packit Service 5956c7
example ${UNDEF_PARAMETER} will remain in the configuration if it is
Packit Service 5956c7
undefined; this means that existing configuration that contains a '$'
Packit Service 5956c7
character (for example in a script definition) will not be changed so
Packit Service 5956c7
long as no new parameter definitions are added to the configuration.
Packit Service 5956c7
Packit Service 5956c7
Parameter substitution works in conjunction with conditional configuration.
Packit Service 5956c7
For example:
Packit Service 5956c7
@main $PRIORITY=240
Packit Service 5956c7
@backup $PRIORITY=200
Packit Service 5956c7
...
Packit Service 5956c7
vrrp_instance VI_0 {
Packit Service 5956c7
    priority $PRIORITY
Packit Service 5956c7
}
Packit Service 5956c7
Packit Service 5956c7
will produce:
Packit Service 5956c7
...
Packit Service 5956c7
vrrp_instance VI_0 {
Packit Service 5956c7
    priority 240
Packit Service 5956c7
}
Packit Service 5956c7
if the config_id is main.
Packit Service 5956c7
Packit Service 5956c7
$IF_MAIN=@main
Packit Service 5956c7
$IF_MAIN priority 240
Packit Service 5956c7
Packit Service 5956c7
will produce
Packit Service 5956c7
 priority 240
Packit Service 5956c7
if the config_id is main and nothing if the config_id is not main, although
Packit Service 5956c7
why anyone would want to use this rather than simply
Packit Service 5956c7
@main priority 240
Packit Service 5956c7
is not known.
Packit Service 5956c7
Packit Service 5956c7
Multiline definitions are also suppored, but when used there must be nothing on
Packit Service 5956c7
the line after the parameter name. A multiline definition is specified by ending
Packit Service 5956c7
each line except the last with a '\' character.
Packit Service 5956c7
Packit Service 5956c7
Example:
Packit Service 5956c7
Packit Service 5956c7
$INSTANCE= \
Packit Service 5956c7
vrrp_instance VI_${NUM} { \
Packit Service 5956c7
    interface eth0.${NUM} \
Packit Service 5956c7
    use_vmac vrrp${NUM}.1 \
Packit Service 5956c7
    virtual_router_id 1 \
Packit Service 5956c7
@high priority 130 \
Packit Service 5956c7
@low priority 120 \
Packit Service 5956c7
    advert_int 1 \
Packit Service 5956c7
    virtual_ipaddress { \
Packit Service 5956c7
        10.0.${NUM}.254/24 \
Packit Service 5956c7
    } \
Packit Service 5956c7
    track_script { \
Packit Service 5956c7
        offset_instance_${NUM} \
Packit Service 5956c7
    } \
Packit Service 5956c7
}
Packit Service 5956c7
Packit Service 5956c7
$NUM=0
Packit Service 5956c7
$INSTANCE
Packit Service 5956c7
Packit Service 5956c7
$NUM=1
Packit Service 5956c7
$INSTANCE
Packit Service 5956c7
Packit Service 5956c7
The use of multiline definitions can be nested.
Packit Service 5956c7
Packit Service 5956c7
Example:
Packit Service 5956c7
Packit Service 5956c7
$RS= \
Packit Service 5956c7
  real_server 192.168.${VS_NUM}.${RS_NUM} 80 { \
Packit Service 5956c7
    weight 1 \
Packit Service 5956c7
    inhibit_on_failure \
Packit Service 5956c7
    smtp_alert \
Packit Service 5956c7
    MISC_CHECK { \
Packit Service 5956c7
	misc_path "${_PWD}/scripts/vs.sh RS_misc.${INST}.${VS_NUM}.${RS_NUM}.0 10.0.${VS_NUM}.4:80->192.168.${VS_NUM}.${RS_NUM}:80" \
Packit Service 5956c7
    } \
Packit Service 5956c7
    MISC_CHECK { \
Packit Service 5956c7
        misc_path "${_PWD}/scripts/vs.sh RS_misc.${INST}.${VS_NUM}.${RS_NUM}.1 10.0.${VS_NUM}.4:80->192.168.${VS_NUM}.${RS_NUM}:80" \
Packit Service 5956c7
    } \
Packit Service 5956c7
    notify_up "${_PWD}/scripts/notify.sh RS_notify.${INST}.${VS_NUM}.${RS_NUM} UP 10.0.${VS_NUM}.4:80->192.168.${VS_NUM}.${RS_NUM}:80" \
Packit Service 5956c7
    notify_down "${_PWD}/scripts/notify.sh RS_notify.${INST}.${VS_NUM}.${RS_NUM} DOWN 10.0.${VS_NUM}.4:80->192.168.${VS_NUM}.${RS_NUM}:80" \
Packit Service 5956c7
  }
Packit Service 5956c7
Packit Service 5956c7
$VS= \
Packit Service 5956c7
virtual_server 10.0.${VS_NUM}.4 80 { \
Packit Service 5956c7
  quorum 2 \
Packit Service 5956c7
  quorum_up "${_PWD}/scripts/notify.sh VS_notify.${INST} UP 10.0.${VS_NUM}.4:80" \
Packit Service 5956c7
  quorum_down "${_PWD}/scripts/notify.sh VS_notify.${INST} DOWN 10.0.${VS_NUM}.4:80" \
Packit Service 5956c7
$RS_NUM=1 \
Packit Service 5956c7
$RS \
Packit Service 5956c7
$RS_NUM=2 \
Packit Service 5956c7
$RS \
Packit Service 5956c7
$RS_NUM=3 \
Packit Service 5956c7
$RS \
Packit Service 5956c7
}
Packit Service 5956c7
Packit Service 5956c7
$VS_NUM=0
Packit Service 5956c7
$ALPHA=alpha
Packit Service 5956c7
$VS
Packit Service 5956c7
Packit Service 5956c7
$VS_NUM=1
Packit Service 5956c7
$ALPHA=
Packit Service 5956c7
$VS
Packit Service 5956c7
Packit Service 5956c7
The above will create 2 virtual servers, each with 3 real servers
Packit Service 5956c7
Packit Service 5956c7
Packit Service 5956c7
0.5.1 Pre-defined definitions
Packit Service 5956c7
Packit Service 5956c7
The following pre-defined definitions are defined:
Packit Service 5956c7
${_PWD}		The directory of the current configuration file
Packit Service 5956c7
		(this can be changed if using the include directive).
Packit Service 5956c7
${_INSTANCE}	The instance name (as defined by the -i option, defaults
Packit Service 5956c7
                  to hostname).
Packit Service 5956c7
Packit Service 5956c7
Additional pre-defiend definitions will be added as their need is identified.
Packit Service 5956c7
It will normally be quite straightforward to add additional pre-defiend
Packit Service 5956c7
definitions, so if you need one, or have a good idea for one, then raise
Packit Service 5956c7
an issue at https://github.com/acasson/keepalived/issues requesting it.
Packit Service 5956c7
Packit Service 5956c7
0.6 Sequence blocks
Packit Service 5956c7
Packit Service 5956c7
A line starting ~SEQ(var, start, step, end) will cause the remainder of the
Packit Service 5956c7
line to be processed multiple times, with the variable $var set initially to
Packit Service 5956c7
start, and then $var will be incremented by step repeatedly, terminating when
Packit Service 5956c7
it is greater than end. step may be omitted, in which case it defaults to 1 or
Packit Service 5956c7
-1, depending on whether end is greater or less than start. Start may also be
Packit Service 5956c7
omitted, in which case it defaults to 1 if end > 0 or -1 if end < 0.
Packit Service 5956c7
Packit Service 5956c7
For example:
Packit Service 5956c7
  ~SEQ(SUBNET, 0, 3) ip_address 10.0.$SUBNET.1
Packit Service 5956c7
would produce:
Packit Service 5956c7
  ip_address 10.0.0.1
Packit Service 5956c7
  ip_address 10.0.1.1
Packit Service 5956c7
  ip_address 10.0.2.1
Packit Service 5956c7
  ip_address 10.0.3.1
Packit Service 5956c7
Packit Service 5956c7
There can be multiple ~SEQ elements on a line, so
Packit Service 5956c7
  $VI4= \
Packit Service 5956c7
  vrrp_track_file offset_instance_4.${IF}.${NUM}.${ID} { \
Packit Service 5956c7
      file "${_PWD}/679/track_files/4.${IF}.${NUM}.${ID}" \
Packit Service 5956c7
      weight -100 \
Packit Service 5956c7
  } \
Packit Service 5956c7
  \
Packit Service 5956c7
  vrrp_instance vrrp4.${IF}.${NUM}.${ID} { \
Packit Service 5956c7
      interface bond${IF}.${NUM} \
Packit Service 5956c7
      use_vmac vrrp4.${IF}.${NUM}.${ID} \
Packit Service 5956c7
      virtual_router_id ${ID} \
Packit Service 5956c7
      priority 130 \
Packit Service 5956c7
      virtual_ipaddress { \
Packit Service 5956c7
          10.${IF}.${NUM}.${ID}/24 \
Packit Service 5956c7
      } \
Packit Service 5956c7
  \
Packit Service 5956c7
      track_file { \
Packit Service 5956c7
          offset_instance_4.${IF}.${NUM}.${ID} \
Packit Service 5956c7
      } \
Packit Service 5956c7
  }
Packit Service 5956c7
Packit Service 5956c7
  ~SEQ(IF,0,7) ~SEQ(NUM,0,31) ~SEQ(ID,1,254) $VI4
Packit Service 5956c7
Packit Service 5956c7
will produce 65024 vrrp instances with names from vrrp4.0.0.1 through to
Packit Service 5956c7
vrrp4.7.31.254.
Packit Service 5956c7
Packit Service 5956c7
0.7 Quoted strings
Packit Service 5956c7
Packit Service 5956c7
Quoted strings are specified between " characters; more specifically a string
Packit Service 5956c7
will only end after a quoted string if there is whitespace afterwards. For
Packit Service 5956c7
example,
Packit Service 5956c7
"abcd" efg h jkl "mnop"
Packit Service 5956c7
will be the single string "abcd efg h jkl mnop", i.e. the embedded " characters
Packit Service 5956c7
are removed.
Packit Service 5956c7
Packit Service 5956c7
Quoted strings can also have escaped characters, like the shell. \a, \b, \E, \f,
Packit Service 5956c7
\n, \r, \t, \v, \nnn and \xXX (where nnn is up to 3 octal digits, and XX is any
Packit Service 5956c7
sequence of hex digits) and \cC (which produces the control version of
Packit Service 5956c7
character C) are all supported. \C for any other character C is just
Packit Service 5956c7
treated as an escaped version of character C, so \\ is a \ character, and
Packit Service 5956c7
\" will be a " character, but it won't start or terminate a quoted string.
Packit Service 5956c7
Packit Service 5956c7
For specifying scripts with parameters, unquoted spaces will separate the
Packit Service 5956c7
parameters.  If it is required for a parameter to contain a space, it should
Packit Service 5956c7
be enclosed in single quotes (').
Packit Service 5956c7
Packit Service 5956c7
0.8 Configuration file syntax parser
Packit Service 5956c7
Packit Service 5956c7
Traditionally the configuration file parser has not been one of the strengths of
Packit Service 5956c7
keepalived. yukki maintains a project on github that is a keepalived syntax
Packit Service 5956c7
checker that may be of use. It can be downloaded from https://github.com/yuuki/gokc
Packit Service 5956c7
Packit Service 5956c7
1. Globals configurations
Packit Service 5956c7
Packit Service 5956c7
This block is divided in 5 sub-blocks :
Packit Service 5956c7
Packit Service 5956c7
    * Global definitions
Packit Service 5956c7
    * Static track groups
Packit Service 5956c7
    * Static addresses
Packit Service 5956c7
    * Static rules
Packit Service 5956c7
    * Static routes
Packit Service 5956c7
Packit Service 5956c7
    1.1. Global definitions
Packit Service 5956c7
Packit Service 5956c7
    The configuration block looks like :
Packit Service 5956c7
Packit Service 5956c7
global_defs {                                 # Block identification
Packit Service 5956c7
    notification_email {                      # Email address to send alerts to
Packit Service 5956c7
       <EMAIL ADDRESS>                        # Standard email address
Packit Service 5956c7
       <EMAIL ADDRESS>
Packit Service 5956c7
       ...
Packit Service 5956c7
    }
Packit Service 5956c7
    notification_email_from <EMAIL ADDRESS>   # Email From dealing with SMTP proto
Packit Service 5956c7
                                              #   defaults to keepalived@<local host name>
Packit Service 5956c7
    smtp_server <ADDRESS>|<DOMAIN_NAME> [<PORT>]
Packit Service 5956c7
                                              # SMTP server IP address or domain name
Packit Service 5956c7
                                              #  with optional port number (defaults to 25)
Packit Service 5956c7
    smtp_helo_name <HOST_NAME>                # name to use in HELO messages
Packit Service 5956c7
                                              #  defaults to local host name
Packit Service 5956c7
    smtp_connect_timeout <INTEGER>            # Number of seconds timeout connect
Packit Service 5956c7
                                              #  remote SMTP server
Packit Service 5956c7
    smtp_alert <BOOL>                         # Sets default state for all smtp_alerts
Packit Service 5956c7
    smtp_alert_vrrp <BOOL>                    # Sets default state for vrrp smtp_alerts
Packit Service 5956c7
    smtp_alert_checker <BOOL>                 # Sets default state for checker smtp_alerts
Packit Service 5956c7
    no_email_faults                           # Don't send smtp alerts for fault conditions
Packit Service 5956c7
    router_id <STRING>                        # String identifying router
Packit Service 5956c7
    vrrp_garp_interval <DECIMAL>              # Sets the default interval between Gratuitous ARP
Packit Service 5956c7
                                              #   (in seconds, resolution microseconds)
Packit Service 5956c7
    vrrp_gna_interval <DECIMAL>               # Sets the default interval between unsolicited NA
Packit Service 5956c7
                                              #   (in seconds, resolution microseconds)
Packit Service 5956c7
    vrrp_mcast_group4 <IPv4 ADDRESS>          # optional, default 224.0.0.18
Packit Service 5956c7
    vrrp_mcast_group6 <IPv6 ADDRESS>          # optional, default ff02::12
Packit Service 5956c7
    vrrp_skip_check_adv_addr <BOOL>           # Checking all the addresses in a received VRRP advert can be time consuming.
Packit Service 5956c7
                                              # Setting this flag means the check won't be carried out if the advert is
Packit Service 5956c7
                                              # from the same master router as the previous advert received.
Packit Service 5956c7
                                              # Default: Don't skip.
Packit Service 5956c7
    default_interface <INTERFACE>             # sets the default interface for static addresses, default eth0
Packit Service 5956c7
    lvs_sync_daemon <INTERFACE> <VRRP_INSTANCE> [id <SYNC_ID>] [maxlen <LEN>] [port <PORT>] [ttl <TTL>] [group <IP ADDR>]
Packit Service 5956c7
                                              # Binding interface, vrrp instance and optional
Packit Service 5956c7
                                              #  syncid (0 to 255) for lvs syncd
Packit Service 5956c7
                                              #  maxlen (1..65507) maximum packet length
Packit Service 5956c7
                                              #  port (1..65535) UDP port number to use
Packit Service 5956c7
                                              #  ttl (1..255)
Packit Service 5956c7
                                              #  group - multicast group address (IPv4 or IPv6)
Packit Service 5956c7
                                              # NOTE: maxlen, port, ttl and group are only available on Linux 4.3 or later.
Packit Service 5956c7
    lvs_timeouts [tcp TO] [tcpfin TO] [udp [TO] # LVS session timeouts
Packit Service 5956c7
    lvs_flush                                 # flush any existing LVS configuration at startup
Packit Service 5956c7
    vrrp_garp_master_delay <INTEGER>          # delay in seconds for second set of gratuitous ARP
Packit Service 5956c7
                                              #  messages after MASTER state transition, default 5.
Packit Service 5956c7
                                              #  0 means no second set.
Packit Service 5956c7
    vrrp_garp_master_repeat <INTEGER>         # how many gratuitous ARP messages after MASTER
Packit Service 5956c7
                                              #  state transition should be sent, default 5
Packit Service 5956c7
    vrrp_garp_lower_prio_delay <INTEGER>      # delay for second set of gratuitous ARPs after lower
Packit Service 5956c7
                                              #  priority advert received when MASTER
Packit Service 5956c7
    vrrp_garp_lower_prio_repeat <INTEGER>     # number of gratuitous ARP messages to send at a time
Packit Service 5956c7
                                              #  after lower priority advert received when MASTER
Packit Service 5956c7
    vrrp_garp_master_refresh <INTEGER>        # Periodic delay in seconds sending
Packit Service 5956c7
                                              #  gratuitous ARP while in MASTER state
Packit Service 5956c7
                                              #  Default: 0 (no refreshing)
Packit Service 5956c7
    vrrp_garp_master_refresh_repeat <INTEGER> # how many gratuitous ARP messages should be sent
Packit Service 5956c7
                                              #  at each periodic repeat
Packit Service 5956c7
                                              #  Default: one (per period)
Packit Service 5956c7
    vrrp_lower_prio_no_advert [<BOOL>]        # If a lower priority advert is received, just discard
Packit Service 5956c7
                                              # it and don't send another advert. This causes adherence
Packit Service 5956c7
                                              # to the RFCs.
Packit Service 5956c7
    vrrp_higher_prio_send_advert [<BOOL>]     # If we are master and receive a higher priority
Packit Service 5956c7
                                              # advert, send an advert (which will be lower priority
Packit Service 5956c7
                                              # than the other master), before we transition to
Packit Service 5956c7
                                              # backup. This means that if the other master has
Packit Service 5956c7
                                              # garp_lower_priority_repeat set, it will resend garp
Packit Service 5956c7
                                              # messages. This is to get around the problem of their
Packit Service 5956c7
                                              # having been two simultaneous masters, and the last GARP
Packit Service 5956c7
                                              # messages seen were from us.
Packit Service 5956c7
    vrrp_version <INTEGER:2..3>               # Default VRRP version (default 2)
Packit Service 5956c7
    vrrp_iptables [keepalived_in [keepalived_out]] # default INPUT
Packit Service 5956c7
                                              # Specifies the iptables chains to add entries to
Packit Service 5956c7
                                              # If no table names are specied, no entries are added
Packit Service 5956c7
    vrrp_ipsets ipset4 [ipset6 [ipset_if6]]   # Set the ipset set names to use. If no names are specified,
Packit Service 5956c7
                                              #   ipsets will not be used. The default ipset4 name is 'keepalived'.
Packit Service 5956c7
                                              # If ipset6 is not specified, '6' as appended to the ipset4 name.
Packit Service 5956c7
                                              #   If ipset_if6 is not specified, any trailing '6' from ipset6
Packit Service 5956c7
                                              #   is removed and '_if6' appended
Packit Service 5956c7
    vrrp_check_unicast_src                    # Check source address of a unicast packet is a
Packit Service 5956c7
                                              # unicast peer
Packit Service 5956c7
    vrrp_strict                               # Enforce strict VRRP protocol compliance. This will prohibit:
Packit Service 5956c7
                                              #   0 VIPs
Packit Service 5956c7
                                              #   unicast peers
Packit Service 5956c7
                                              #   IPv6 addresses in VRRP version 2
Packit Service 5956c7
                                              # Sets:
Packit Service 5956c7
                                              #   vrrp_lower_priority_dont_send_advert
Packit Service 5956c7
                                              #
Packit Service 5956c7
                                              # The following 4 options can be used if vrrp or checker processes
Packit Service 5956c7
                                              #   are timing out. This can be seen by a backup vrrp instance becoming
Packit Service 5956c7
                                              #   master even when the master is still running, due to the master or
Packit Service 5956c7
                                              #   backup systems being busy, they are not processing the vrrp packets.
Packit Service 5956c7
    vrrp_priority <INTEGER:-20..19>           # Set the vrrp child process priority (negative values increase priority)
Packit Service 5956c7
    checker_priority <INTEGER:-20..19>        # Set the checker child process priority
Packit Service 5956c7
    bfd_priority <INTEGER:-20..19>            # Set the BFD child process priority
Packit Service 5956c7
    vrrp_no_swap                              # Set the vrrp child process non swappable
Packit Service 5956c7
    checker_no_swap                           # Set the checker child process non swappable
Packit Service 5956c7
    bfd_no_swap                               # Set the BFD child process non swappable
Packit Service 5956c7
    vrrp_rt_priority <INTEGER:1..99>          # Set the vrrp child process to use real-time scheduling at the specified priority
Packit Service 5956c7
    checker_rt_priority <INTEGER:1..99>       # Set the checker child process to use real-time scheduling at the specified priority
Packit Service 5956c7
    bfd_rt_priority <INTEGER:1..99>           # Set the BFD child process to use real-time scheduling at the specified  priority
Packit Service 5956c7
    vrrp_rlimit_rtime <INTEGER>               # Set the limit on CPU time between blocking system calls, in microseconds (default 10000)
Packit Service 5956c7
    checker_rlimit_rtime <INTEGER>            #   as above
Packit Service 5956c7
    bfd_rlimit_rtime <INTEGER>                #   as above
Packit Service 5956c7
                                              #
Packit Service 5956c7
                                              # If keepalived has been build with SNMP support,
Packit Service 5956c7
                                              #   the following keywords are available
Packit Service 5956c7
                                              # Note: keepalived, checker and rfc support can be
Packit Service 5956c7
                                              #   individually enabled/disabled
Packit Service 5956c7
    snmp_socket <PROTOCOL>:<ADDRESS>[:<PORT>] # specify socket to use for connecting to SNMP master agent (default unix:/var/agentx/master)
Packit Service 5956c7
                                              #   (see source module keepalived/vrrp/vrrp_snmp.c for more details)
Packit Service 5956c7
    enable_snmp_vrrp                          # enable SNMP handling of vrrp element of KEEPALIVED MIB
Packit Service 5956c7
    enable_snmp_checker                       # enable SNMP handling of checker element of KEEPALIVED MIB
Packit Service 5956c7
    enable_snmp_rfc                           # enable SNMP handling of RFC2787 and RFC6527 VRRP MIBs
Packit Service 5956c7
    enable_snmp_rfcv2                         # enable SNMP handling of RFC2787 VRRPv2 MIB
Packit Service 5956c7
    enable_snmp_rfcv3                         # enable SNMP handling of RFC6527 VRRPv3 MIB
Packit Service 5956c7
    enable_traps                              # enable SNMP trap generation
Packit Service 5956c7
                                              #
Packit Service 5956c7
    enable_dbus                               # enable the DBus interface
Packit Service 5956c7
    dbus_service_name SERVICE_NAME            # Name of DBus service (default org.keepalived.Vrrp1)
Packit Service 5956c7
                                              # Useful if you want to run multiple keepalived processes with DBus enabled
Packit Service 5956c7
                                              #
Packit Service 5956c7
    script_user USERNAME [GROUPNAME]          # Specify the default username/groupname to run scripts under
Packit Service 5956c7
                                              # If groupname is not specified, the group of the user is used.
Packit Service 5956c7
                                              # If this option is not specified, the user defaults to keepalived_script
Packit Service 5956c7
                                              # if that user exists, otherwise root.
Packit Service 5956c7
    enable_script_security                    # Don't run scripts configured to be run as root if any part of the path
Packit Service 5956c7
                                              # is writable by a non-root user.
Packit Service 5956c7
    notify_fifo FIFO_NAME                     # FIFO to write notify events to
Packit Service 5956c7
                                              # See vrrp_notify_fifo and lvs_notify_fifo for format of output
Packit Service 5956c7
                                              # For further details, see the description under vrrp_sync_group see
Packit Service 5956c7
                                              # doc/samples/sample_notify_fifo.sh for sample usage.
Packit Service 5956c7
    notify_fifo_script STRING|QUOTED_STRING [username [groupname]]
Packit Service 5956c7
                                              # script to be run by keepalived to process notify events
Packit Service 5956c7
                                              # The FIFO name will be passed to the script as the last parameter
Packit Service 5956c7
    vrrp_notify_fifo FIFO_NAME                # FIFO to write vrrp notify events to (must be different from other FIFO names)
Packit Service 5956c7
                                              # The string written will be a line of the form: INSTANCE "VI_1" MASTER 100
Packit Service 5956c7
                                              # and will be terminated with a new line character.
Packit Service 5956c7
                                              # For further details of the output, see the description under vrrp_sync_group
Packit Service 5956c7
                                              # and doc/samples/sample_notify_fifo.sh for sample usage.
Packit Service 5956c7
    vrrp_notify_fifo_script STRING|QUOTED_STRING [username [groupname]]
Packit Service 5956c7
                                              # script to be run by keepalived to process vrrp notify events
Packit Service 5956c7
                                              # The FIFO name will be passed to the script as the last parameter
Packit Service 5956c7
    lvs_notify_fifo FIFO_NAME                 # FIFO to write notify healthchecker events to (must be different from other FIFO names)
Packit Service 5956c7
                                              # The string written will be a line of the form:
Packit Service 5956c7
                                              #   VS [192.168.201.15]:tcp:80 {UP|DOWN}
Packit Service 5956c7
                                              #   RS [1.2.3.4]:tcp:80 [192.168.201.15]:tcp:80 {UP|DOWN}
Packit Service 5956c7
                                              # and will be terminated with a new line character.
Packit Service 5956c7
    lvs_notify_fifo_script STRING|QUOTED_STRING [username [groupname]]
Packit Service 5956c7
                                              # script to be run by keepalived to process healthchecher notify events
Packit Service 5956c7
                                              # The FIFO name will be passed to the script as the last parameter
Packit Service 5956c7
    dynamic_interfaces [allow_if_changes]     # Allow configuration to include interfaces that don't exist at startup.
Packit Service 5956c7
                                              #   This allows keepalived to work with interfaces that may be deleted
Packit Service 5956c7
                                              #   and restored and also allows virtual and static routes and rules on 
Packit Service 5956c7
                                              #   VMAC interfaces.
Packit Service 5956c7
                                              #   allow_if_changes allows an interface to be deleted and recreated with a
Packit Service 5956c7
                                              #   different type or underlying interface, eg changing from vlan to macvlan
Packit Service 5956c7
                                              #   or changing a macvlan from eth1 to eth2. This is predominantly used for
Packit Service 5956c7
                                              #   reporting duplicate VRID errors at startup if allow_if_changes is not set.
Packit Service 5956c7
Packit Service 5956c7
                                              # The following options are only needed for large configurations, where either
Packit Service 5956c7
                                              # keepalived creates a large number of interface, or the system has a large
Packit Service 5956c7
                                              # number of interface. These options only need using if
Packit Service 5956c7
                                              # "Netlink: Receive buffer overrun" messages are seen in the system logs.
Packit Service 5956c7
                                              # If the buffer size needed exceeds the value in /proc/sys/net/core/rmem_max
Packit Service 5956c7
                                              #  the corresponding force option will need to be set.
Packit Service 5956c7
    vrrp_netlink_cmd_rcv_bufs BYTES           # Set netlink receive buffer size. This is useful for
Packit Service 5956c7
    vrrp_netlink_cmd_rcv_bufs_force <BOOL>    #  very large configurations where a large number of interfaces exist, and
Packit Service 5956c7
    vrrp_netlink_monitor_rcv_bufs BYTES       #  the initial read of the interfaces on the system causes a netlink buffer
Packit Service 5956c7
    vrrp_netlink_monitor_rcv_bufs_force <BOOL> # overrun.
Packit Service 5956c7
    lvs_netlink_cmd_rcv_bufs BYTES            #  The vrrp netlink command and monitor socket and the checker command
Packit Service 5956c7
    lvs_netlink_cmd_rcv_bufs_force <BOOL>     #  and monitor socket buffer sizes can be independently set. 
Packit Service 5956c7
    lvs_netlink_monitor_rcv_bufs BYTES        #  The force flag means to use SO_RCVBUFFORCE, so that the buffer size can
Packit Service 5956c7
    lvs_netlink_monitor_rcv_bufs_force <BOOL> #  exceed /proc/sys/net/core/rmem_max.
Packit Service 5956c7
Packit Service 5956c7
                                              # When a socket is opened, the kernel configures the max rx buffer size for
Packit Service 5956c7
                                              # the socket to /proc/sys/net/core/rmem_default. On some systems this can be
Packit Service 5956c7
                                              # very large, and even generally this can be much larger than necessary.
Packit Service 5956c7
                                              # This isn't a problem so long as keepalived is reading all queued data from
Packit Service 5956c7
                                              # it's sockets, but if rmem_default was set sufficiently large, and if for
Packit Service 5956c7
                                              # some reason keepalived stopped reading, it could consume all system memory.
Packit Service 5956c7
                                              # The vrrp_rx_bufs_policy allows configuring of the rx bufs size when the
Packit Service 5956c7
                                              # sockets are opened. If the policy is MTU, the rx buf size is configured
Packit Service 5956c7
                                              # to the total of interface's MTU * vrrp_rx_bufs_multiplier for each vrrp
Packit Service 5956c7
                                              # instance using the socket. Likewise, if the policy is ADVERT, then it is
Packit Service 5956c7
                                              # the total of each vrrp instances advert packet size * multiplier.
Packit Service 5956c7
                                              # If policy is set to a number, the rx buf size is configured to that number.
Packit Service 5956c7
    vrrp_rx_bufs_policy [MTU|ADVERT|NUMBER]   # default is to use system default
Packit Service 5956c7
    vrrp_rx_bufs_multiplier NUMBER            # default 3
Packit Service 5956c7
Packit Service 5956c7
    rs_init_notifies			      # Send notifies at startup for real servers that are starting up
Packit Service 5956c7
    no_checker_emails                         # Don't send an email every time a real server checker changes state;
Packit Service 5956c7
                                              #   only send email when a real server is added or removed
Packit Service 5956c7
    umask [NUMBER|BITS]                       # The umask to use for creating files. The number can be specified in hex, octal
Packit Service 5956c7
                                              #   or decimal. BITS are I{R|W|X}{USR|GRP|OTH}, e.g. IRGRP, separated by '|'s.
Packit Service 5956c7
                                              #   The default umask is IWGRP | IWOTH. This option cannot override the
Packit Service 5956c7
                                              #   command-line option.
Packit Service 5956c7
}
Packit Service 5956c7
Packit Service 5956c7
net_namespace NAME                            # Set the network namespace to run in
Packit Service 5956c7
                                              # The directory /var/run/keepalived will be created as an unshared mount point,
Packit Service 5956c7
                                              #   for example for pid files.
Packit Service 5956c7
                                              # syslog entries will have _NAME appended to the ident.
Packit Service 5956c7
                                              # Note: the namespace cannot be changed on a configuration reload
Packit Service 5956c7
namespace_with_ipsets                         # ipsets wasn't network namespace aware until Linux 3.13, and so if running with
Packit Service 5956c7
                                              # an earlier version of the kernel, by default use of ipsets is disabled if using
Packit Service 5956c7
                                              # a namespace and vrrp_ipsets isn't specified.
Packit Service 5956c7
                                              # This options overrides the default and allows ipsets to be used
Packit Service 5956c7
                                              # with a namespace on kernels prior to 3.13.
Packit Service 5956c7
Packit Service 5956c7
instance NAME                                 # If multiple instances of keepalived are run in the same namespace, this will
Packit Service 5956c7
                                              #   create pid files with NAME as part of the file names, in /var/run/keepalived.
Packit Service 5956c7
                                              # Note: the instance name cannot be changed on a configuration reload
Packit Service 5956c7
Packit Service 5956c7
use_pid_dir                                   # Create pid files in /var/run/keepalived
Packit Service 5956c7
Packit Service 5956c7
linkbeat_use_polling                          # Use media link failure detection polling fashion
Packit Service 5956c7
Packit Service 5956c7
child_wait_time SECS                          # Time for main process to allow for child processes to exit on termination
Packit Service 5956c7
                                              #   in seconds (default 5). This can be needed for very large configurations.
Packit Service 5956c7
Packit Service 5956c7
    1.2. Static track groups
Packit Service 5956c7
Packit Service 5956c7
    Static track groups are used to allow vrrp instances to track static addresses,
Packit Service 5956c7
    routes and rules. If a static address/route/rule specifies a track group, then
Packit Service 5956c7
    if the address/route/rule is deleted, the vrrp instance will transition to backup,
Packit Service 5956c7
    or to fault state if the address/route/rule cannot be re-added.
Packit Service 5956c7
Packit Service 5956c7
    The syntax for a track group is:
Packit Service 5956c7
Packit Service 5956c7
    track_group GROUP1 {
Packit Service 5956c7
        group {
Packit Service 5956c7
            VI_1
Packit Service 5956c7
            VI_2
Packit Service 5956c7
        }
Packit Service 5956c7
    }
Packit Service 5956c7
Packit Service 5956c7
    1.3. Static addresses
Packit Service 5956c7
Packit Service 5956c7
    The configuration block looks like :
Packit Service 5956c7
Packit Service 5956c7
static_ipaddress {                            # block identification
Packit Service 5956c7
                                              # If no dev element is specified, it defaults to the default_interface (default eth0)
Packit Service 5956c7
					      # The track_group specification refers to a named track_group which lists the vrrp instances which
Packit Service 5956c7
                                              #   will track the address, i.e. if the address is deleted and cannot be restored the vrrp instances
Packit Service 5956c7
                                              #    will transition to fault state.
Packit Service 5956c7
                                              # no_track means that the address will not be reinstated if it is deleted
Packit Service 5956c7
                                              # Note: the broadcast address may be specified as '-' or '+' to clear or set the host
Packit Service 5956c7
                                              #       bits of the address.
Packit Service 5956c7
    <IP ADDRESS>[/<MASK>] [brd <IP ADDRESS>] [dev <STRING>] [scope <SCOPE>] [label <LABEL>] [peer <IP ADDRESS>] [home] [-nodad] [mngtmpaddr] [noprefixroute] [autojoin] [track_group GROUP|no_track]
Packit Service 5956c7
    <IP ADDRESS>[/<MASK>] ...
Packit Service 5956c7
    ...
Packit Service 5956c7
}
Packit Service 5956c7
Packit Service 5956c7
SCOPE can take the following values :
Packit Service 5956c7
    * site
Packit Service 5956c7
    * link
Packit Service 5956c7
    * host
Packit Service 5956c7
    * nowhere
Packit Service 5956c7
    * global
Packit Service 5956c7
Packit Service 5956c7
    1.4. Static rules
Packit Service 5956c7
Packit Service 5956c7
static_rules {                                # block identification
Packit Service 5956c7
                                              # The syntax is that same as for ip rule add, without "ip rule add"
Packit Service 5956c7
                                              # with the addition of tunnel-id option (except shortened option names
Packit Service 5956c7
                                              #   aren't supported due to ambiguities).
Packit Service 5956c7
                                              # For a description of track_group and no_track, see static_addresses
Packit Service 5956c7
                                              # NOTE: since rules without preferences can be added in different orders
Packit Service 5956c7
                                              #   due to vrrp instances transitioning from master to backup etc, rules need
Packit Service 5956c7
                                              #   to have a preference. If a preference is not specified, keepalived will
Packit Service 5956c7
                                              #   assign one, but it will probably not be what you want.
Packit Service 5956c7
                                              # If the rule could apply to either IPv4 or IPv6 it will default to IPv4.
Packit Service 5956c7
                                              #   To force a rule to be IPv6, add the keyword "inet6"
Packit Service 5956c7
    from 192.168.28.0/24 to 192.168.29.0/26 table small iif p33p1 oif wlan0 tos 22 fwmark 24/12 preference 39 realms 30/20 track_group GROUP1
Packit Service 5956c7
    to 1:2:3:4:5:6:7:0/112 from 7:6:5:4:3:2::/96 table 6908 uidrange 10000-19999 no_track
Packit Service 5956c7
    to 1:2:3:4:6:6:7:0/112 from 8:6:5:4:3:2::/96 l3mdev protocol 12 ip_proto UDP sport 10-20 dport 20-30
Packit Service 5956c7
}
Packit Service 5956c7
Packit Service 5956c7
    1.5. Static routes
Packit Service 5956c7
Packit Service 5956c7
    The configuration block looks like :
Packit Service 5956c7
Packit Service 5956c7
static_routes {                               # block identification
Packit Service 5956c7
                                              # The syntax is the same as ip route add, without "ip route add"
Packit Service 5956c7
                                              #   (except shorted option names aren't supported due to ambiguities)
Packit Service 5956c7
                                              # For a description of track_group and no_track, see static_addresses
Packit Service 5956c7
                                              # If the route could apply to either IPv4 or IPv6 it will default to IPv4.
Packit Service 5956c7
                                              #   To force a route to be IPv6, add the keyword "inet6"
Packit Service 5956c7
    192.168.100.0/24 table 6909 nexthop via 192.168.101.1 dev wlan0 onlink weight 1 nexthop via 192.168.101.2 dev wlan0 onlink weight 2
Packit Service 5956c7
    192.168.200.0/24 dev p33p1.2 table 6909 tos 0x04 protocol bird scope link priority 12 mtu 1000 hoplimit 100 advmss 101 rtt 102 rttvar 103 reordering 104 window 105 cwnd 106 ssthresh lock 107 realms PQA/0x14 rto_min 108 initcwnd 109 initrwnd 110 features ecn track_group GROUP1
Packit Service 5956c7
    2001:470:69e9:1:2::4 dev p33p1.2 table 6909 tos 0x04 protocol bird scope link priority 12 mtu 1000 hoplimit 100 advmss 101 rtt 102 rttvar 103 reordering 104 window 105 cwnd 106 ssthresh lock 107 rto_min 108 initcwnd 109 initrwnd 110 features ecn fastopen_no_cookie 1 no_track
Packit Service 5956c7
}
Packit Service 5956c7
Packit Service 5956c7
2. VRRP configuration
Packit Service 5956c7
Packit Service 5956c7
This block is divided in 5 sub-blocks:
Packit Service 5956c7
Packit Service 5956c7
    * VRRP scripts
Packit Service 5956c7
    * VRRP track files
Packit Service 5956c7
    * VRRP track BFDs
Packit Service 5956c7
    * VRRP synchronization group
Packit Service 5956c7
    * VRRP gratuitous ARP/NA intervals
Packit Service 5956c7
    * VRRP instance
Packit Service 5956c7
Packit Service 5956c7
    2.1. VRRP scripts
Packit Service 5956c7
Packit Service 5956c7
    The configuration block looks like :
Packit Service 5956c7
Packit Service 5956c7
vrrp_script <STRING> {          # VRRP script declaration
Packit Service 5956c7
    script <QUOTED_STRING>      # script to run periodically
Packit Service 5956c7
    interval <INTEGER>          # run the script this every seconds
Packit Service 5956c7
    timeout <INTEGER>           # script considered failed after 'timeout' seconds
Packit Service 5956c7
    weight <INTEGER:-253..253>  # adjust priority by this weight
Packit Service 5956c7
    fall <INTEGER>              # required number of failures for KO switch
Packit Service 5956c7
    rise <INTEGER>              # required number of successes for OK switch
Packit Service 5956c7
    user USERNAME [GROUPNAME]   # specify user/group to run script under
Packit Service 5956c7
    init_fail                   # assume script initially is in failed state
Packit Service 5956c7
}
Packit Service 5956c7
Packit Service 5956c7
The script will be executed periodically, every <interval> seconds. Its exit
Packit Service 5956c7
code will be recorded for all VRRP instances which monitor it.
Packit Service 5956c7
Note that the script will only be executed if at least one VRRP instance
Packit Service 5956c7
monitors it.
Packit Service 5956c7
Packit Service 5956c7
The default weight equals 0, which means that any VRRP instance monitoring
Packit Service 5956c7
the script will transition to the fault state after <fall> consecutive failures
Packit Service 5956c7
of the script. After that, <rise> consecutive successes will cause VRRP instances to
Packit Service 5956c7
leave the fault state, unless they are also in the fault state due to other scripts
Packit Service 5956c7
or interfaces that they are tracking.
Packit Service 5956c7
Packit Service 5956c7
A positive weight means that <rise> successes will add <weight> to the priority of all
Packit Service 5956c7
VRRP instances which monitor it. On the opposite, a negative weight will be subtracted
Packit Service 5956c7
from the initial priority in case of <fall> failures.
Packit Service 5956c7
Packit Service 5956c7
    2.2. VRRP track files
Packit Service 5956c7
Packit Service 5956c7
    The configuration block looks like:
Packit Service 5956c7
Packit Service 5956c7
vrrp_track_file <STRING> {      # VRRP track file declaration
Packit Service 5956c7
    file <QUOTED_STRING>        # file to monitor
Packit Service 5956c7
    weight <-254..254>          # default weight (default is 1)
Packit Service 5956c7
    init_file [VALUE] [overwrite] # create the file and/or initialise the value
Packit Service 5956c7
                                # This causes VALUE (default 0) to be written to
Packit Service 5956c7
                                # the specified file at startup if the file doesn't
Packit Service 5956c7
                                # exist, unless overwrite is specified in which case
Packit Service 5956c7
                                # any existing file contents will be overwritten with
Packit Service 5956c7
                                # the specified value.
Packit Service 5956c7
}
Packit Service 5956c7
Packit Service 5956c7
The file will be read whenever it is modified. The value in the file
Packit Service 5956c7
will be recorded for all VRRP instances and sync groups which monitor it.
Packit Service 5956c7
Note that the file will only be read if at least one VRRP instance or
Packit Service 5956c7
sync group monitors it.
Packit Service 5956c7
Packit Service 5956c7
A value will be read as a number in text from the file.  If the weight
Packit Service 5956c7
configured against the track_file is 0, a non-zero value in the file will
Packit Service 5956c7
be treated as a failure status, and a zero value will be treated as
Packit Service 5956c7
an OK status, otherwise the value will be  multiplied by the weight configured
Packit Service 5956c7
in the track_file statement. If the result is less than -253 any VRRP
Packit Service 5956c7
instance or sync group monitoring the script will transition to the fault state
Packit Service 5956c7
(the weight can be 254 to allow for a negative value being read from the file).
Packit Service 5956c7
Packit Service 5956c7
If the vrrp instance or sync group is not the address owner and the result is between
Packit Service 5956c7
-253 and 253, the result will be added to the initial priority of the VRRP instance
Packit Service 5956c7
(a negative value will reduce the priority), although the effective priority will
Packit Service 5956c7
be limited to the range [1,254].
Packit Service 5956c7
Packit Service 5956c7
If a vrrp instance using a track_file is a member of a sync group, unless
Packit Service 5956c7
sync_group_tracking_weight is set on the group weight 0 must be set.
Packit Service 5956c7
Likewise, if the vrrp instance is the address owner, weight 0 must also be set.
Packit Service 5956c7
Packit Service 5956c7
    2.3. BFD Configuration
Packit Service 5956c7
Packit Service 5956c7
    This is an implementation of RFC5880 (Bidirectional forwarding detection),
Packit Service 5956c7
    and this can be configured to work between 2 keepalived instances, but using
Packit Service 5956c7
    unweighted track_bfds between a master/backup pair of VRRP instances means that
Packit Service 5956c7
    the VRRP instance will only be able to come up if both VRRP instance are running,
Packit Service 5956c7
    which somewhat defeats the purpose of VRRP.
Packit Service 5956c7
Packit Service 5956c7
    This imlpementation has been tested with OpenBFDD (available at
Packit Service 5956c7
    https://github.com/dyninc/OpenBFDD).
Packit Service 5956c7
Packit Service 5956c7
    The configuration block looks like :
Packit Service 5956c7
Packit Service 5956c7
bfd_instance <STRING> {
Packit Service 5956c7
    neighbor_ip <IP ADDRESS>           # BFD Neighbor IP (synonym neighbour_ip)
Packit Service 5956c7
    source_ip <IP ADDRESS>             # Source IP to use (optional)
Packit Service 5956c7
    min_rx <INTEGER>                   # Required min RX interval, in ms
Packit Service 5956c7
                                       # (default is 10 ms)
Packit Service 5956c7
    min_tx <INTEGER>                   # Desired min TX interval, in ms
Packit Service 5956c7
                                       # (default is 10 ms)
Packit Service 5956c7
    idle_tx <INTEGER>                  # Desired idle TX interval, in ms
Packit Service 5956c7
                                       # (default is 1000 ms)
Packit Service 5956c7
    multiplier <INTEGER>               # Number of missed packets after
Packit Service 5956c7
                                       # which the session is declared down
Packit Service 5956c7
                                       # (default is 5)
Packit Service 5956c7
    passive                            # Operate in passive mode (default is active)
Packit Service 5956c7
    ttl <INTEGER 0..255>               # outgoing IPv4 ttl to use (default 255)
Packit Service 5956c7
    hoplimit <INTEGER 0..255>          # outgoing IPv6 hoplimit to use (default 64)
Packit Service 5956c7
    max_hops <INTEGER 0..255>          # maximum reduction of ttl/hoplimit in received packet (default 0)
Packit Service 5956c7
                                       #   (255 disables hop count checking)
Packit Service 5956c7
    weight <INTEGER -253..253>         # Default tracking weight
Packit Service 5956c7
    vrrp|checker                       # Only notify vrrp or checker process. Default is notify both.
Packit Service 5956c7
}
Packit Service 5956c7
Packit Service 5956c7
    2.4. VRRP synchronization group
Packit Service 5956c7
Packit Service 5956c7
    The configuration block looks like :
Packit Service 5956c7
Packit Service 5956c7
vrrp_sync_group <STRING> {      # VRRP sync group declaration
Packit Service 5956c7
    group {                     # group of instance to sync together
Packit Service 5956c7
      <STRING>                  #   a
Packit Service 5956c7
      <STRING>                  #       set
Packit Service 5956c7
      ...                       #             of VRRP_Instance string
Packit Service 5956c7
    }
Packit Service 5956c7
    global_tracking             # DEPRECATED. Use track_interface, track_script and
Packit Service 5956c7
                                # track_file on vrrp_sync_groups instead.
Packit Service 5956c7
    sync_group_tracking_weight  # allow sync groups to use differing weights. This
Packit Service 5956c7
                                # probably WON'T WORK, but is a replacement for
Packit Service 5956c7
                                # global_tracking in case different weights were used
Packit Service 5956c7
                                # across different vrrp instances in the same sync
Packit Service 5956c7
                                # group.
Packit Service 5956c7
    track_interface {           # Interfaces state we monitor
Packit Service 5956c7
      <STRING>
Packit Service 5956c7
      <STRING>
Packit Service 5956c7
      <STRING> weight <INTEGER:-253..253>
Packit Service 5956c7
      ...
Packit Service 5956c7
    }
Packit Service 5956c7
    track_script {              # Scripts state we monitor
Packit Service 5956c7
      <STRING>
Packit Service 5956c7
      <STRING> weight <INTEGER:-253..253>
Packit Service 5956c7
      ...
Packit Service 5956c7
    }
Packit Service 5956c7
    track_file {                # Files state we monitor
Packit Service 5956c7
      <STRING>			# weight defaults to value configured in the vrrp_track_file
Packit Service 5956c7
      <STRING> weight <INTEGER: -254..254>
Packit Service 5956c7
      ...
Packit Service 5956c7
    }
Packit Service 5956c7
    track_bfd {                 # BFD instance we monitor
Packit Service 5956c7
      <STRING>
Packit Service 5956c7
      <STRING>
Packit Service 5956c7
      <STRING> weight <INTEGER: -253..253>
Packit Service 5956c7
      ...
Packit Service 5956c7
    }
Packit Service 5956c7
Packit Service 5956c7
                                # The username and groupname specify the user and group
Packit Service 5956c7
                                # under which the scripts should be run. If username is
Packit Service 5956c7
                                # specified, the group defaults to the group of the user.
Packit Service 5956c7
                                # If username is not specified, they default to the
Packit Service 5956c7
                                # global script_user and script_group
Packit Service 5956c7
    notify_master <STRING>|<QUOTED-STRING> [username [groupname]]
Packit Service 5956c7
                                # Script to run during MASTER transit
Packit Service 5956c7
    notify_backup <STRING>|<QUOTED-STRING> [username [groupname]]
Packit Service 5956c7
                                # Script to run during BACKUP transit
Packit Service 5956c7
    notify_fault <STRING>|<QUOTED-STRING> [username [groupname]]
Packit Service 5956c7
                                # Script to run during FAULT transit
Packit Service 5956c7
    notify_stop <STRING>|<QUOTED-STRING> [username [groupname]]
Packit Service 5956c7
                                # Script to launch when stopping vrrp
Packit Service 5956c7
    notify <STRING>|<QUOTED-STRING> [username [groupname]]
Packit Service 5956c7
                                # Script to run during ANY state transit (1)
Packit Service 5956c7
    smtp_alert <BOOL>           # Send email notification during state transit
Packit Service 5956c7
                                #   (default no, unless global smtp_alert/smtp_alert_vrrp set)
Packit Service 5956c7
}
Packit Service 5956c7
Packit Service 5956c7
    Synchronization group tracking scripts and files will update
Packit Service 5956c7
    the status/priority of all VRRP instances which are members of
Packit Service 5956c7
    the sync group.
Packit Service 5956c7
Packit Service 5956c7
(1) The "notify" script is called AFTER the corresponding notify_* script has
Packit Service 5956c7
    been called, and is given 4 additional arguments following the configured
Packit Service 5956c7
    arguments:
Packit Service 5956c7
Packit Service 5956c7
    $(n-3) = A string indicating whether it's a "GROUP" or an "INSTANCE"
Packit Service 5956c7
    $(n-2) = The name of said group or instance
Packit Service 5956c7
    $(n-1) = The state it's transitioning to ("MASTER", "BACKUP", "FAULT" or "STOP")
Packit Service 5956c7
    $(n)   = The priority value
Packit Service 5956c7
Packit Service 5956c7
    $(n-3) and $(n-1) are ALWAYS sent in uppercase, and the possible strings sent are the
Packit Service 5956c7
    same ones listed above ("GROUP"/"INSTANCE", "MASTER"/"BACKUP"/"FAULT"/"STOP")
Packit Service 5956c7
    (note: STOP is only applicable to instances)
Packit Service 5956c7
Packit Service 5956c7
Important: for a SYNC group to run reliably, it is vital that all instances in
Packit Service 5956c7
           the group are MASTER or that they are all either BACKUP or FAULT. A
Packit Service 5956c7
           situation with half instances having higher priority on machine A
Packit Service 5956c7
           half others with higher priority on machine B will lead to constant
Packit Service 5956c7
           re-elections. For this reason, when instances are grouped, any
Packit Service 5956c7
           track scripts/files configured against member VRRP instances will have
Packit Service 5956c7
           their tracking weights automatically set to zero, in order to avoid
Packit Service 5956c7
           inconsistent priorities across instances.
Packit Service 5956c7
Packit Service 5956c7
(2) The notify fifo output is the same as the last 4 parameters for the "notify"
Packit Service 5956c7
    script, with the addition of "MASTER_RX_LOWER_PRI" instead of state for an
Packit Service 5956c7
    instance. This is used if a master needs to set some external state, such as
Packit Service 5956c7
    setting a secondary IP address when using Amazon AWS; if another keepalived
Packit Service 5956c7
    has transitioned to master due to a communications break, the lower priority
Packit Service 5956c7
    instance will have taken over the secondary IP address, and the proper master
Packit Service 5956c7
    needs to be able to restore it.
Packit Service 5956c7
Packit Service 5956c7
    2.5. VRRP gratuitous ARP/NA intervals
Packit Service 5956c7
Packit Service 5956c7
    This section allows the setting of delays between sending gratuitous ARPs
Packit Service 5956c7
    and unsolicited neighbour advertisements. This is intended for when an
Packit Service 5956c7
    upstream switch is unable to handle being flooded with ARPs/NAs.
Packit Service 5956c7
Packit Service 5956c7
    Use interface when the limits apply on the single physical interface.
Packit Service 5956c7
    Use interfaces when a group of interfaces are linked to the same switch
Packit Service 5956c7
    and the limits apply to the switch as a whole.
Packit Service 5956c7
Packit Service 5956c7
    Note: Only one of interface or interfaces should be used per block.
Packit Service 5956c7
Packit Service 5956c7
garp_group {
Packit Service 5956c7
    garp_interval <DECIMAL>     # Sets the interval between Gratuitous ARP
Packit Service 5956c7
                                #   (in seconds, resolution microseconds)
Packit Service 5956c7
    gna_interval <DECIMAL>      # Sets the default interval between unsolicited NA
Packit Service 5956c7
                                #   (in seconds, resolution microseconds)
Packit Service 5956c7
    interface <STRING>          # The physical interface to which the intervals apply
Packit Service 5956c7
    interfaces {                # A list of interfaces across which the delays are
Packit Service 5956c7
        <STRING>                #   aggregated.
Packit Service 5956c7
        <STRING>
Packit Service 5956c7
        ...
Packit Service 5956c7
    }
Packit Service 5956c7
}
Packit Service 5956c7
Packit Service 5956c7
    If the global vrrp_garp_interval and/or vrrp_gna_interval are set, any
Packit Service 5956c7
    interfaces that aren't specified in a garp_group will inherit the global
Packit Service 5956c7
    settings.
Packit Service 5956c7
Packit Service 5956c7
    2.6. VRRP instance
Packit Service 5956c7
Packit Service 5956c7
    The configuration block looks like :
Packit Service 5956c7
Packit Service 5956c7
vrrp_instance <STRING> {                      # VRRP instance declaration
Packit Service 5956c7
    use_vmac [<NAME>]                         # Use VRRP Virtual MAC, optional NAME of interface
Packit Service 5956c7
                                              # NOTE: If sysctl net.ipv4.conf.all.rp_filter is set,
Packit Service 5956c7
                                              # and this vrrp_instance is an IPv4 instance, using
Packit Service 5956c7
                                              # this option will cause the individual interfaces to be
Packit Service 5956c7
                                              # updated to the greater of their current setting and
Packit Service 5956c7
                                              # all.rp_filter, as will default.rp_filter, and all.rp_filter
Packit Service 5956c7
                                              # will be set to 0.
Packit Service 5956c7
                                              # The original settings are restored on termination.
Packit Service 5956c7
    version <INTEGER:2..3>                    # VRRP version to use
Packit Service 5956c7
    vmac_xmit_base                            # Send/Recv VRRP messages from base
Packit Service 5956c7
                                              #  interface instead of VMAC interface
Packit Service 5956c7
    native_ipv6                               # Force instance to use IPv6 (this option is deprecated since
Packit Service 5956c7
                                              #   the virtual addresses determine whether IPv4 or IPv6 is used)
Packit Service 5956c7
    state MASTER|BACKUP                       # Start-up default state
Packit Service 5956c7
    interface <STRING>                        # Binding interface
Packit Service 5956c7
    accept                                    # Allow a non address-owner to process packets
Packit Service 5956c7
                                              # destined to VIPs and eVIPs. This is the default
Packit Service 5956c7
                                              # unless strict mode is set.
Packit Service 5956c7
    no_accept                                 # Set non-accept mode (default if strict mode)
Packit Service 5956c7
                                              #
Packit Service 5956c7
    skip_check_adv_addr [BOOL]                # See description of global vrrp_skip_check_adv_addr, which
Packit Service 5956c7
                                              # sets the default value. Defaults to vrrp_skip_check_adv_addr
Packit Service 5956c7
Packit Service 5956c7
    track_interface {                         # Interfaces state we monitor
Packit Service 5956c7
      <STRING>
Packit Service 5956c7
      <STRING>
Packit Service 5956c7
      <STRING> weight <INTEGER:-253..253>
Packit Service 5956c7
      ...
Packit Service 5956c7
    }
Packit Service 5956c7
    track_script {                            # Scripts state we monitor
Packit Service 5956c7
      <STRING>
Packit Service 5956c7
      <STRING> weight <INTEGER:-253..253>
Packit Service 5956c7
      ...
Packit Service 5956c7
    }
Packit Service 5956c7
    track_file {                              # Files state we monitor
Packit Service 5956c7
      <STRING>
Packit Service 5956c7
      <STRING>
Packit Service 5956c7
      <STRING> weight <INTEGER: -254..254>
Packit Service 5956c7
      ...
Packit Service 5956c7
    }
Packit Service 5956c7
    track_bfd {                               # BFD instance we monitor
Packit Service 5956c7
      <STRING>
Packit Service 5956c7
      <STRING>
Packit Service 5956c7
      <STRING> weight <INTEGER: -253..253>
Packit Service 5956c7
      ...
Packit Service 5956c7
    }
Packit Service 5956c7
    dont_track_primary                        # (default unset) ignore VRRP interface faults.
Packit Service 5956c7
                                              #  useful for cross-connect VRRP config.
Packit Service 5956c7
    mcast_src_ip <IP ADDRESS>                 # src_ip to use into the VRRP packets
Packit Service 5956c7
    unicast_src_ip <IP ADDRESS>               # src_ip to use into the VRRP packets (alias to mcast_src_ip)
Packit Service 5956c7
    track_src_ip                              # if the configured src_ip doesn't exist or is removed
Packit Service 5956c7
                                              # put the instance into fault state
Packit Service 5956c7
    unicast_peer {                            # Do not use multicast, instead send VRRP
Packit Service 5956c7
      <IP ADDRESS>                            #  adverts to following list of ip address
Packit Service 5956c7
      ...                                     #  in unicast design fashion
Packit Service 5956c7
    }
Packit Service 5956c7
    old_unicast_checksum [never]              # The checksum calculation when using VRRPv3 changed after v1.3.6.
Packit Service 5956c7
                                              #  Setting this flag forces the old checksum algorithm to be used
Packit Service 5956c7
                                              #  to maintain backward compatibility, although keepalived will
Packit Service 5956c7
                                              #  attempt to maintain compatibility anyway if it sees an old
Packit Service 5956c7
                                              #  version checksum. Specifying never will turn off autodetection
Packit Service 5956c7
                                              #  of old checksums. [This option may not be enabled - check output
Packit Service 5956c7
                                              #  of `keepalived -v` for OLD_CHKSUM_COMPAT.]
Packit Service 5956c7
Packit Service 5956c7
    # The following garp parameters take their defaults from the global config for vrrp_garp_...
Packit Service 5956c7
    # See their descriptions for the meaning of the parameters.
Packit Service 5956c7
    garp_master_delay <INTEGER>
Packit Service 5956c7
    garp_master_repeat <INTEGER>
Packit Service 5956c7
    garp_lower_prio_delay <INTEGER>
Packit Service 5956c7
    garp_lower_prio_repeat <INTEGER>
Packit Service 5956c7
    garp_master_refresh <INTEGER>
Packit Service 5956c7
    garp_master_refresh_repeat <INTEGER>
Packit Service 5956c7
Packit Service 5956c7
    virtual_router_id <INTEGER-1..255>        # VRRP VRID
Packit Service 5956c7
    priority <INTEGER-1..255>                 # VRRP PRIO
Packit Service 5956c7
    advert_int <FLOAT>                        # VRRP Advert interval (use default)
Packit Service 5956c7
Packit Service 5956c7
    lower_prio_no_advert [<BOOL>]             # If a lower priority advert is received, don't
Packit Service 5956c7
                                              # send another advert. This causes adherence
Packit Service 5956c7
                                              # to the RFCs (defaults to global
Packit Service 5956c7
                                              # vrrp_lower_priority_dont_send_advert).
Packit Service 5956c7
Packit Service 5956c7
    higher_prio_send_advert [<BOOL>]          # If we are master and receive a higher priority
Packit Service 5956c7
                                              # advert, send an advert (which will be lower priority
Packit Service 5956c7
                                              # than the other master), before we transition to
Packit Service 5956c7
                                              # backup. This means that if the other master has
Packit Service 5956c7
                                              # garp_lower_prio_repeat set, it will resend garp
Packit Service 5956c7
                                              # messages. This is to get around the problem of their
Packit Service 5956c7
                                              # having been two simultaneous masters, and the last GARP
Packit Service 5956c7
                                              # messages seen were from us.
Packit Service 5956c7
Packit Service 5956c7
    # Note: authentication was removed from the VRRPv2 specification by RFC3768 in 2004.
Packit Service 5956c7
    #   Use of this option is non-compliant and can cause problems; avoid using if possible,
Packit Service 5956c7
    #   except when using unicast, when it can be helpful.
Packit Service 5956c7
    authentication {                          # Authentication block
Packit Service 5956c7
        auth_type PASS|AH                     # Simple password or IPSEC AH
Packit Service 5956c7
        auth_pass <STRING>                    # Password string (up to 8 characters)
Packit Service 5956c7
    }
Packit Service 5956c7
    # For virutal_ipaddress and virtual_ipaddress_excluded most of the options match the options
Packit Service 5956c7
    #   of the command ip address add, likewise for virtual_routes and virtual_rules and the
Packit Service 5956c7
    #   respective ip route/rule add commands. no_track is specific to keepalived and means that the
Packit Service 5956c7
    #   vrrp_instance will not transition out of master state if the address/route/rule is deleted
Packit Service 5956c7
    #   and the address/route/rule will not be reinstated until the vrrp instance next transitions
Packit Service 5956c7
    #   to master.
Packit Service 5956c7
    # The track_group option only applies to static addresses/routes/rules.
Packit Service 5956c7
Packit Service 5956c7
    virtual_ipaddress {                       # VRRP IP addres block
Packit Service 5956c7
        <IP ADDRESS>[/<MASK>] [brd <IP ADDRESS>] [dev <STRING>] [scope <SCOPE>] [label <LABEL>] [peer <IP ADDRESS>] [home] [-nodad] [mngtmpaddr] [noprefixroute] [autojoin] [no_track]
Packit Service 5956c7
        <IP ADDRESS>[/<MASK>] ...
Packit Service 5956c7
        ...
Packit Service 5956c7
    }
Packit Service 5956c7
    virtual_ipaddress_excluded {              # VRRP IP excluded from VRRP packets
Packit Service 5956c7
        <IP ADDRESS>[/<MASK>] [brd <IP ADDRESS>] [dev <STRING>] [scope <SCOPE>] [label <LABEL>] [peer <IP ADDRESS>] [home] [-nodad] [mngtmpaddr] [noprefixroute] [autojoin] [no_track]
Packit Service 5956c7
        <IP ADDRESS>[/<MASK>] ...
Packit Service 5956c7
        ...
Packit Service 5956c7
    }
Packit Service 5956c7
    promote_secondaries                       # Set the promote_secondaries flag on the interface to stop other
Packit Service 5956c7
                                              # addresses in the same CIDR being removed when 1 of them is removed
Packit Service 5956c7
    virtual_routes {                          # VRRP virtual routes
Packit Service 5956c7
                                              # The syntax is the same as static_routes with the additional option [no_track]
Packit Service 5956c7
                                              #   and excluding track_group.
Packit Service 5956c7
    }
Packit Service 5956c7
    virtual_rules {                           # VRRP virtual rules
Packit Service 5956c7
                                              # The syntax is the same as static_rules with the additional option [no_track]
Packit Service 5956c7
                                              #   and excluding track_group.
Packit Service 5956c7
    }
Packit Service 5956c7
Packit Service 5956c7
    nopreempt                                 # Override VRRP RFC preemption default
Packit Service 5956c7
    preempt_delay <FLOAT>                     # Seconds after startup or seeing a lower priority master
Packit Service 5956c7
                                              #  until preemption. 0 (default) to 1,000
Packit Service 5956c7
    strict_mode [<BOOL>]                      # See description of global vrrp_strict
Packit Service 5956c7
                                              # If vrrp_strict is not specified, it takes the value of vrrp_strict
Packit Service 5956c7
                                              # If strict_mode without a parameter is specified, it defaults to on
Packit Service 5956c7
    debug <LEVEL>                             # Debug level. LEVEL is a number in the range 0 to 4.
Packit Service 5956c7
    notify_master <STRING>|<QUOTED-STRING> [username [groupname]]
Packit Service 5956c7
                                              # Same as vrrp_sync_group
Packit Service 5956c7
    notify_backup <STRING>|<QUOTED-STRING> [username [groupname]]
Packit Service 5956c7
                                              # Same as vrrp_sync_group
Packit Service 5956c7
    notify_fault <STRING>|<QUOTED-STRING> [username [groupname]]
Packit Service 5956c7
                                              # Same as vrrp_sync_group
Packit Service 5956c7
    notify_stop <STRING>|<QUOTED-STRING> [username [groupname]]
Packit Service 5956c7
                                              # Script to launch when stopping vrrp
Packit Service 5956c7
    notify <STRING>|<QUOTED-STRING> [username [groupname]]
Packit Service 5956c7
                                              # Same as vrrp_sync_group
Packit Service 5956c7
    notify_master_rx_lower_pri <STRING>|<QUOTED-STRING> [username [groupname]]
Packit Service 5956c7
                                              # Script to run if a master receives a lower priority advert
Packit Service 5956c7
    smtp_alert <BOOL>                         # Same as vrrp_sync_group
Packit Service 5956c7
                                              #   (default no, unless global smtp_alert/smtp_alert_vrrp set)
Packit Service 5956c7
    kernel_rx_buf_size                        # Set socket receive buffer size (see global_defs
Packit Service 5956c7
                                              #   vrrp_rx_bufs_policy for explanation)
Packit Service 5956c7
}
Packit Service 5956c7
Packit Service 5956c7
SCOPE can take the following values :
Packit Service 5956c7
    * site
Packit Service 5956c7
    * link
Packit Service 5956c7
    * host
Packit Service 5956c7
    * nowhere
Packit Service 5956c7
    * global
Packit Service 5956c7
Packit Service 5956c7
LABEL is optional and creates a name for the alias. For compatibility with
Packit Service 5956c7
"ifconfig", it should be of the form <realdev>:<anytext>, for example
Packit Service 5956c7
eth0:1 for an alias on eth0.
Packit Service 5956c7
Packit Service 5956c7
METRIC is optional and specify a route priority.
Packit Service 5956c7
Packit Service 5956c7
When a weight is specified in track_interface, instead of setting the vrrp
Packit Service 5956c7
instance to the FAULT state in case of failure, its priority will be
Packit Service 5956c7
increased by the weight when the interface is up (for positive weights),
Packit Service 5956c7
or decreased by the weight's absolute value when the interface is down
Packit Service 5956c7
(for negative weights). The weight must be comprised between -254 and +254
Packit Service 5956c7
inclusive. 0 is the default behaviour which means that a failure implies a
Packit Service 5956c7
FAULT state. The common practice is to use positive weights to count a
Packit Service 5956c7
limited number of good services so that the server with the highest count
Packit Service 5956c7
becomes master. Negative weights are better to count unexpected failures
Packit Service 5956c7
among a high number of interfaces, as it will not saturate even with high
Packit Service 5956c7
number of interfaces.
Packit Service 5956c7
Packit Service 5956c7
The same principle can be applied to track_script entries, except that an
Packit Service 5956c7
unspecified weight means that the default weight declared in the script
Packit Service 5956c7
will be used (which itself defaults to 0).
Packit Service 5956c7
Packit Service 5956c7
Packit Service 5956c7
3. LVS configuration
Packit Service 5956c7
Packit Service 5956c7
This block is divided in 2 sub-block :
Packit Service 5956c7
Packit Service 5956c7
    * Virtual server group
Packit Service 5956c7
    * Virtual server
Packit Service 5956c7
    * SSL config
Packit Service 5956c7
Packit Service 5956c7
    3.1. Virtual server group
Packit Service 5956c7
Packit Service 5956c7
    The configuration block looks like :
Packit Service 5956c7
Packit Service 5956c7
virtual_server_group <STRING> {
Packit Service 5956c7
    <IP ADDRESS> [<PORT>]       # VIP [VPORT]
Packit Service 5956c7
    <IP ADDRESS> [<PORT>]
Packit Service 5956c7
    ...
Packit Service 5956c7
    <IP ADDRESS RANGE> [<PORT>] # VIP range [VPORT]
Packit Service 5956c7
    <IP ADDRESS RANGE> [<PORT>]
Packit Service 5956c7
    ...
Packit Service 5956c7
    fwmark <INTEGER>            # fwmark
Packit Service 5956c7
    fwmark <INTEGER>
Packit Service 5956c7
    ...
Packit Service 5956c7
}
Packit Service 5956c7
Packit Service 5956c7
Note:   <IP ADDRESS RANGE> has the form of : XXX.YYY.ZZZ.WWW-VVV, define
Packit Service 5956c7
        the IP address range starting at WWW and monotonaly incremented by
Packit Service 5956c7
        one to VVV. Example : 192.168.200.1-10 means .1 to .10 IP addresses.
Packit Service 5956c7
Packit Service 5956c7
    3.2. Virtual server
Packit Service 5956c7
Packit Service 5956c7
    The configuration block looks like :
Packit Service 5956c7
Packit Service 5956c7
    A virtual_server can be either :
Packit Service 5956c7
    * vip vport declaration
Packit Service 5956c7
    * fwmark declaration
Packit Service 5956c7
    * group declaration
Packit Service 5956c7
Packit Service 5956c7
    Note: Where an option can be configured for a virtual server, real server,
Packit Service 5956c7
    and possibly checker, the virtual server setting is the default for real servers,
Packit Service 5956c7
    and the real server setting is the default for checkers.
Packit Service 5956c7
Packit Service 5956c7
    Note 2: Tunnelled real/sorry servers can differ from the address family of
Packit Service 5956c7
    the virtual server and non tunnelled real/sorry servers, which all have to be the
Packit Service 5956c7
    same. If a virtual server uses a fwmark, and all the real/sorry servers are
Packit Service 5956c7
    tunnelled, the address family of the virtual server will be the same as the
Packit Service 5956c7
    address family of the real/sorry servers if they are all the same, otherwise
Packit Service 5956c7
    it will default to IPv4 (use ip_family inet6 to override this).
Packit Service 5956c7
Packit Service 5956c7
    Note 3: The port for the virtual server can only be omitted if the virtual service
Packit Service 5956c7
    is persistent.
Packit Service 5956c7
Packit Service 5956c7
virtual_server <IP ADDRESS> [<PORT>] {        # VS IP/PORT declaration
Packit Service 5956c7
virtual_server fwmark <INTEGER>      {        # VS fwmark declaration
Packit Service 5956c7
virtual_server group <STRING>        {        # VS group declaration
Packit Service 5956c7
    ip_family inet|inet6                      # Address family
Packit Service 5956c7
    delay_loop <INTEGER>                      # delay timer for service polling
Packit Service 5956c7
    lvs_sched rr|wrr|lc|wlc|lblc|sh|mh|dh|fo|ovf|lblcr|sed|nq
Packit Service 5956c7
                                              # LVS scheduler used
Packit Service 5956c7
    hashed                                    # Apply hashing
Packit Service 5956c7
    flag-1                                    # Apply scheduler flag 1
Packit Service 5956c7
    flag-2                                    # Apply scheduler flag 2
Packit Service 5956c7
    flag-3                                    # Apply scheduler flag 3
Packit Service 5956c7
    sh-port                                   # Apply sh-port scheduler flag (only for sh scheduler,
Packit Service 5956c7
                                              #  same as flag-2 for sh scheduler)
Packit Service 5956c7
    sh-fallback                               # Apply sh-fallback scheduler flag (only for sh scheduler,
Packit Service 5956c7
                                              #  same as flag-1 for sh scheduler)
Packit Service 5956c7
    mh-port                                   # Apply mh-port scheduler flag (only for mh scheduler,
Packit Service 5956c7
                                              #  same as flag-2 for mh scheduler)
Packit Service 5956c7
    mh-fallback                               # Apply mh-fallback scheduler flag (only for mh scheduler,
Packit Service 5956c7
                                              #  same as flag-1 for mh scheduler)
Packit Service 5956c7
    ops                                       # Apply One-Packet-Scheduling (only for UDP)
Packit Service 5956c7
    lvs_method NAT|DR|TUN                     # default LVS method to use
Packit Service 5956c7
    persistence_engine <STRING>               # LVS persistence engine name
Packit Service 5956c7
    persistence_timeout [<INTEGER>]           # LVS persistence timeout, default 6 minutes
Packit Service 5956c7
    persistence_granularity <NETMASK>         # LVS granularity mask
Packit Service 5956c7
    protocol TCP|UDP|SCTP                     # L4 protocol
Packit Service 5956c7
    ha_suspend                                # If VS IP address is not set, suspend
Packit Service 5956c7
                                              #  healthcheckers activity
Packit Service 5956c7
    virtualhost <STRING>                      # Default VirtualHost string to use for
Packit Service 5956c7
                                              #  HTTP_GET or SSL_GET
Packit Service 5956c7
Packit Service 5956c7
    # Assume silently all RSs down and healthchecks
Packit Service 5956c7
    # failed on start. This helps preventing false
Packit Service 5956c7
    # positive actions on startup. Alpha mode is
Packit Service 5956c7
    # disabled by default.
Packit Service 5956c7
    alpha
Packit Service 5956c7
Packit Service 5956c7
    # On daemon shutdown, consider quorum and RS
Packit Service 5956c7
    # down notifiers for execution, where appropriate.
Packit Service 5956c7
    # Omega mode is disabled by default.
Packit Service 5956c7
    omega
Packit Service 5956c7
Packit Service 5956c7
    # Minimum total weight of all live servers in
Packit Service 5956c7
    # the pool necessary to operate VS with no
Packit Service 5956c7
    # quality regression. Defaults to 1.
Packit Service 5956c7
    quorum <INT>
Packit Service 5956c7
Packit Service 5956c7
    # Tolerate this much weight units compared to the
Packit Service 5956c7
    # nominal quorum, when considering quorum gain
Packit Service 5956c7
    # or loss. A flap dampener. Defaults to 0.
Packit Service 5956c7
    hysteresis <INT>
Packit Service 5956c7
Packit Service 5956c7
    # Script to launch when quorum is gained.
Packit Service 5956c7
    quorum_up <STRING>|<QUOTED-STRING> [username [groupname]]
Packit Service 5956c7
Packit Service 5956c7
    # Script to launch when quorum is lost.
Packit Service 5956c7
    quorum_down <STRING>|<QUOTED-STRING> [username [groupname]]
Packit Service 5956c7
Packit Service 5956c7
    sorry_server <IP ADDRESS> <PORT>          # RS to add to LVS topology when the
Packit Service 5956c7
                                              #  quorum isn't achieved.
Packit Service 5956c7
                                              #  If a sorry server is configured, all
Packit Service 5956c7
                                              #  real servers will be brought down when
Packit Service 5956c7
                                              #  the quorum is not achieved.
Packit Service 5956c7
    sorry_server_inhibit                      # applies inhibit_on_failure behaviour
Packit Service 5956c7
                                              # to the sorry_server
Packit Service 5956c7
    sorry_server_lvs_method NAT|DR|TUN        # LVS method to use for sorry server
Packit Service 5956c7
Packit Service 5956c7
    retry <INTEGER>                           # number of retries before fail
Packit Service 5956c7
    delay_before_retry <INTEGER>              # delay before retry (default 1 unless otherwise specified)
Packit Service 5956c7
    warmup <INTEGER>                          # random delay for maximum N seconds
Packit Service 5956c7
    delay_loop <INTEGER>                      # delay timer for service polling
Packit Service 5956c7
    inhibit_on_failure                        # Set weight to 0 on healthchecker failure
Packit Service 5956c7
    smtp_alert <BOOL>                         # Send email notification when quorum gained/lost
Packit Service 5956c7
                                              #   (default no, unless global smtp_alert/smtp_alert_checker set)
Packit Service 5956c7
Packit Service 5956c7
    real_server <IP ADDRESS> <PORT> {         # RS declaration
Packit Service 5956c7
        weight <INTEGER>                      # weight to use (default: 1)
Packit Service 5956c7
        lvs_method NAT|DR|TUN                 # LVS method to use
Packit Service 5956c7
        notify_up <STRING>|<QUOTED-STRING> [username [groupname]]
Packit Service 5956c7
                                              # Script to launch when
Packit Service 5956c7
                                              #  healthchecker consider service
Packit Service 5956c7
                                              #  as up.
Packit Service 5956c7
        notify_down <STRING>|<QUOTED-STRING> [username [groupname]]
Packit Service 5956c7
                                              # Script to launch when
Packit Service 5956c7
                                              #  healthchecker consider service
Packit Service 5956c7
                                              #  as down.
Packit Service 5956c7
        uthreshold <INTEGER>                  # maximum number of connections to server
Packit Service 5956c7
        lthreshold <INTEGER>                  # minimum number of connections to server
Packit Service 5956c7
        alpha <BOOL>                          # see above
Packit Service 5956c7
        retry <INTEGER>                       # see above
Packit Service 5956c7
        delay_before_retry <INTEGER>          # see above
Packit Service 5956c7
        warmup <INTEGER>                      # see above
Packit Service 5956c7
        delay_loop <INTEGER>                  # see above
Packit Service 5956c7
        inhibit_on_failure <BOOL>             # see above
Packit Service 5956c7
        smtp_alert <BOOL>                     # Send email notification when quorum gained/lost
Packit Service 5956c7
                                              #   (default yes, unless global smtp_alert/smtp_alert_checker set)
Packit Service 5956c7
        virtualhost <STRING>                  # Default VirtualHost string to use for
Packit Service 5956c7
                                              #  HTTP_GET or SSL_GET (overrides
Packit Service 5956c7
                                              #  virtual_server virtualhost)
Packit Service 5956c7
Packit Service 5956c7
        # healthcheckers. Can be multiple of each type
Packit Service 5956c7
        # HTTP_GET|SSL_GET|TCP_CHECK|SMTP_CHECK|DNS_CHECK|MISC_CHECK|BFD_CHECK
Packit Service 5956c7
Packit Service 5956c7
        # All checkers have the following options, except MISC_CHECK which only has alpha onwards,
Packit Service 5956c7
	#  and BFD_CHECK which has no standard options:
Packit Service 5956c7
        CHECKER_TYPE {
Packit Service 5956c7
            connect_ip <IP ADDRESS>           # IP address to connect (default real_server address)
Packit Service 5956c7
            connect_port <PORT>               # Port to connect (default real_server port)
Packit Service 5956c7
            bindto <IP ADDRESS>               # IP address to bind to
Packit Service 5956c7
            bind_if <IFNAME>                  # Interface to bind to; needed if the bindto
Packit Service 5956c7
                                              #  address is IPv6 link local
Packit Service 5956c7
            bind_port <PORT>                  # Port to bind to
Packit Service 5956c7
            connect_timeout <INTEGER>         # Timeout connection
Packit Service 5956c7
            fwmark <INTEGER>                  # fwmark to set on socket (SO_MARK)
Packit Service 5956c7
            alpha <BOOL>                      # see above
Packit Service 5956c7
            retry <INTEGER>                   # number of retries before fail
Packit Service 5956c7
            delay_before_retry <INTEGER>      # delay before retry (default 1 unless otherwise specified)
Packit Service 5956c7
            warmup <INTEGER>                  # random delay for maximum N seconds
Packit Service 5956c7
            delay_loop <INTEGER>              # delay timer for service polling
Packit Service 5956c7
        }
Packit Service 5956c7
Packit Service 5956c7
        # The following options are additional checker specific
Packit Service 5956c7
Packit Service 5956c7
        HTTP_GET|SSL_GET {                    # HTTP and SSL healthcheckers
Packit Service 5956c7
            url {                             # A set of url to test
Packit Service 5956c7
              path <STRING>                   # Path
Packit Service 5956c7
              digest <STRING>                 # Digest computed with genhash
Packit Service 5956c7
              status_code <INTEGER>           # status code returned into the HTTP
Packit Service 5956c7
                                              #   header. If not specified, then any
Packit Service 5956c7
                                              #   2xx code is accepted.
Packit Service 5956c7
              virtualhost <STRING>            # VirtualHost string to use. If not set
Packit Service 5956c7
                                              #  uses virtualhost from checker or real
Packit Service 5956c7
                                              #  or virtual_server.
Packit Service 5956c7
            }
Packit Service 5956c7
            url {
Packit Service 5956c7
              path <STRING>
Packit Service 5956c7
              digest <STRING>
Packit Service 5956c7
              status_code <INTEGER>
Packit Service 5956c7
              virtualhost <STRING>
Packit Service 5956c7
              regex <STRING>                  # Regular expression to search returned
Packit Service 5956c7
                                              #  data against. A failure to match causes
Packit Service 5956c7
                                              #  the check to fail.
Packit Service 5956c7
              regex_no_match                  # Reverse the sense of the match, so a
Packit Service 5956c7
                                              #  match of the returned text causes the
Packit Service 5956c7
                                              #  check to fail.
Packit Service 5956c7
              regex_options <OPTIONS>         # Space separated list of options for regex.
Packit Service 5956c7
                                              #  See man pcre2api for a description of the options.
Packit Service 5956c7
                                              #  The following option are supported:
Packit Service 5956c7
                                              #   allow_empty_class alt_bsux auto_callout caseless
Packit Service 5956c7
                                              #   dollar_endonly dotall dupnames extended firstline
Packit Service 5956c7
                                              #   match_unset_backref multiline never_ucp never_utf
Packit Service 5956c7
                                              #   no_auto_capture no_auto_possess no_dotstar_anchor
Packit Service 5956c7
                                              #   no_start_optimize ucp ungreedy utf never_backslash_c
Packit Service 5956c7
                                              #   alt_circumflex alt_verbnames use_offset_limit
Packit Service 5956c7
              regex_stack <START> <MAX>       # For complicated regular expressions a larger stack
Packit Service 5956c7
                                              #   may be needed, and this allows the start and maximum
Packit Service 5956c7
                                              #   sizes in bytes to be specified. For more details see
Packit Service 5956c7
                                              #   the documentation for pcre2_jit_stack_create()
Packit Service 5956c7
              regex_min_offset <OFFSET>       # The minimum offset into the returned data to start
Packit Service 5956c7
                                              #   checking for the regex pattern match. This can save
Packit Service 5956c7
                                              #   processing time if the returned data is large.
Packit Service 5956c7
              regex_max_offset <OFFSET>       # The maximum offset into the returned data for the
Packit Service 5956c7
                                              #   start of the subject match.
Packit Service 5956c7
            }
Packit Service 5956c7
            ...
Packit Service 5956c7
Packit Service 5956c7
            virtualhost <STRING>              # VirtualHost string to use. If not set
Packit Service 5956c7
                                              #  uses virtualhost from real or
Packit Service 5956c7
                                              #  virtual_server.
Packit Service 5956c7
        }
Packit Service 5956c7
Packit Service 5956c7
        SSL_GET {
Packit Service 5956c7
            enable_sni            # send Server Name Indication during SSL handshake
Packit Service 5956c7
        }
Packit Service 5956c7
Packit Service 5956c7
        TCP_CHECK {                           # TCP healthchecker
Packit Service 5956c7
            # No additional options
Packit Service 5956c7
        }
Packit Service 5956c7
Packit Service 5956c7
        SMTP_CHECK {                          # SMTP healthchecker
Packit Service 5956c7
            helo_name <STRING>|<QUOTED-STRING> # Host to use for the HELO request
Packit Service 5956c7
        }
Packit Service 5956c7
Packit Service 5956c7
        DNS_CHECK {                           # DNS healthchecker
Packit Service 5956c7
            type A|NS|CNAME|SOA|MX|TXT|AAAA   # DNS query type (default SOA)
Packit Service 5956c7
            name <STRING>                     # Domain name to use for the DNS query
Packit Service 5956c7
        }
Packit Service 5956c7
Packit Service 5956c7
        MISC_CHECK {                          # MISC healthchecker
Packit Service 5956c7
            misc_path <STRING>|<QUOTED-STRING> # External system script or program
Packit Service 5956c7
            misc_timeout <INTEGER>            # Script execution timeout
Packit Service 5956c7
Packit Service 5956c7
            # If set, exit code from healthchecker is used
Packit Service 5956c7
            # to dynamically adjust the weight as follows:
Packit Service 5956c7
            #   exit status 0: svc check success, weight
Packit Service 5956c7
            #     unchanged.
Packit Service 5956c7
            #   exit status 1: svc check failed.
Packit Service 5956c7
            #   exit status 2-255: svc check success, weight
Packit Service 5956c7
            #     changed to 2 less than exit status.
Packit Service 5956c7
            #   (for example: exit status of 255 would set
Packit Service 5956c7
            #     weight to 253)
Packit Service 5956c7
            # NOTE: do not have more than one dynamic MISC_CHECK per real_server.
Packit Service 5956c7
            misc_dynamic
Packit Service 5956c7
            user USERNAME [GROUPNAME]         # Specify user/group to run script under
Packit Service 5956c7
        }
Packit Service 5956c7
        BFD_CHECK {
Packit Service 5956c7
            name <STRING>                     # the name of the bfd instance
Packit Service 5956c7
        }
Packit Service 5956c7
    }
Packit Service 5956c7
}
Packit Service 5956c7
Packit Service 5956c7
    3.3. SSL config
Packit Service 5956c7
Packit Service 5956c7
    Parameters used for SSL_GET check.
Packit Service 5956c7
    If none of the parameters is specified, the SSL context will be auto generated.
Packit Service 5956c7
Packit Service 5956c7
SSL {
Packit Service 5956c7
    password <STRING>           # password
Packit Service 5956c7
    ca <STRING>                 # ca file
Packit Service 5956c7
    certificate <STRING>        # certificate file
Packit Service 5956c7
    key <STRING>                # key file
Packit Service 5956c7
}