Forum Discussion
Mike_Graston_10
Nimbostratus
Dec 01, 2006Million Dollar SNAT question
Ok, here it is. How do I get pool memebers to be able to Snat their address only to the url context requests they are part of. An explanation of this is I have about 10 Web sites with eachin the same url structure lets say xxx.mydomain.com. these individual web servers make call to each others vips and all the web servers are on the same subnet 10.10.10.0/24. The web server in app1 makes a call to the VIP address in app2 which in turn will load balance them to servers on the same subnet as the source address of the server in app1. Once it gets load balanced to one of these servers in app2, sitting on the same subnet as the source IP of the request that is coming from app1, it would try to communicate directly to the server and thus cause an asymetric route or a loop as it were. In my QA I setup a snat pool on the VS to accomplish this and it works, however, there is always a However, this causes problems as now every one in the logs appear as a single snat address. So I would like to snat each individual server with in each of the ten application to it's own snat address so that the logs would show all Internet traffic source IP's and the snat addresses which I can send them a matrix of which server they are.
6 Replies
Sort By
- hoolio
Cirrostratus
- Mike_Graston_10
Nimbostratus
Aaron, - hoolio
Cirrostratus
You can create datagroups in the GUI under Local Traffic >> iRules. Click on the datagroups tab to the right of the iRules tab, and create a datagroup of IP addresses. - Rodrigo_EV_7869
Nimbostratus
There's also another forum that you can get more ideas: - Mike_Graston_10
Nimbostratus
Thanks, I think I owe you lunch at this point. The forward command I thought I read that if it doesn't snat the address it would just forward the request with the real IP??? Without the forward command what happens to the traffic if it's not in the Class with the correct port? Anyway I think I have a solution I have 2 subnets on the web server side so I think I can isolate the correct web sites so no snat is needed. Of course the cutover I will probably need to add this rule some where as the developeers don't know ther apps. - hoolio
Cirrostratus
xf6svrb, the example rule you posted looks like it's designed to be applied to a IP forwarding virtual server configured for any service. I base this on the fact that it's checking the destination port and using the forward command.when CLIENT_ACCEPTED { SNAT requests if client_addr is defined in the class if { [matchclass [IP::client_addr] equals $::Hosts]} { snat 192.168.100.12 } }
when LB_SELECTED { if {[IP::addr "[IP::client_addr]/24" equals "[LB::server addr]/24"]} { snat 192.168.100.12 } }
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects