Forum Discussion

Comex_17260's avatar
Comex_17260
Icon for Nimbostratus rankNimbostratus
Dec 26, 2011

source routing

Hello folks,

 

 

I have several clients and servers and a LB in the middle with several Virtual Servers.

 

 

Requests from clients are load balanced to servers well, but when servers starts a request such as sending an e-mail i have a problem.

 

LB is the gateway of the servers.

 

 

One of my VS IP is 20.20.20.118, and another 30.30.30.15. My mail server's IP address is 20.20.20.116. When a node of a pool of the server 30.30.30.15 sends an e-mail, it goes out from 20.20.20.118, rather than 30.30.30.15 even if the node belongs to the pool which is bind to 30.30.30.15 VS.

 

 

I can solve this with SNAT pool and other parameters in the user interface, though this is not enough for me, because I have several servers with several VS and several applications that are trying to go out trough LB.

 

 

So I belive I need LB to route the outbound traffic according to source.

 

 

if the source is this node/pool

 

go out from this IP

 

if the source is that node/pool

 

go out from that IP

 

....

 

 

 

can i do such a thing with iRule?

 

 

Thanks in advance.

 

 

-Comex

 

1 Reply

  • i think configuring snat might be simpler.

    e.g.

    [root@ve1023:Active] config  b virtual bar list
    virtual bar {
       snat automap
       pool foo
       destination 172.28.19.79:80
       ip protocol 6
    }
    [root@ve1023:Active] config  b pool foo list
    pool foo {
       members {
          200.200.200.101:80 {}
          200.200.200.102:80 {}
       }
    }
    [root@ve1023:Active] config  b snat snat_bar list
    snat snat_bar {
       translation 172.28.19.79
       origins {
          200.200.200.101
          200.200.200.102
       }
    }