class map
1 TopiciRule for Outbound Pool ISP based Load Balancing
Dears, thanks in advance for your help. We have a customer who has several subnet and each subnet needs to connect to the internet on 2 ISPs. I am going to do load balancing based on ISPs (ISP1 AND ISP2) and if the user is load-balanced to ISP1 then he should be source natted with IP 1 and if ISP2 then IP 2. And if the source IP of users do not match any IPs, please be source natted with IP in ISP1 Range and go to that ISP. This is the iRule I made, but I'm facing troubles matching and pool members do not accept the connections, I think I'm making a serious mistake like doing 2 server side connections per 1 session which cause the page to reset and maybe I have mistake with the iRule that doesn't even let it match well Below is the iRule, I'm open to suggestions to make this easier or improve the mistakes in it, thanks a lot. Dears, thanks in advance for your help. We have a customer who has several subnet and each subnet needs to connect to the internet on 2 ISPs. I am going to do load balancing based on ISPs (ISP1 AND ISP2) and if the user is load-balanced to ISP1 then he should be source natted with IP 1 and if ISP2 then IP 2. And if the source IP of users do not match any IPs, please be source natted with IP in ISP1 Range and go to that ISP (192.168.5.5) This is the iRule I made, but I'm facing troubles matching and pool members do not accept the connections, I think I'm making a serious mistake like doing 2 server side connections per 1 session which cause the page to reset and maybe I have mistake with the iRule that doesn't even let it match well Below is the iRule, I'm open to suggestions to make this easier or improve the mistakes in it, thanks a lot. when LB_SELECTED { if {(not([class match [IP::client_addr] equals Group2 ]) && (not ([class match [IP::client_addr] equals wirlessEmp2Outside ])) && (not ([class match [IP::client_addr] equals wirlessEmp_br2Outside ])) && (not ([class match [IP::client_addr] equals Mail2Outside ])) && (not ([class match [IP::client_addr] equals wirlessGuest2Outside ])) && (not ([class match [IP::client_addr] equals wirlessGuest_br2Outside ])) && (not ([class match [IP::client_addr] equals wirlessTest2Outside ])) ) }{ log local0. "IP Not Found in Data Groups for [IP::client_addr] - sending to default ISP1 pool member" LB::detach pool irule_pool member 192.168.5.5 snat 6.6.6.6 } switch [LB::server addr] { 192.168.5.5 { LB pool was ISP1 , So select the corresponding SNAT Pool from ISP1 Groups if {[class match [IP::client_addr] equals User2Outside ] || [class match [IP::client_addr] equals DMZ2Outside ]} { log local0. "ISP1 source IP 1.1.1.1 was chosen for [IP::client_addr] within User2Outside or DMZ2Outside" snat 1.1.1.1 } elseif { [class match [IP::client_addr] equals Group2]} {l og local0. "ISP1 source IP 2.2.2.2 was chosen for [IP::client_addr] for Group2 " snat 2.2.2.2 } } 192.168.5.6 { LB pool was ISP2 , So select the corresponding SNAT IP from ISP2 if {[class match [IP::client_addr] equals User2Outside ] || [class match [IP::client_addr] equals DMZ2Outside ]} { log local0. "ISP2 source IP 3.3.3.3 was chosen for [IP::client_addr] within User2Outside or DMZ2Outside" snat 3.3.3.3 } elseif {[class match [IP::client_addr] equals Group2]} {log local0. "ISP2 source IP 4.4.4.4 was chosen for [IP::client_addr] for Group2 " snat 4.4.4.4 } } } }570Views0likes10Comments