Getting Data In

CIDR search on host field

afaraino
Explorer

Hello Everyone,

I'm facing a strange behavior here :

  • searching host=10.1.2.* returns 511,000+ results
  • searching host=10.1.2.0/24 returns 807 results

Am I missing something?

I'm using Splunk 4.2.4.

Regards,

Alexandre Faraino

Tags (2)
0 Karma

tmeader
Contributor

Is there any update on whether or not this is going to be fixed? I'm running into the same issue as the original author right now.

0 Karma

SarahWKarvenz
Path Finder

Are the ones returning for the subset of records from a specific data input or set of inputs? I am finding that the CIDR search host=127.0.0.1/24 will work if Splunk is setting the host as the IP which it does for data inputs of type TCP or UDP. If I use a file or directory input type and then set the host field value to an IP address, those data inputs aren't picked up in the CIDR search host=127.0.0.1/24 but will be found in the search host=127.0.0.*

One way around it is to use the cidrmatch function as it will pick up records from both types of data inputs:
* | where cidrmatch("127.0.0.1/24", host), but so will the 127.0.0.*

afaraino
Explorer

Actually, it's 100% UDP. So the host field should be an IP. The cidrmatch() function is working, but it's not user-friendly.

I tried something else :

  • host=10.1.2.* host=10.1.2.0/24
    --> returns nothing

  • host=10.1.2.* | search host=10.1.2.0/24
    --> returns 48k+ matches

Bug spotted ? I'll open a case.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...