Forum Discussion

mnowina_63180's avatar
mnowina_63180
Icon for Nimbostratus rankNimbostratus
Apr 02, 2013

MS RDS Persistence Issues

Hi,

 

We are working on deploying MS remote desktop services and have followed the F5 deployment guide here:

 

https://www.f5.com/pdf/deployment-guides/f5-microsoft-remote-desktop-services-dg.pdf

 

Connectivity is working as expected for Web Access, Gateway and sesssion hosts. The issue we're running into at this point, is that RDP connections either direct to the RD hosts virtual server or sent through the gateway VS are not creating persistence records on the LTM, so clients are unable to properly resume their sessions. We've tried using the following irule which does create records, but TCP collection appears to be grabbing excess data, so records are not created properly:

 

 

when CLIENT_ACCEPTED {

 

TCP::collect

 

}

 

when CLIENT_DATA {

 

 

TCP::collect 25

 

 

binary scan [TCP::payload] x11a* msrdp

 

log local0. "Contents after binary scan: $msrdp"

 

 

if { [string equal -nocase -length 17 $msrdp "cookie: mstshash="] } {

 

 

set msrdp [string range $msrdp 17 end]

 

set len [string first "\n" $msrdp]

 

if { $len == -1 } {

 

TCP::collect

 

return

 

}

 

if { $msrdp contains "@" } {

 

log local0. "Setting data to: [getfield $msrdp "@" 1]"

 

set username [getfield $msrdp "@" 1]

 

} elseif { $msrdp contains "\\" } {

 

log local0. "Setting data to: [getfield $msrdp "\\" 3]"

 

set username [getfield $msrdp "\\" 3]

 

} else {

 

set username $msrdp

 

log local0. "Setting data to: $msrdp"

 

}

 

set finalusername [string tolower $username]

 

set finalusername [string trim $finalusername]

 

log local0. "User Being Persisted is: |$finalusername|"

 

persist uie $finalusername 10800

 

}

 

TCP::release

 

}

 

 

Has anyone else experienced the issue with the built-in msrdp persistence profile not properly creating persistence records, and if so did you come up with a viable alternative? Or has anyone had any success deploying MSRDP persistence using LTM 11.2.1 HF4?

 

 

Thanks!

 

4 Replies

  • mikeshimkus_111's avatar
    mikeshimkus_111
    Historic F5 Account
    Hi mnowina, we did successfully test MS RDP persistence with version 11. Assuming that your session broker is set up correctly, you may want to open an F5 support case since it sounds like this profile is not behaving as expected.

     

    thanks

     

    Mike
  • Thanks Mike! We did a bit more investigating on the RD hosts and found similar log messages to this post:

     

     

    https://devcentral.f5.com/community/group/aft/2165796/asg/62

     

     

    Have you seen anything like this before?
  • mikeshimkus_111's avatar
    mikeshimkus_111
    Historic F5 Account
    You are seeing the message "Remote Desktop Connection Broker Client failed while getting redirection packet from Connection Broker."? Which version of Windows Server are you using for Remote Desktop services?
  • We're using Windows Server 2008 R2 and the hosts have been configured to use token redirection and to not participate in connection broker load balancing. We've opened a support ticket as well, it was just interesting to see other people had a similar experience. When we get this resolved, I'll be sure to post the information here, but we'd also welcome any additional input from anyone else that's successfully deployed RDS.