Forum Discussion

Ignacio_Franzon's avatar
Ignacio_Franzon
Icon for Nimbostratus rankNimbostratus
Sep 13, 2010

Help with iRule for smtp server

Hi,

 

I'm trying to configure a iRule, but I haven't succes. I've two ISP connected to Link Controller, and I want to configure an internal smtp server to balance these ISP's in function of least connections, how I can configure the LC so that when you choose the ISP1 modify the package with the SNAT pool x.x.x.x and when choose the other ISP put another snat y.y.y.y? I don't want to choose automap. I tried this but didn't work:

 

 

when LB_SELECTED {

 

if { [IP::addr [LB::server addr] equals 10.0.0.254] } {

 

snat 1.1.1.1

 

}

 

elseif { [IP::addr [LB::server addr] equals 10.0.1.254] } {

 

snat 2.2.2.2

 

}

 

 

Thanks

 

1 Reply

  • Hi Ignacio,

     

     

    That iRule looks like it should work to select two different SNAT addresses based on which server IP was selected. If you add logging to the iRule, what happens when the testing fails? What do you see at the IP layer when a failure occurs?

     

     

    Aaron