Address Data Group

Complete irule novice here! I have been looking at creating an address data group but cannot put it all together.

I am trying to look at the source network going to a VIP and direct it to a pool member within the same subnet. For example:

If source = 10.1.2.0/24 then choose the pool member within the same subnet from the following list:

10.1.1.12/24 10.1.2.12/24 (this is the one I want chosen) 10.1.3.12/24

The point is to create one DNS entry for a large list of clients that will go to a large list of host on dissimilar subnets. Can anyone give me a direction? The source subnet and the destination address will always be on the same subnet.

Thanks!

Try this, not sure though

when HTTP_REQUEST {
  scan [IP::client_addr] %d.%d.%d.%d a b c 0
  log local0. "$a.$b.$c.12"
  node "$a.$b.$c.12"
}

is IP::addr also useful?

IP::addr wiki