Forum Discussion

Lobak_187587's avatar
Lobak_187587
Icon for Nimbostratus rankNimbostratus
Feb 16, 2015

redirecting from virtual server to 2 web servers

this is my first time configuring F5, when I configured a pool, set http check on each members and assign it to a virtual server, I thought that was it.

typing IP of virtual server on web browser returns "connection was reset" on firefox.

I searched for other vendors irules and tried below which only redirects to one of pool member.

when HTTP_REQUEST {
 if { [HTTP::uri] eq "/"}  {
     HTTP::redirect "http://192.168.1.98/"
} 
}

How do I make it to actually load balance?

3 Replies

  • you do not need an irule to perform that. HTTP::redirect will also only send a 3xx to your client and not perform anything between the BIGIP and the backends. Simply assign the pool to the virtual server (resources). The load balancing method is defined at the pool level.

     

  • yes, that is what I just found out. Somehow, IP was used for virtual server is problematic. I don't know why. Changing to different IP solved it.

     

  • Hi Lobak,

     

    as Alexandre already wrote, no iRule will be required.

     

    But I guess there was no SNAT AutoMap configured for your virtual server.

     

    Without SNAT the server will return the response according to it´s routing table.

     

    If the server´s gateway does not point to the BIG-IP you will see an asymmetric traffic flow and the client will simply discard the responses (as they are not coming from the virtual server).

     

    Applying SNAT will force all server´s responses through the BIG-IP.

     

    Thanks, Stephan