Allied Telesis Routers and Switches manual Configuration Summary, Commands Load Balancer

Page 13

Configuration Summary

This section shows the full extended configurations and scripts, without comments.

Commands: Load Balancer 1

set sys name=LB-1

create vlan=vlan2 vid=2 create vlan=vlan3 vid=3 create vlan=vlan4 vid=4

add vlan=2 port=1 add vlan=3 port=2-4 add vlan=4 port=5

enable ip

add ip int=vlan2 ip=172.214.1.3 mask=255.255.255.0 add ip int=vlan4 ip=192.168.2.2

add ip int=vlan3 ip=192.168.1.200

enable firewall

create firewall policy=lb

set firewall policy=lb tcpt=5 set firewall policy=lb udpt=5 set firewall policy=lb othert=5

add firewall policy=lb int=vlan3 type=private add firewall policy=lb int=vlan2 type=public add firewall policy=lb int=vlan4 type=private

dis gui

dis http serv

enable vrrp

create vrrp=2 over=vlan3 ipaddress=192.168.1.202

ena lb

add lb resp=web sel=roundrobin fail=no

add lb resp=sftp sel=roundrobin fail=no

add lb res=web1 ip=192.168.1.1 port=80 resp=web add lb res=web2 ip=192.168.1.2 port=80 resp=web

add lb res=sftp1 ip=192.168.1.1 port=22 resp=sftp add lb res=sftp2 ip=192.168.1.2 port=22 resp=sftp dis lb res=sftp2 immediately

add lb virt=web publici=172.214.1.2 publicp=80 resp=web

add lb virt=sftp publici=172.214.1.2 publicp=22 resp=sftp aff=no

ena lb virt=web ena lb virt=sftp

set lb redund peer=192.168.2.1 list=5000 reduni=172.214.1.2 publ=vlan2 redunm=255.255.255.0 ena lb redund

enable trigger

cre trigger=2 module=loadbalancer event=master script=master.scp cre trigger=3 module=loadbalancer event=slave script=slave.scp

cre trigger=4 module=lb event=resstate resource=sftp1 lbstate=closing script=sftp1down.scp cre trigger=5 module=lb event=resstate resource=sftp1 lbstate=up script=sftp1up.scp

Configure Load Balancer Redundancy on Allied Telesis Routers and Switches

13

Image 13
Contents Examples IntroductionWhich products and software version does it apply to? What information will you find in this document?Example of Basic Redundancy Configure Load BalancerDisable the GUI and the Http server on port Configure the firewallConfigure load balancing Configure VrrpSave the configuration Configure triggersSet system name=LB-2 Either Create the Scripts Script for when a load balancer becomes the slave slave.scpExtension Controlling Server Selection Configure Load Balancing Extra CommandsModify the Scripts Configure the Triggers Extra CommandsMaster.scp Slave.scpCreate New Scripts Script for when the preferred server goes down sftp1down.scpCommands Load Balancer Configuration SummaryCommands Load Balancer File slave.scp File master.scpFile sftp1down.scp File sftp1up.scp