Skip to content
Smarter by Design.Simpler for Business

lb ​

The lb command branch manages the load balancing resources of TR7 from the command line: the vServices, the Backend Services and their groups, the conditions and the actions, the profiles, the certificates and the protection settings. Its panel equivalent is the Load Balancer - ADC section.

This is the widest branch of the command tree: it carries twenty-six resources and most of the records that connect to the other branches of the tree (WAF, AGS, certificates) are here.

26 Resources
the commands under lb
All the records of load balancing, from the vService to the certificate, from the profiles to the protection.
5 Commands
list · show · add · update · delete
On some resources there are additional actions too: restarting, status, bulk update.
Narrows on type selection
type · criteria · checkType
In the vService, action, condition and certificate commands the type is selected first.
Load Balancer permission
the permission area of the lb branch
The view permission is required for reading and the modify permission for writing.

Command Map ​

Traffic and vService

CommandWhat it managesPanel screen
lb serviceThe vServices: the listened address, the type and the bound profilesvService Management
lb vhostThe shared front-end layer: status and restartvService Management
lb backendThe Backend ServicesBackend Services
lb backend-groupThe backend server groupsBackend Groups
lb conditionThe traffic conditionsConditions
lb actionThe actions to be applied when the condition is metActions

Profiles

CommandWhat it managesPanel screen
lb hcThe health checksHealth Checks
lb cacheThe cache profilesCaching
lb compressionThe compression profilesCompression
lb logThe log profilesLogging
lb notificationThe alert and notification profilesAlert Notifications
lb pageThe content pagesContent Pages
lb limitsThe vService limitsvService Limits
lb reportThe report profilesReports
lb timeoutsThe timeout profilesTimeouts
lb trusted-proxyThe trusted proxy profilesTrusted Proxy

Certificate and TLS

CommandWhat it managesPanel screen
lb certificateThe SSL/TLS certificates; additionally creating a request and internal creationSSL/TLS Certificates
lb caThe certificate authorities; additionally creating an internal CACertificate Authorities
lb ssl-securityThe TLS security profilesTLS Security Profiles
lb certificate-requestThe certificate requests (CSR)SSL/TLS Certificates
lb client-certificateThe client certificatesClient Certificates
lb private-keyThe private key libraryPrivate Key Library
lb pki-profileThe certificate profilesCertificate Profiles
lb pki-issuedThe certificates created with the internal CACertificate Profiles
lb acme-dns-providerThe ACME DNS providersACME DNS Providers

Protection

CommandWhat it managesPanel screen
lb threat-protectionThe threat protection settings of the vService; the record is born together with the vService, it is not added and not deletedBot & DDoS Protection

The Same Five Commands on Every Resource ​

TR7 WEB-CLI · the five command pattern
admin@TR7LBWAF01> lb backend list # list all of them
admin@TR7LBWAF01> lb backend show <id> # show one
admin@TR7LBWAF01> lb backend add <fields> # new record
admin@TR7LBWAF01> lb backend update id <id> <fields> # change
admin@TR7LBWAF01> lb backend delete <id> # delete
admin@TR7LBWAF01>  
CommandHow the identity is written
show · deleteRight after the command, without writing the field name: show <id>
updateWith the id field: update id <id>

The Actions Outside the Five Commands ​

Some resources offer their own operations too:

CommandFunction
lb service status list · lb service status idShows the running status of the vServices
lb service restartRestarts the vService
lb vhost status list · lb vhost status idShows the status of the shared front-end layer
lb vhost restartRestarts the shared front-end layer
lb ca createCreates an internal certificate authority
lb certificate create-csrCreates a certificate request
lb certificate issue-internal · lb certificate renew-internalCreates and renews a certificate with the internal CA
lb service update-many · lb backend update-many · lb backend-group update-many · lb hc update-many · lb threat-protection update-manyApplies the same change to many records at once; the targets are marked from the selection list and the command asks for confirmation (detail)

The Field Writing Rules ​

RuleHow it is written
Required fieldIt is written without a prefix and is asked for in order: add name web-01 v-device <device>
Optional fieldIt takes the -- prefix: --weight 3
List fieldEvery item with its own index: --servers.0.ip, --servers.1.ip
Nested fieldWith a dot: --addr.ip, --addr.port
Duration fieldThe value and the unit are written separately: --field.val 30 --field.unit s
Type fieldAfter type, criteria, checkType is selected, only the fields of that type are asked for
Emptying a fieldOnly during update: --field.delete

In the vService command the type is written first

In the lb service add command the first field asked for is type (http, tcp, layer4). Without the type being written, not even the name of the record is listed. The same pattern is valid in the lb certificate command too: first type, then name.

Setting Up a vService from Scratch ​

Step 1 Define the Backend Service
The address and the port of the server are given here.

lb backend add name web-01 v-device <device> namespace <route-table> addr.ip 10.20.0.15 addr.port 8080
Step 2 Create a group if needed
If more than one server will be used as a single target, a group is opened.

lb backend-group add name web-group v-device <device> namespace <route-table>
Step 3 Set up the health check
The check type is selected, then the name and the target of the check are written.

lb hc add checkType http name web-check
Step 4 Create the vService
First the type, then the remaining fields are written.

lb service add type http …
Step 5 Bind the profiles and the rules
The profiles such as cache, compression, log, timeout and the condition-action rules are bound to the vService.

Permission ​

The lb commands are bound to the Load Balancer permission area: the view permission is required for reading the branch, and the modify permission for adding, changing or deleting a record. This branch additionally covers the WAF and certificate areas; a user who has permission in one of these areas can enter the branch, and the server decides which resource they can access. For the details the API Commands page can be looked at.