Forum Discussion

Steele6599_8766's avatar
Steele6599_8766
Icon for Nimbostratus rankNimbostratus
Mar 25, 2014

SMTP load balancing with Exchange 2010

So I setup the load balancing on our F5 but now have an issue with the receive connectors.. in the past we had different receive connectors on our Hub Transport for different external users. Depending on the IP the smtp connection was coming from would determine the receive connector that would be used. Now it appears that all connections come from the F5 VLAN self IP. Is there any suggestions on how this should be configured to get it working again?

 

LTM 11.5 Exchange 2010

 

Thanks, Markus

 

12 Replies

  • Dayne_Miller_19's avatar
    Dayne_Miller_19
    Historic F5 Account

    Hi Markus-

     

    BIG-IP will replace the original source IP of incoming connections with one of its own when you have Source Address Translation (otherwise know as SNAT) enabled on the virtual server.

     

    Since your BIG-IP system is replacing the address with its own self IP address, it's likely that you have this value set to 'Auto Map'. Setting it to 'None' should change the behavior to preserve the original source IP address.

     

    However, you must make sure that your Hub Transport servers have a route back to the source network(s) through the BIG-IP--in other words, using the self IP address that's on the same local subnet as the Hub Servers as the gateway. SNAT removes the need for this route, but if you disable SNAT, you'll need to have it in place.

     

  • I think the simple answer is what Nick brought up. It sounds like you have SNAT Automap enabled on the Virtual Server. This is often used as a quick fix for any routing issues. It makes it so your back end servers see the source IP of traffic flowing through the BIGIP as one of the F5's IP addresses. It would appear that in this scenario you want the servers to see the true client IP address. This will require disabling SNAT on the virtual server AND ensuring there are appropriate routes on your SMTP servers to route traffic back through the F5. Before tinkering with this one setting I would recommend reading over the Exchange 2010 deployment guide and ensuring you are following recommended practices with your Exchange deployment:

     

    http://www.f5.com/pdf/deployment-guides/microsoft-exchange-2010-2013-iapp-dg.pdf

     

  • A quick fix is to add the self IP that the BIG-IP is sourcing traffic from as a connector. We had to do this when using LTM in an SNAT auto map configuration load balancing across multiple hub transport servers.

     

  • Dayne_Miller_19's avatar
    Dayne_Miller_19
    Historic F5 Account

    You could take Cory's suggestion one step further and, rather than using SNAT Auto Map, have an iRule pick a SNAT address to use depending on the original source. That would allow you to still have multiple receive connectors based on origin, with a different SNAT address for each origin subnet (or however you do the segregation). If you want an example of such an iRule, let me know and I'll post something.

     

    • Russ_Ortmann_16's avatar
      Russ_Ortmann_16
      Icon for Nimbostratus rankNimbostratus
      Dayne, I have this exact same situation. I'm currently looking into how to configure the iRule, but an example would be great if you could post one. We have 3 separate connectors that we are filtering to based on source IP address. Thanks in advance.
    • Dayne_Miller_19's avatar
      Dayne_Miller_19
      Historic F5 Account
      As luck would have it, there's a pretty good example here: https://devcentral.f5.com/s/feed/0D51T00006i7WdGSAU (bottom of the thread). The SERVER_CONNECTED portion would be optional in your case; it's just for logging. If you're matching against networks rather than specific IP addresses, the 'Selective SNAT' iRule example at https://clouddocs.f5.com/api/irules/selectivesnat.html shows how to use a data group to set up one or more network definitions to match against. Keep in mind that SNATing done from an iRule will override whatever the SNAT behavior that's set on the virtual server. Let us know how those work for you!
  • Thanks all for your response, it has been almost 4 years since I last worked with an F5. currently "Source Address Translation" is set to "Auto Map" and other choices are "None" and "SNAT". So should I choose "none"?

     

    Thanks again.

     

    • Cory_50405's avatar
      Cory_50405
      Icon for Noctilucent rankNoctilucent
      If you don't use SNAT, the hub transport servers will have to have a route back to the clients through the BIG-IP, which is probably not the case. SNAT auto map should work as long as you build the connector in Exchange with the SNAT address of the BIG-IP.
  • Ok, I set the default gateway for my hub transports to the F5 vlan self ip. inbound worked great but the outbound to internet or outside lan did not work. I could not even browse the web. Is this where I need to add a Rout Domain?

     

    Thanks all for you support. You all Rock!!

     

    • Cory_50405's avatar
      Cory_50405
      Icon for Noctilucent rankNoctilucent
      Setting a default gateway to your BIG-IP will only work if you setup a forwarding virtual server. BIG-IP won't send the traffic anywhere unless there's a virtual server setup to do something with it. http://support.f5.com/kb/en-us/solutions/public/7000/500/sol7595.html
  • You need a wildcard network forwarding virtual server.

     

    A virtual server that is of type perfl4 defined as 0.0.0.0 enabled on your servers VLAN.

     

    Create a custom fastl4 profile with loose init and loose close enabled. Please keep in mind that this will change your BIGIP's behavior from being a default deny device to routing traffic on any VLAN in which this virtual server is enabled. You will need to have routes in place to get traffic back to your SMTP servers from upstream or enable SNAT.