iRule to change udp destination port

I am trying to write an iRule to make a LB decision based on source IP address and change the destination port if it matches.

e.g. If udp connection from “Network A” use pool “B_101”, otherwise default. Pool “B_101” members are listening on a different udp port than the virtual server.

Virtual Server listens on udp port 100

Default pool members listen on udp port 100

pool “B_101” members listen on udp port 101

iRule

when CLIENT_ACCEPTED {

if {[ class match [IP::remote_addr] equals “Network A”]} {

log local0. “Source Subnet Matches Network A - [IP::client_addr]”

pool B_101

}

else { }

}

Data is reaching the pool members of pool “B_101” but the destination port is unchanged. Any help is appreciated.

Data is reaching the pool members of pool “B_101” but the destination port is unchanged.is “port translation” setting under virtual server configuration enabled?

alternatively, you may enable translate port in irule.

translate wiki