Skip to content
Smarter by Design.Simpler for Business

lb backend ​

The lb backend command manages a single backend server to which the traffic will be forwarded — an IP and port pair — and the health check, SSL, source address and traffic distribution settings bound to it. Its panel equivalent is the Backend Services screen.

A backend does not receive traffic on its own: it is bound either directly to the default list of a vService, or to an lb backend-group record.

Command Summary ​

TR7 WEB-CLI · lb backend
# Tab after the command
admin@TR7LBWAF01> lb backend
add delete list show update update-many
 
admin@TR7LBWAF01> lb backend list # list all of them
admin@TR7LBWAF01> lb backend show <id> # show one
admin@TR7LBWAF01> lb backend add name <name> v-device <v-device> …
admin@TR7LBWAF01> lb backend update id <id> … # change
admin@TR7LBWAF01> lb backend update-many <target> … # bulk change
admin@TR7LBWAF01> lb backend delete <id> # delete
admin@TR7LBWAF01>  

Writing Order ​

Step 1 Write the name
lb backend add web-server-1
Step 2 Select the virtual device
The v-device on which the backend will be defined. Tab lists the options; the default is the device on which the command runs.
Step 3 Select the route table
Which route table the backend will be reached over. The default value is 1.
Step 4 Write the address and the port
10.0.10.21 8080
Step 5 Add the settings if needed
The health check, SSL, weight and SNAT fields are added with --.

Required Fields ​

OrderFieldStatusValue
1nameRequiredThe name of the backend; it must be unique in the collection
2v-deviceRequiredThe virtual device; the default is the device on which the command runs
3namespaceRequiredThe route table; the default is 1
4addr.ipRequiredThe IP address or the domain name of the backend
5addr.portRequiredThe port of the backend
—differentIp.ipConditionally requiredIt is asked for only when --useDifferentIp true is written

The five required fields are written without a prefix in every case and the CLI does not accept any field starting with -- until they are completed. When --useDifferentIp true is written, differentIp.ip is also asked for without a prefix right after it; another -- field cannot be written until this field is given.

The fields that have a default are also asked for

The v-device and namespace fields have a default value, but the command still asks for these two fields. They are selected from the list with Tab.

The Health Check Fields ​

FieldDefaultValue
--hcNoneThe lb hc record to be applied
--enableHcLogtrueWhether the health check logs will be kept or not
--useDifferentIpfalseThe health check being done to a different address
differentIp.ip—The address on which the check will be done; it is required while --useDifferentIp true and is written without a prefix
--differentIp.portNoneThe port on which the check will be done
--differentSrcTypeNoneThe source address of the check: empty or deviceSrc
--deviceSrc—The device address to be used while --differentSrcType deviceSrc

The SSL Fields ​

These fields are applied to the connection between TR7 and the backend and are effective only when --sslService true is written.

FieldDefaultValue
--sslServicefalseConnecting to the backend with SSL
--ciphersstandardThe cipher suite: standard or low
--sniNoneThe SNI value to be sent in the connection
--alpnhttp20_disabledhttp20_disabled (HTTP/2 off) or http20_enabled (HTTP/2 on)
--sslSecurityProfileNoneThe lb ssl-security profile to be applied
--sslVerifynoneThe verification of the certificate of the backend: none or required
--sslVerifyCaNoneThe CA profile to be used in the verification; it is written while --sslVerify required
--sslClientCertNoneThe client certificate that TR7 will present while identifying itself to the backend

The two directions should not be confused

--sslClientCert is the certificate that TR7 presents in order to identify itself to the backend; in this connection TR7 is on the client side. The client certificate verification in the SSL security profile is the opposite direction: the verification of the certificate of the visitor on the listening side. In the backend connection only the minimum and the maximum SSL version, the cipher list and the curve settings of the security profile are valid.

The Traffic and Distribution Fields ​

FieldDefaultValue
--weightNoneThe distribution weight; between 1 and 256
--connLimitNoneThe concurrent connection limit; between 1 and 65535
--cookieContentNoneThe cookie value that marks this backend in the session persistence
--proxyOptNonesend-proxy (PROXY protocol v1) or send-proxy-v2
--useFrontendPortfalseConnecting to the backend with the listening port on which the request arrived
--backupServicefalseMarking the backend as a backup; it comes into play when the others go down
--maintenanceModefalseTaking the backend into maintenance; no traffic is sent

The Source Address Fields ​

FieldDefaultValue
--snatOptNoneThe source address translation: clientIp or customIpDevice
--snatIpDevice—The address to be used while --snatOpt customIpDevice
--spoofingfalseThe MAC relay behavior while --snatOpt clientIp
--spoofingIp—The address to be used for the relay
--spoofingClusterIp—The VIP that determines the relay condition
--spoofingDefaultClusterId1The default device for the relay

Examples ​

