Forum Discussion

1983_103087's avatar
1983_103087
Icon for Nimbostratus rankNimbostratus
Nov 05, 2009

Persistence on SNAT address

Is there any irules to persist Snated traffic going out of the F5 to be the same snat address and not using dedicated snat address?

 

 

Example:

 

I have a Ltm with snat pool: 1.2.3.4, 1.2.3.5, 1.2.3.6

 

 

Client A (1.1.1.1) connection passes through the ltm will get snat to 1.2.3.4 and concurrent/new connections is the same snated ip.

 

 

Client B (1.1.1.2) connection passes through the ltm will get snat to 1.2.3.6 and concurrent/new connections is the same snated ip.

2 Replies

  • I can't think of a way to do this with standard configuration. You could try using universal persistence to track the client and corresponding SNAT IP. Else, you could try doing a calculation against the client IP to select 1/3 of clients use SNAT address 1 and not track which clients use which SNAT IP. The logic could be something like "if the last digit in the IP is 0-3 use IP 1, 4-6 use IP 2, 7-9 use IP 3. Obviously this wouldn't lead to a perfect distribution, but it would make for a low overhead way of using the same SNAT IP for the same client IP over any time period.

     

     

    Aaron
  • Hi 1983, we discussed similar solutions here, if you're still looking:

     

     

    http://devcentral.f5.com/Default.aspx?tabid=53&forumid=31&view=topic&postid=813179

     

     

    Aaron