Forum Discussion
hooleylist
Jun 11, 2010Cirrostratus
The IP/subnet should be added to the datagroup and then set the value for that IP and/or subnet of 2A1 or whatever the strPodNumber is. Then you can use the class command to return the corresponding value:
The datagroup will look like this in the bigip.conf:
class private_net {
{
host 1.1.1.1 { "2A1" }
network 2.2.2.0/24 { "2A1" }
host 3.3.3.1 { "2A2" }
network 4.4.4.0/24 { "2A2" }
}
}
And an iRule snippet which references the class:
Look up the server address in the dg_all_pools class and save the corresponding value
set match [class search -value dg_all_pools equals [IP::server_addr]]
if {$match ne ""}{
do something with the match
}
Aaron