Allied Telesis Routers and Switches manual Configure triggers, Save the configuration

Page 6

9.Configure triggers

If one of the load balancers goes down, the firewall configuration needs to change. This example uses triggers to make this change automatically, by running a script when the state changes. See "Create the Scripts" on page 9 for instructions for making the scripts.

Enable triggers.

enable trigger

Set the router to run the script master.scp if it becomes the master load balancer. This script adds firewall allow rules to support the resource pools.

create trigger=2 module=loadbalancer event=master script=master.scp

Set the router to run the script slave.scp if it becomes the slave load balancer. This script removes redundant firewall allow rules.

create trigger=3 module=loadbalancer event=slave script=slave.scp

10.Save the configuration

Save the configuration and set the router to use it when it restarts.

create config=lb_redun.cfg

set config=lb_redun.cfg

Configure Load Balancer Redundancy on Allied Telesis Routers and Switches

6

Image 6
Contents Introduction ExamplesWhat information will you find in this document? Which products and software version does it apply to?Configure Load Balancer Example of Basic RedundancyConfigure the firewall Disable the GUI and the Http server on portConfigure Vrrp Configure load balancingConfigure triggers Save the configurationSet system name=LB-2 Either Script for when a load balancer becomes the slave slave.scp Create the ScriptsConfigure Load Balancing Extra Commands Extension Controlling Server SelectionMaster.scp Configure the Triggers Extra CommandsModify the Scripts Slave.scpScript for when the preferred server goes down sftp1down.scp Create New ScriptsConfiguration Summary Commands Load BalancerCommands Load Balancer File sftp1down.scp File master.scpFile slave.scp File sftp1up.scp