A10 AX Series Deployment Manual - page 8
Performance by Design
8
Deployment Guide for Microsoft Terminal Services 2008
◦ Via Web GUI: Confi g Mode > Service > SLB > Virtual Server > Port
◦
Via CLI:
AX(confi g-slb vserver)#port 3389 tcp
AX2(confi g-slb vserver-vport)#service-group TS-Farm
4. Create an aFleX policy, to defi ne the TS persistence rule:
when CLIENT_ACCEPTED {
# Collect client packet only if there is at least 30 bytes
# (If there is no routing token => fi rst packet is 19 bytes)
TCP::collect 30
}
when CLIENT_DATA {
# Find and save the routing token in the variable "msts"
set payload [TCP::payload]
set index [ expr [string fi rst "msts=" $payload] + [string length
"msts="]]
#only if there is a routing token
if {$index ne 4} {
set msts [string range $payload $index end]
# Find and save the rawip@ in the variable "rawip"
set index2 [string fi rst "." $msts]
set rawip [string range $msts 0 [expr $index2 -1]]
# Find and save the raw tcp port in the variable "rawport"
set msts2 [string range $msts [expr $index2 + 1] end]
set index3 [string fi rst "." $msts2]
set rawport [string range $msts2 0 [expr $index3 - 1]]
# Convert and save the real tcp port in the variable "port"
set port [ntohs [format "%d" $rawport]]
# Convert and save the real ip@ in the variable "ipaddr"
set bin [binary format i $rawip]
binary scan $bin cccc a b c d
set a [expr { $a & 0xff }]
set b [expr { $b & 0xff }]
set c [expr { $c & 0xff }]
set d [expr { $d & 0xff }]
set ipaddr "$a.$b.$c.$d"
node $ipaddr $port
# print the node
# log "node= $ipaddr $port"
}
}