Sunday, July 10, 2016

configure cisco server load balancing for apache2 backend

*** information ***
server1 : 192.168.202.46
server1 : 192.168.202.25
client ip subnet: 192.168.13.0/24
cisco router version:
Cisco IOS Software, 3600 Software (C3660-TELCOENTK9-M), Version 12.4(13b), RELEASE SOFTWARE (fc3)


1- router configuration

ip slb serverfarm APACHEFARM
 nat server
 bindid 80
 real 192.168.202.25
  faildetect numconns 0 numclients 0
  inservice
 real 192.168.202.46
  faildetect numconns 0 numclients 0
  inservice
!        
ip slb vserver VAPACHEFARM
 virtual 192.168.202.100 tcp www
 serverfarm APACHEFARM
 inservice
!        
interface FastEthernet0/0
 ip address 192.168.202.201 255.255.255.0
 duplex auto
 speed auto
!        
interface FastEthernet0/1
 ip address 192.168.13.2 255.255.255.0
 duplex auto
 speed auto


2- on client we can the router virtual ip address 192.168.202.100, instead of server real ip address 192.168.202.25 and 192.168.202.46
screenshot of client access to server using router virtual ip address



3- show command related to slb

1-
R3#show ip slb vservers

slb vserver      prot  virtual               state         conns  
-------------------------------------------------------------------
VAPACHEFARM      TCP   192.168.202.100:80    INSERVICE     0    
  

2-
R3#show ip slb stats
Pkts via normal switching:  257
Pkts via special switching: 0
Connections Created:        36
Connections Established:    5
Connections Destroyed:      36
Connections Reassigned:     1
Zombie Count:               0



3-
R3#show ip slb reals

real                  server farm      weight  state          conns
-------------------------------------------------------------------
192.168.202.25        APACHEFARM       8       OPERATIONAL    1       
192.168.202.46        APACHEFARM       8       OPERATIONAL    0
   


4-
R3#show ip slb conns

vserver         prot client                real                  state     nat
-------------------------------------------------------------------------------
VAPACHEFARM     TCP  192.168.13.4:48312    192.168.202.46        CLOSING   S 

No comments:

Post a Comment