Forum Discussion
VIPS without automap
Hi,
When i have a vip and automap is enabled,all workks good and i can access my ftp pool or www pools and no problems. when i turn off automap and present the client ip as is,something get broken....i have the servers default gateway as the f5 interface and i see http reply back from the server to the f5 but for some reason does not establish a tcp handshake.
am i missing any setting on the LTM F5 when i disable automap ?
thanks
Sam
13 Replies
Hi Sam,
SNAT insures that all calls made on behalf of the Client are routed back to the F5 for properly delivery back to the Client. It prevents any calls from back end servers or services from making a call directly back to the Client (since the Client wouldn't be expecting to hear from anyone except who it initiated a connection to (Prevents Broken Routes)).
Does the Server(s) live on a Subnet owned by the F5? Does the Application(s) make any calls to other servers or services?
- Sam01_131907
Nimbostratus
Michael, what you said make sense where the client expect a return traffic from the VIP ip address and not the physical server ip address(where its unknown to the client).automap translate all the clients ip addresses behind some nat(automap or irule) ...is that the best practicies? can we keep the client identity as is ans somehow route the traffic back from the server(ftp or www) to the client?
- Michael_Yates
Nimbostratus
Hi Sam,
SNAT insures that all calls made on behalf of the Client are routed back to the F5 for properly delivery back to the Client. It prevents any calls from back end servers or services from making a call directly back to the Client (since the Client wouldn't be expecting to hear from anyone except who it initiated a connection to (Prevents Broken Routes)).
Does the Server(s) live on a Subnet owned by the F5? Does the Application(s) make any calls to other servers or services?
- Sam01_131907
Nimbostratus
Michael, what you said make sense where the client expect a return traffic from the VIP ip address and not the physical server ip address(where its unknown to the client).automap translate all the clients ip addresses behind some nat(automap or irule) ...is that the best practicies? can we keep the client identity as is ans somehow route the traffic back from the server(ftp or www) to the client?
- fubarSUSHI
Altocumulus
If you dont want to use automap... here is an irule that does an "automap-like" response but you choose the IP for the snatpool.
when CLIENT_ACCEPTED { if { [matchclass [IP::client_addr] equals datagroup_Hosts]} { snatpool snatpool_SNAT } }- Sam01_131907
Nimbostratus
i am trying to understand why we have to change the client ip with automap or irule as you showed.can we keep the client ip as is with no nat. this is where my traffic fails now. thanks for the irule....
- dirtiPACKET_136
Nimbostratus
If you dont want to use automap... here is an irule that does an "automap-like" response but you choose the IP for the snatpool.
when CLIENT_ACCEPTED { if { [matchclass [IP::client_addr] equals datagroup_Hosts]} { snatpool snatpool_SNAT } }- Sam01_131907
Nimbostratus
i am trying to understand why we have to change the client ip with automap or irule as you showed.can we keep the client ip as is with no nat. this is where my traffic fails now. thanks for the irule....
- Kevin_Stewart
Employee
The whole idea behind SNAT and automap (a form of SNAT) is to force return routing through the BIG-IP. As Michael stated, the default action for a standard virtual server is to not translate te client's source address. This means that, by default, the request arriving at the server behind the F5 will have the client's true source address. If the server knows how to route back to that client that doesn't involve going back through the F5, then it will bypass it. In most cases this will break the transaction because the client will receive a response from an address that it never sent a request to (the server's source address). SNAT changes the source address to something controlled by the F5 so that the server will natively respond back to that IP. The down side of that, of course, is that the server does not see the client's real IP address. You then have a few options:
-
Make the servers use the F5 as their default gateway. Ultimately you have to force the return traffic back through the F5.
-
Inject the client's IP into a header or packet. This method is entirely dependent on the protocol you're passing.
-
- Kevin_Stewart
Employee
Let's first validate that traffic is in fact returning to the F5. Do you see the server sending the traffic back to the F5? Or more important, do you see the returning traffic coming to the F5?
- Sam01_131907
Nimbostratus
yes i did a tcpdump and saw the server responding back to the f5
- Kevin_Stewart
Employee
Yes, but did you see the packets arrive at the F5? Capturing from the F5? How is the VIP configured? Is the destination address in the return traffic the address of the client?
- dfosborne2_2224
Nimbostratus
If your pool members are linux, you do have another option. With a little assist from iproute2 and iptables, you set the bigip as a conditional gateway via layer 2. See the writeup here:
https://devcentral.f5.com/codeshare/kill-snat-automap
Known to work on 11.x or better but I see no reason why it wouldn't run on older versions. The required shell script is supplied with the writeup.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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