Splunk Search

Group IP addresses in CIDR format

trangadmin
New Member

Hi guys,

I am building a search where I want to report on location based on source IP address. For example within our internal network the subnet 10.0.0.0/24 corresponds to Brewton, whereas 10.1.133.0/23 also corresponds to Brewton. (I have about 23 subnets for this one location)

I have tried using this:

my search | eval subnet=case(cidrmatch("10.0.0.0/24",src)

However, it is not working at all. It will be great if you guys can give me some suggestions.

Thank you!

Tags (1)
0 Karma

sdaniels
Splunk Employee
Splunk Employee

Ayn
Legend

What would be the desired result and what's the current result? Your eval statement is incomplete, so it's hard to tell from that.

0 Karma
Get Updates on the Splunk Community!

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...