Hi all,
Glad to be back on the F5 forums. Hope you’re all doing well today! I have been working to implement Exchange behind our v9.4.8 LTMs (our 11.3 appliances are built and almost ready for migration) in the Test environment.
Anyway, I’ve moved our ActiveSync traffic to another virtual server, and left our other Exchange web services on a separate shared VIP. That said our Mobile Iron Sentry appliances point to the ActiveSync VS. I should also note that we have two separate ActiveSync traffic flows coming in - one for Exchange 2007 and one for Exchange 2010.
So I need the LTMs to do a few things, which I’ve attempted to implement in this iRule:
Current “non-working” iRule:
================================================================
when HTTP_REQUEST {
Offline Address Book and Autodiscover do not require persistence.
switch -glob -- [string tolower [HTTP::path]] {
“/microsoft-server-activesync” {
ActiveSync.
if { [HTTP::header exists “APM_session”] } {
persist uie [HTTP::header “APM_session”] 7200
} elseif
if { [HTTP::host] contains “*deveas07.lifetech.com” } {
if { [HTTP::header exists “Authorization”] } {
persist uie [HTTP::header “Authorization”] 7200
} else {
persist source_addr }
pool dev.mail.lifetech.com_eas
} elseif { [HTTP::header exists “Authorization”] } {
persist uie [HTTP::header “Authorization”] 7200
} else {
persist source_addr }
pool devmail10.lifetech.com_eas
COMPRESS::disable
If you selected LAN when asked from where clients are primarily
connecting, you MUST remove or comment out the CACHE::disable line
CACHE::disable
}
}
}
when HTTP_RESPONSE {
if { [string tolower [HTTP::header values “WWW-Authenticate”]] contains “negotiate”} {
ONECONNECT::reuse disable
ONECONNECT::detach disable
this command disables NTLM conn pool for connections where OneConnect has been disabled
NTLM::disable
}
this command rechunks encoded responses
if {[HTTP::header exists “Transfer-Encoding”]} {
HTTP::payload rechunk
}
}
================================================================
As you can see, I’m trying to do the following:
1. Look for HTTP requests that have Microsoft-Server-ActiveSync in the path, then continue processing.
2a). Look at the HTTP host field value and if it matches “deveas07”, execute the If-Else conditional loop to set the appropriate persistence record and forward the request to the Exchange 2007 pool.
2b). If the HTTP host field value does not match “deveas07”, execute the If-Else conditional loop to set the appropriate persistence record and forward the request to the Exchange 2010 pool.
3). Look for the Transfer-Encoding header in the server response traffic and implement paylod rechunk where appropriate.
I am not able to get the iRule above working, as my mobile device cannot connect to send/receive email with that iRule in place.
I should also note that I was able to get a stripped-down version of this rule working with only one pool (no host header match), meaning the EAS traffic through the LTM was being load-balanced to the Exchange 2007 servers and mail could be sent/received from my mobile device.
Working “simplified” iRule:
================================================================
when HTTP_REQUEST {
Offline Address Book and Autodiscover do not require persistence.
switch -glob -- [string tolower [HTTP::path]] {
“/microsoft-server-activesync” {
ActiveSync.
if { [HTTP::header exists “APM_session”] } {
persist uie [HTTP::header “APM_session”] 7200
} elseif
if { [HTTP::header exists “Authorization”] } {
persist uie [HTTP::header “Authorization”] 7200
} else {
persist source_addr
}
pool dev.mail.lifetech.com_eas
COMPRESS::disable
If you selected LAN when asked from where clients are primarily
connecting, you MUST remove or comment out the CACHE::disable line
CACHE::disable
}
}
}
when HTTP_RESPONSE {
if { [string tolower [HTTP::header values “WWW-Authenticate”]] contains “negotiate”} {
ONECONNECT::reuse disable
ONECONNECT::detach disable
this command disables NTLM conn pool for connections where OneConnect has been disabled
NTLM::disable
}
this command rechunks encoded responses
if {[HTTP::header exists “Transfer-Encoding”]} {
HTTP::payload rechunk
}
}
================================================================
Any help or suggestions you guys may have is much appreciated!
Thanks,
B