Forum Discussion
Rodolphe_AUBINE
Oct 25, 2010Nimbostratus
Pb with Ip matchclass adress datagroup in partition
Hi, I have on Virtual Server which uses by default a POOL-A.
I need to forward to another POOL-B if :
-> RemoteIp is known in a adress datagroup, ie. datagroup_ips
-> Path contains a pattern, ie. test
The problem is that the RemoteIp (known in the datagroup_ips) is not detected during CLIENT_ACCEPTED event with matchclass tool.
The RemoteIp logged is SrcIp=(192.168.84.26%2), with partition subinfo and the adress datagroup seems to be good :
Extract from bigip.conf (set by GUI):
class datagroup_ips { host 192.168.84.26%2 }
I think I have a problem with partition subinfo matchclass comparaison beacause when I replace the adress datagroup by a string datagroup with the string "192.168.84.26%2", it works well !
Question : How to use adress datagroup ? for moment i don't have subnet or mask to use but I think it could early be necessary.
Thanks in advance,
Rodolphe (fr)
when CLIENT_ACCEPTED {
log "SrcIp=([IP::client_addr])"
Check if the client IP is in the datagroup_ips datagroup
if { [matchclass [IP::client_addr] equals $::datagroup_ips ] } {
Select poolA and track that we've selected a pool
log "SrcIp=([IP::client_addr]) forwarded to pool POOL-B" pool POOL-B set pool_selected 1
} else {
Continue checking the URI to select a pool
log "SrcIp=([IP::client_addr]) (default) forwarded to pool POOL-A" set pool_selected 0 }
}
when HTTP_REQUEST {
log "Path=([HTTP::path])"
Check if the pool has already been selected
if {$pool_selected}{
Exit this event in this rule return
} else {
Check the requested path
switch -glob [HTTP::path] {
"*test*" {
log "Path=([HTTP::path]) forwarded to pool POOL-B" pool POOL-B
}
default {
log "Path=([HTTP::path]) (default) forwarded to pool POOL-A" pool POOL-A
}
}
}
}
- Rodolphe_AUBINENimbostratusAny ideas ?
- hooleylistCirrostratusHi Rodolphe,
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects