Forum Discussion

GlP_33611's avatar
GlP_33611
Icon for Nimbostratus rankNimbostratus
Mar 29, 2007

Do I need iRule to redirect outbound traffic

Hello,

 

 

I'm new on this forum. I have read many topics but I did not find answer to my question.

 

 

With a basic configuration, let say two internet service provider (ISP1 and ISP2) and internal network.

 

 

To forward outbound traffic, I have a network Virtual servers (destination 0.0.0.0/0.0.0.0), and I have created the Default Gateway with the default_gateway_pool (which contains the two default ISP routers).

 

 

I want to be sure that a specific flow (based on source ip address) which is comming from internal subnet (let say SubnetA) is going out to ISP1.

 

(because SubnetA belongs to my company and is not routed by ISP1)

 

 

Do I have to create iRule to do this job or is there an other method, for instance through load balancing configuration ?

 

 

Thanks.

 

GlP

3 Replies

  • Hi GIP,

    You could create a new pool containing the network device for ISP2 and then use a rule on your wildcard virtual server to do this.

    Here's an example that should get you started:

    
    when CLIENT_ACCEPTED {
       if {[IP::addr "[IP::client_addr]/24" equals "10.20.30.0"]} { 
          pool isp2_pool
       }
       else {
          pool default_gateway_pool
       }
    }

    Try checking the wiki for details on the IP::addr command for comparing IP's and/or subnets (Click here)

    Aaron
  • Hello,

     

     

    Thanks for your help.

     

     

    It's working fine with this method even if I'm quite surprise to have to use iRule for this kind of feature.

     

     

    GlP.

     

  • Just FYI, you don't have to if it's port based traffic...you can create a 0.0.0.0:80 vip and point that to a different pool and LTM will process that before the 0.0.0.0:0 vip (most specific to least specific).

     

     

    Denny