Location by Subnet

Anyone know the most efficient way of using relevance to create region property based on a network range similar to -


(so 1st octet 30, 2nd octet would be 0-255, 3rd octet is range between 123 and 199, then 4th octet is 0-255)


Have you found the “Location Property Wizard”? That’s how I’m doing it.

1 Like

Yes but how do you split like the range in my example ?

Oh, I see the issue there. These don’t fall into a single range.

Configure the Location Property Wizard to take the input by range (not by subnet). Then you’re going to have 254 separate ranges. You can repeat the result on each range. MyRange MyRange MyRange MyRange

I keep my data in a separate text file so I can copy/paste it into the Location Property Wizard. You could use a script to generate the text file and import it in. Not sure whether there’s a limit to the number of ranges in the Location Property Wizard or the resulting action it will generate; my input file only has 124 lines now.

You could always use a custom action instead of the wizard with your own relevance. I think you just have a very odd case of multiple ranges here.

Are all locations following this same patterns, just different ranges in the 3rd octet? E.g.

30.X.123-199.X = Location1
30.X.200-255.X = Location2
30.X.75-122.X = Location3

Then you could probably copy and simplify the range logic to just look at the 3rd octect.

@steve I have a working regex for the IP pattern but Fixlet Debugger is throwing an error - The expression could not be evaluated: Regex Error - No preceding re for repetition op.

Where/how would I insert it here -

((if (exists ((addresses whose (it as string != “”) of ip interfaces whose (loopback of it = false) of network) as string as version) whose (it as version matches regex as version)) then “my network” else “”))