Forum Discussion

George_33482's avatar
George_33482
Icon for Nimbostratus rankNimbostratus
Feb 21, 2012

LC load balancing based source irule

Hello,

 

 

I have a setup: Lan -> Proxy servers (ISA) -> switch-> LC-> switch ->internet Links.

 

Where there are three proxy servers and six internet links and these links are connected to a switch using dot1q to the LC.

 

 

 

i am loadbalancing outbound traffic, the default_gateway pool will be created and used as befault routes .

 

 

The customer's requirement will be:

 

1- proxy 1 will have (traversing) links 1 and 2 (pool1)

 

2- proxy 2 will have (traversing) links 3 and 4 (pool2)

 

3- proxy 3 will have (traversing) links 5 and 6 (pool3)

 

 

So I have to write an iRule saying

 

IF the client ip address equals proxy1 -> go to pool1 Else if client ip address equals proxy2 -> go to pool2 Else if client ip address equals proxy3 -> go to pool3

 

 

So as the below irule, will it work as it should be or do i have to add something else?

 

Please advice back or provide any suggestions because i am implementing this setup without prior staging.....directly into production .

 

 

when CLIENT_ACCEPTED {

 

if { [IP::addr [IP::client_addr] equals 10.60.60.3] } {

 

if {[active_members pool1] < 1}{

 

pool default_pool

 

snat automap

 

persist dest_addr

 

} else {

 

 

pool pool1

 

snat automap

 

persist dest_addr

 

}

 

}

 

elseif { [IP::addr [IP::client_addr] equals 10.60.60.4] } {

 

if {[active_members pool2] < 1}{

 

pool default_pool

 

snat automap

 

persist dest_addr

 

} else {

 

pool pool2

 

snat automap

 

persist dest_addr

 

}

 

}

 

elseif { [IP::addr [IP::client_addr] equals 10.60.60.5] } {

 

if {[active_members pool3] < 1}{

 

pool default_pool

 

snat automap

 

persist dest_addr

 

} else {

 

pool pool3

 

snat automap

 

persist dest_addr

 

}

 

 

Thank you and Regards,

 

George

 

 

No RepliesBe the first to reply