Allied Telesis Routers and Switches manual Commands Load Balancer

Page 14

Commands: Load Balancer 2

set sys name=LB-2

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.4 mask=255.255.255.0

add ip

int=vlan4 ip=192.168.2.1

add ip

int=vlan3 ip=192.168.1.201

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.2 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

14

Image 14
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