define a pool for your two gateways, say gw-pool, then create a 0.0.0.0/0 virtual server applied to your internal vlans only and apply this rule to the vip:
when CLIENT_ACCEPTED {
if { [IP::addr [IP::client_addr]/24 equals 10.223.34.0] } {
pool gw-pool member 10.223.32.1
} elseif { [IP::addr [IP::client_addr]/24 equals 10.236.36.0] } {
pool gw-pool member 10.223.36.1
} else {
Your other conditions, if necessary
}
}
You could use the node command instead of the pool, but then you don't get the benefit of your gateway being monitored (assuming you apply one in your pool definition)