Splunk Search

cidr match is not properly working

syazwani
Path Finder

Hi,

Why my CIDR matching in not following the lookup content?

Query i used is as below:

| makeresults
| eval ip="10.10.10.10"
| lookup testip ip OUTPUTNEW description

Result should look like this:

ipDescription
10.10.10.10New

 

But the real output look like this:

ipDescription
10.10.10.10New
In Progress
Closed

 

I have check my lookup and its clearly state the Description for IP Range 10.10.10.10/27 is "New".

Please help and thanks!

 

Labels (1)
Tags (1)
0 Karma

yuanliu
SplunkTrust
SplunkTrust
  1. Is your lookup's ip field using CIDR notation?
  2. Did you set up CIDR(ip) in lookup definition?
  3. Is there any overlapping CIDR's (ip) that 10.10.10.10 can match in your lookup?

About 3, for example, if your lookup is like this:

ipDescription
10.10.10.10/27New
10.10.10.0/24In Progress
10.10.8.0/16Closed

10.10.10.10 will match all three.

0 Karma

jotne
Builder

Post the output of:

| inputlookup testip

If its to long post part with IP 10.10.10.x

0 Karma
Get Updates on the Splunk Community!

Index This | I’m short for "configuration file.” What am I?

May 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with a Special ...

New Articles from Academic Learning Partners, Help Expand Lantern’s Use Case Library, ...

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

Your Guide to SPL2 at .conf24!

So, you’re headed to .conf24? You’re in for a good time. Las Vegas weather is just *chef’s kiss* beautiful in ...