John_Meggers
Apr 10, 2014Nimbostratus
IP::addr with Different Masks
I'm still new to iRules. This is similar to an iRule I found online:
when HTTP_REQUEST { switch [IP::addr [IP::client_addr] mask 255.255.255.0] { "10.10.4.0" - "192.168.4.0" { pool pool_http_server_1 } default { pool default_pool } } }
I need to modify it for the networks I'm working on, but they’re not all /24s. I don't know whether there's a way to match a specific IP with a specific mask, or whether there's a different approach I should use. I was thinking of something along the lines of:
when HTTP_REQUEST { switch [IP::addr [IP::client_addr] ] { "10.0.0.0 mask 255.0.0.0" - "192.168.0.0 mask 255.255.0.0" {
Can anyone help steer me to what will work? Thanks.