TR7 WEB-CLI · A) The simplest backend
# name · virtual device · route table · ip · port
admin@TR7LBWAF01> lb backend add name web-1 v-device <v-device> namespace 1 addr.ip 10.0.10.21 addr.port 8080
admin@TR7LBWAF01>  
TR7 WEB-CLI · B) A backend with a health check and a weight
# the required fields are written without a prefix and before the -- fields in every case
admin@TR7LBWAF01> lb backend add name web-2 v-device <v-device> namespace 1 \
addr.ip 10.0.10.22 addr.port 8080 --hc <check> --weight 30 --connLimit 2000
admin@TR7LBWAF01>  
TR7 WEB-CLI · C) A backend that connects with SSL
admin@TR7LBWAF01> lb backend add name web-tls v-device <v-device> namespace 1 \
addr.ip 10.0.10.23 addr.port 443 --sslService true \
--sni portal.kurum.com.tr --sslVerify required --sslVerifyCa <ca-profile>
admin@TR7LBWAF01>  
TR7 WEB-CLI · D) A health check to a different address
# when useDifferentIp is true, differentIp.ip becomes required
admin@TR7LBWAF01> lb backend add name web-3 v-device <v-device> namespace 1 \
addr.ip 10.0.10.24 addr.port 8080 \
--useDifferentIp true differentIp.ip 10.0.99.24 --differentIp.port 9000
admin@TR7LBWAF01>  

Binding to a vService ​

TR7 WEB-CLI · binding the backend to a vService
# a single backend directly, for more than one a backend-group is used
admin@TR7LBWAF01> lb service update id <vService> --defaultBackendList.0 <backend>
admin@TR7LBWAF01>  

Updating and Deleting ​

TR7 WEB-CLI · update and delete
# taking a single record into maintenance
admin@TR7LBWAF01> lb backend update id <id> --maintenanceMode true
 
admin@TR7LBWAF01> lb backend delete <id>
admin@TR7LBWAF01>  

Bulk Update ​

update-many applies the same change to many backend records at once. The writing order is the same on every resource.

Step 1 Select the target
The only required field is target: selected for the records selected from the list, all for the entire collection.
Step 2 Add the fields to be written
Only the fields that can be written to many records with the same value are present; the fields specific to the record, such as the id, the name and the address, do not take place in this command.
Step 3 Mark the targets from the list
When target selected is written and no id is given, a selection list with checkboxes opens.
Step 4 Confirm
A warning stating how many records will be affected appears; nothing is written until the confirmation word is typed.
FieldStatusValue
targetRequiredselected — the records selected from the list · all — the whole collection
--ids.NConditionalThe target ids for target selected. It is not suggested in the Tab list: the targets are marked from the selection list. In a script and in a pipeline it is written manually.
--onErrorOptionalabort (default) — if even one of the targets does not pass the validation, nothing is written · skip — the targets that pass are written

Writable Fields ​

TR7 WEB-CLI · update-many · Tab output
# Tab after the command
admin@TR7LBWAF01> lb backend update-many
--info target
 
# Tab after the target field
admin@TR7LBWAF01> lb backend update-many target
all selected
 
# write -- and Tab: all the writable fields
admin@TR7LBWAF01> lb backend update-many target all --
--alpn                      --backupService             --ciphers
--connLimit                 --cookieContent             --differentSrcType
--enableHcLog               --hc                        --info
--maintenanceMode           --onError                   --proxyOpt
--snatOpt                   --spoofing                  --spoofingDefaultClusterId
--sslClientCert             --sslSecurityProfile        --sslService
--sslVerify                 --sslVerifyCa               --useDifferentIp
--useFrontendPort           --weight
admin@TR7LBWAF01>  

There are 23 fields in the command; the list above is the same as what appears when -- is written and Tab is pressed on the device. What each one does and what is written after it is in the table below.

The fields that are condition-bound in the single command (those that open according to the value of another field) are listed here without a condition: in the bulk update every target is validated separately according to its own record, and if the field is not active on a target it is skipped only on that target.

