Forum Discussion

Rodolphe_AUBINE's avatar
Rodolphe_AUBINE
Icon for Nimbostratus rankNimbostratus
Oct 25, 2010

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

 

}

 

}

 

}

 

}

 

 

 

  • Hi Rodolphe,

     

     

    This known limitation with the class-related commands is noted in bug ID 337222. Apparently a fix is already planned. In the meantime, there are a few workarounds discussed in this thread:

     

     

    IP-address based classes support routing domains in v10.1?

     

    http://devcentral.f5.com/tabid/1082223/aff/5/afv/topic/aft/1172490/afc/1173828/Default.aspx

     

     

    Aaron