Splunk Search

How do you CIDR Match a subnet in a list of subnets?

theouhuios
Motivator

So IP to a subnet CIDR match has always worked in Splunk. No issues there. BUT a request came where we need to do a subnet to subnet CIDR match, and other than hacking my way out of it, I don’t think the cidrmatch function honors that.

Example..

IPCidr = 10.1.1.0/24

Subnetlookup.csv

10.1.0.0/16
10.2.1.0/24
10.2.0.0/16

Cidrmatch doesn’t work when I try to check IpCidr in Subnetlookup,csv.. The moment I change it to 10.1.1.1, it works.

Any ideas.. is there any other function that does that?

Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...

Index This | How many sevens are there between 1 and 100?

August 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this ...