FieldWhat it doesWhat is written after it
--infoWrites what the command will do without running itIt does not take a value; it is written on its own
--onErrorDetermines what will happen if a target does not pass the validationabort writes nothing (default) · skip writes the targets that pass
--hcBinds the health check to be applied to the targetsThe lb hc record; Tab lists the existing ones
--enableHcLogDetermines whether the health check logs will be kept or nottrue · false (default true)
--useDifferentIpTurns on the health check being done to an address different from the address to which the traffic goestrue · false (default false). Since the check address is specific to the record, it cannot be written in this command; give the address with the single update
--differentSrcTypeSelects from which source address the health check will go outIt is left empty or deviceSrc is written
--manualSrcIt is the field that serves to write by hand the source address from which the health check will go outSince the value set of the --differentSrcType field does not contain manualSrc in this version, the field never becomes active
--maintenanceModeTakes the record into maintenance; no traffic is sent to the targets, the configuration is not deletedtrue · false (default false)
--backupServiceMarks the record as a backup; it does not receive traffic while the others are healthytrue · false (default false)
--useFrontendPortMakes the connection to the backend be made with the listening port on which the request arrivedtrue · false (default false)
--proxyOptCarries the real address of the client to the backend with the PROXY protocolsend-proxy (PROXY protocol v1) · send-proxy-v2; when it is left empty it is off
--sslServiceTurns on connecting to the backend with SSL; all the SSL fields depend on ittrue · false (default false)
--ciphersSelects the cipher suite to be used in the SSL connectionstandard · low (default standard)
--alpnDetermines whether HTTP/2 will be used in the SSL connection or nothttp20_disabled · http20_enabled (default http20_disabled)
--sslSecurityProfileApplies an SSL security profile to the backend connectionThe lb ssl-security record. In this connection only the minimum/maximum SSL version, the cipher list and the curve settings of the profile are valid
--sslVerifyDetermines whether the certificate presented by the backend will be verified or notnone · required (default none)
--sslVerifyCaSelects which CA profile will be used in the verificationThe lb ca record; it is meaningful together with --sslVerify required
--sslClientCertSelects the client certificate that TR7 will present while identifying itself to the backend (mTLS)A certificate record. This is the opposite direction of the verification of the certificate of the visitor: here the client is TR7
--snatOptSelects how the source address of the connection going to the backend will be determinedclientIp carries the address of the client · customIpDevice uses the address selected over the device; when it is left empty no translation is done
--spoofingTurns on the MAC relay behavior while the source address is carried from the clienttrue · false (default false); it is meaningful together with --snatOpt clientIp
--spoofingDefaultClusterIdSelects the default device for the MAC relayIt is selected from the device list (default 1)
--weightDetermines the share of the backend in the distribution; the one whose weight is high receives more requestsA number between 1 and 256
--connLimitLimits the number of connections that the backend will carry at the same timeA number between 1 and 65535
--cookieContentWrites the cookie value that marks this backend in the session persistenceThe text to be carried in the cookie

Fields that exist in the single command but not here, and the reasons:

FieldWhy it is not here
nameThe name is unique; the same value cannot be written to many records
v-deviceThe virtual device determines the set of addresses and tables that can be selected; its value depends on the sibling fields
namespaceThe route table depends on the virtual device in the same way
sniIt is a smart content field; it carries not a value but an expression resolved according to the record
snatIpDeviceIts value comes from the address list of the selected virtual device
spoofingIpIt is an address field; it is written separately for every record
spoofingClusterIpIts value depends on the sibling fields
deviceSrcIts value comes from the address list of the selected device
differentIp.ipThe health check address is specific to the record; since it is an object field it cannot be written in bulk
differentIp.portIt is part of the same object field
addr.ipThe address of the backend is specific to the record
addr.portThe port of the backend is specific to the record

Target Selection and Confirmation ​

TR7 WEB-CLI · selection list and confirmation
admin@TR7LBWAF01> lb backend update-many target selected --maintenanceMode true
 
?  Target objects
    space: mark · ctrl+a: all · enter: confirm
    Filter: (filter by typing) · esc: cancel
 
  [x] <record-1>
  [x] <record-2>
  [ ] <record-3>
    2 selected / 3
 
⚠  2 objects will be updated
    <record-1>, <record-2>
 
Type "yes" to confirm: yes
admin@TR7LBWAF01>  
TR7 WEB-CLI · the whole collection and writing in a script
# the whole collection: the list does not open, the confirmation comes directly
admin@TR7LBWAF01> lb backend update-many target all --enableHcLog false
⚠  This operation will update ALL the objects in the collection
Type "yes" to confirm:
 
# in a script or in a pipeline: the targets are written by hand, the list does not open
admin@TR7LBWAF01> lb backend update-many target selected \
--ids.0 <id-1> --ids.1 <id-2> --maintenanceMode true --onError skip
admin@TR7LBWAF01>  

The screen language depends on the user

The texts in the selection list and on the confirmation screen come according to the language preference of the signed-in user. The confirmation word is yes in the English interface and evet in the Turkish interface.

The detailed behavior of bulk update — which fields can be written in bulk and the report returned for each target — is on the API Commands page.

Things to Know ​

  • The name is unique. A second backend with the same name cannot be created.
  • The maintenance mode does not delete the record. --maintenanceMode true leaves the backend in the configuration, it only cuts the traffic; false is written in order to take it back.
  • A backup backend works only when the others go down. A record marked with --backupService true does not receive traffic while the other backends in the group are healthy.
  • The bulk update carries only the common fields. In the update-many command the fields specific to the record, such as the name, the address and the port, are not present; the common fields such as the health check, SSL, the weight and the maintenance mode can be written. The command always asks for confirmation before applying.
  • The health check is a separate record. The check to be written in the --hc field is first created with lb hc.