Forum Discussion

kraigk_52257's avatar
kraigk_52257
Icon for Nimbostratus rankNimbostratus
Mar 01, 2009

iRule for Exchange 2007 OWA, ASync & Outlook Anywhere

I am pasting this out of the F5 deployment guide for Exchange 2007 found here: http://www.f5.com/pdf/deployment-guides/f5-exchange07-dg.pdf. This iRule allows you to run one virtual with three pools and one iRule to handle the three unique traffics. Problem is when I change the pool names with mine and paste it in I can't get it to work. Anyone else got this going? Help anyone.. what am I missing.

 

 

 

when HTTP_REQUEST {

 

if { [HTTP::header "User-Agent"] contains "MSRPC" } {

 

persist uie [HTTP::header "Authorization"] 3600

 

pool exch_oa_pool

 

} elseif { [HTTP::uri] contains "Microsoft-Server-ActiveSync"

 

}

 

persist cookie

 

pool exch_activesync_pool

 

} else {

 

persist cookie

 

pool exch_owa_pool

 

HTTP::class select exch07-class

 

}

 

}

6 Replies

  • Hi,

     

     

    What are you testing and what has failed? Does the iRule save, or do you get syntax errors when trying to save it? Have you created an HTTP class named exch07-class and added it to the virtual server you're using the iRule on? If you test with a browser plugin like HttpFox for Firefox or Fiddler for IE, do you see any errors in the requests or responses? Do you see any errors logged to /var/log/ltm?

     

     

    Aaron
  • I was getting syntax error and thanks for the reply. I worked through this and duh, I realized I was trying to use a class that would only exist if I had the webaccelerator module. Here is what I have come up with:

     

     

    when HTTP_REQUEST {

     

    if { [HTTP::header "User-Agent"] contains "MSRPC" }{

     

    persist uie [HTTP::header "Authorization"] 3600

     

    pool EX-CAS_OA-pool

     

    } elseif { [HTTP::uri] contains "Microsoft-Server-ActiveSync" }{

     

    persist cookie

     

    pool EX-CAS_ASYNC-pool

     

    } else {

     

    persist cookie

     

    pool EX-CAS_HTTP-pool

     

    }

     

    }

     

     

    This seems to work although I'm not sure how to test effectively. The goal here was to identify and handle traffic that all comes in SSL on the same VIP and goes to different pools.

     

  • Posted By kraigk on 03/04/2009 5:05 PM

     

    I was getting syntax error and thanks for the reply. I worked through this and duh, I realized I was trying to use a class that would only exist if I had the webaccelerator module. Here is what I have come up with:

     

    when HTTP_REQUEST {

     

    if { [HTTP::header "User-Agent"] contains "MSRPC" }{

     

    persist uie [HTTP::header "Authorization"] 3600

     

    pool EX-CAS_OA-pool

     

    } elseif { [HTTP::uri] contains "Microsoft-Server-ActiveSync" }{ <----Missing Curly bracket

     

    persist cookie

     

    pool EX-CAS_ASYNC-pool

     

    } else {

     

    persist cookie

     

    pool EX-CAS_HTTP-pool

     

    }

     

    }

     

    This seems to work although I'm not sure how to test effectively. The goal here was to identify and handle traffic that all comes in SSL on the same VIP and goes to different pools.

     

     

     

    The class was one of the errors, but the main one was the missing curly bracket that I highlighted. Yeah felt really stupid that I missed that. Supposedly they are working to correct that in the deployment guide, as I made a point of citing this error in their doc to our regional F5 team.

     

    I am about to begin testing that I rule with an adde elseif to parse for Citrix, as all of that is on one virtual server.

     

    CarlB
  • Carl,

     

     

    Thanks for the info. If you get the Citirix elseif working post it. I'd like to see that.

     

     

    kraigk
  • mlick2's avatar
    mlick2
    Icon for Nimbostratus rankNimbostratus
    I am trying to get this working using a single VIP all going to the same pool for OWA, ActiveSync, and Anywhere, but the documentation does seem to be very unhelpful. It says to apply the append iRule for owa first, but anytime that iRule is active, ActiveSync does not work. I have tried adding the append iRule to the bottom of the sorting rule, but again that stops everything from working. Any thoughts or suggestions is very much appreciated. Thank You.

     

     

    when HTTP_REQUEST {

     

    if { [HTTP::header "User-Agent"] contains "MSRPC" }{

     

    persist uie [HTTP::header "Authorization"] 3600

     

    pool Exch-OWA_pool

     

    } elseif { [HTTP::uri] contains "Microsoft-Server-ActiveSync" }{

     

    persist cookie

     

    pool Exch-OWA_pool

     

    } else { if { not ([HTTP::uri] starts_with "/owa") } {

     

    [HTTP::uri] /owa[HTTP::uri] }

     

    persist cookie

     

    pool Exch-OWA_pool

     

    }

     

    }
  • Try this. I used my pool names and got it to load. Whether or not it works is another issues..

     

    when HTTP_REQUEST {

     

    if { [HTTP::header "User-Agent"] contains "MSRPC" }{

     

    persist uie [HTTP::header "Authorization"] 3600

     

    pool Exch-OWA_pool

     

    } elseif { [HTTP::uri] contains "Microsoft-Server-ActiveSync" }{

     

    persist cookie

     

    pool Exch-OWA_pool

     

    } elseif { not ([HTTP::uri] starts_with "/owa") } {

     

    [HTTP::uri] /owa[HTTP::uri] }

     

    persist cookie

     

    pool Exch-OWA_pool

     

    }

     

    }