Configuring Load Balancers

>ssh -1 admin@genome-lb2
SSH@genome-lb2>enable  
SSH@genome-lb2#configure terminal or conf t
SSH@genome-lb2(config)#
SSH@genome-lb2(config)#server virtual yeastgenome-www  (crumb and crust)
SSH@genome-lb2(config-vs-yeastgenome-www)#
two group names: virtual yeastgenome-www for www.yeastgenome.org and virtual geneontology-amigo
for the amigo.geneontology.org (goweb1-2)
SSH@genome-lb2(config-vs-yeastgenome-www)#show conf
Startup configuration:
!
ver 07.4.01T12
global-protocol-vlan
!
!
healthck check1 tcp
  dest-ip 171.65.77.177
  port http
  protocol http
  protocol http url "HEAD /"
  l7-check

healthck check2 tcp
  dest-ip 171.65.77.186
  port http
  protocol http
  protocol http url "HEAD /"
  l7-check

healthck check-crumb tcp
  dest-ip 171.65.76.247
  port http
  protocol http
  protocol http url "HEAD /"
  l7-check

healthck check-crust tcp
  dest-ip 171.65.77.64
  port http
  protocol http
  protocol http url "HEAD /"
  l7-check

!
server predictor response-time
server sticky-age 60

server port 80
 no-fast-bringup
 tcp
!
!
!
!
!
server real goweb1 171.65.77.177
 port http
 port http healthck check1
 port http keepalive
 port http url "HEAD /"
!
server real goweb2 171.65.77.186
 port http
 port http healthck check2
 port http keepalive
 port http url "HEAD /"
!
server real crumb 171.65.76.247
 port http
 port http healthck check-crumb
 port http keepalive
 port http url "HEAD /"

!
server real crust 171.65.77.64
 port http
 port http healthck check-crust
 port http keepalive
 port http url "HEAD /"
!
server real goweb1-test 171.65.76.200
 port http
 port http url "HEAD /"
!
server real goweb2-test 171.65.76.201
 port http
 port http url "HEAD /"
!
!
server virtual geneontology-amigo 171.65.77.195
 sym-priority 254
 port http sticky
 port http dsr
 bind http goweb1 http goweb2 http
!
server virtual yeastgenome-www 171.65.77.55
 sym-priority 2
 port http sticky
 port http dsr
 bind http crumb http crust http
!
server virtual geneontology-amigo-test 171.65.76.177
 sym-priority 254
 port http sticky
 port http dsr
 bind http goweb1-test http goweb2-test http
!
vlan 1 name DEFAULT-VLAN by port
 no spanning-tree

 ip-proto
!
aaa authentication login default local
enable super-user-password .....
hostname genome-lb1
ip address 171.65.77.215 255.255.254.0
ip default-gateway 171.65.76.1
ip dns domain-name stanford.edu
no telnet server
username admin password .....
!
!
!
!
crypto key generate rsa public_key "1024 33 1640281184146544742116156126580323031328984038395346326102279563248475036
72
956792780436910331681930231477698399594602632694187848826139298795248501377242298753661045990357486762496360551753849
03
0374527584398687876016320687150963717198278208124701853617480961170457630502634963719184795356960284069362517356167 g
en
ome-lb1@stanford.edu"
!
crypto key generate rsa private_key "*************************"

!
ip ssh rsa-authentication no
!
!
end
SSH@genome-lb2(config-vs-yeastgenome-www)#

### to bind a server you would type: bind http server-name http
### to remove: no bind http server-name http  this needs to be done on BOTH LB's so it does not
get used.

### to commit the change: write memory
### the LB has failover for each other, one lb is active for one virtual and the other lb for the other
virtual.  Each has priority, 254 means active for that virtual and 2 means low priority.

### to set this DSR up to use the load balancer IP onto the seperate servers, you need to set the loopback
interface with the LB IP.  le0:1 set to LB-IP.  Our LB's only pass the client request to the server, the
server returns the request directly NOT back through the LB.  This is so it is much faster for the
requestor.

## to temporarily take a server out of the LB, you type no bind http crust http, but don't "write mem"
this way it is out of the running parameters and should be dropped.  To get it going again just
type bind http crust http.  if this fails then type reload.  this will reboot and reread the flash
configs, which you did not change so crust will come back.  We do this only on the passive LB.