Forum Discussion

Jeff_103365's avatar
Jeff_103365
Icon for Nimbostratus rankNimbostratus
Apr 13, 2009

redirect by FQDN on LTM

I have two Internet links connected to my LTM.How can I redirect requests from clients based on the requested FQDN,ie.I want requests containing ".edu" go on one link and requests containing ".gov" go on another link?

3 Replies

  • Assuming this is ONLY http traffic.

    You can create a http router pool containing the addresses of 2 of gateway links on port 80 (i.e. gatewayip1:80 and gatewayip2:80)

    Then you create a wildcard VIP listening on port 80 and add the http router pool with persistance and http profile. The VIP might need to have a specific setting for SNAT set to AUTOMAP

    The VIP can contain the following iRule

     
     when HTTP_REQUEST { 
        switch [HTTP::host] { 
        "*.edu" { node gatewayip1:80 } 
        "*.gov" { node gatewayip2:80 } 
        } 
     } 
     

    This accomplishes the traffic you want to push in relation to the http host header. If there is no match then, by default, it will participate in the load balancing method and choose the one gateway.

    I am not sure if my example fits in your architecture so there might be tweaks but this is based on dirrecting HTTP traffic and I am making assumptions about your network.

    Also there a configuration example on ask.f5.com Click here that talks about directing traffic to 2 ISPs.

    I hope this helps

    CB

  • What other traffic besides http do you want to go by this rule?

     

     

    CB