# Invalid IP network, skipping {:network=\>"10.13.7.0/10.13.7.24"

**URL:** <https://discuss.elastic.co/t/invalid-ip-network-skipping-network-10-13-7-0-10-13-7-24/211252>\
**Category:** Logstash\
**Created:** [December 10, 2019, 9:07am UTC](https://discuss.elastic.co/t/invalid-ip-network-skipping-network-10-13-7-0-10-13-7-24/211252 "2019-12-10T09:07:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vishnu\_mk](https://avatars.discourse-cdn.com/v4/letter/v/71c47a/32.png) [@Vishnu\_mk](https://discuss.elastic.co/u/Vishnu_mk)\
**Post date:** [December 10, 2019, 9:07am UTC](https://discuss.elastic.co/t/invalid-ip-network-skipping-network-10-13-7-0-10-13-7-24/211252/1 "2019-12-10T09:07:24Z")

</div>

```
input {
  file {
    path => "/home/a/Documents/iplist.txt"
    start_position => "beginning"
    sincedb_path => "/dev/null"
  }
}
filter {
        grok {
        match => { "message" => "%{IP:src_ip}" }
      }
        cidr {
        add_tag => ["testnet"]
        address => ["%{src_ip}"]
        #separator => "-"
        network_path => "/home/a/Documents/ip.txt"
       # separator => "//"

      }
}
output {
    stdout { codec => rubydebug }
 }

```

above is my logstash configuration:

below is my ip.txt file  
10.12.7.0-10.12.7.24  
10.13.7.0-10.13.7.24

```
[2019-12-10T14:20:32,135][WARN][logstash.filters.cidr] Invalid IP network, skipping {:network=>"10.12.7.0/10.12.7.24", :event=>#<LogStash::Event:0x21adc04>}
[2019-12-10T14:20:32,137][WARN][logstash.filters.cidr] Invalid IP network, skipping {:network=>"10.13.7.0/10.13.7.24", :event=>#<LogStash::Event:0x21adc04>}
[2019-12-10T14:20:32,139][WARN][logstash.filters.cidr] Invalid IP network, skipping {:network=>"10.12.7.0/10.12.7.24", :event=>#<LogStash::Event:0x50d8fdeb>}
[2019-12-10T14:20:32,140][WARN][logstash.filters.cidr] Invalid IP network, skipping {:network=>"10.13.7.0/10.13.7.24", :event=>#<LogStash::Event:0x50d8fdeb>}
[2019-12-10T14:20:32,141][WARN][logstash.filters.cidr] Invalid IP network, skipping {:network=>"10.12.7.0/10.12.7.24", :event=>#<LogStash::Event:0x4119464f>}
[2019-12-10T14:20:32,142][WARN][logstash.filters.cidr] Invalid IP network, skipping {:network=>"10.13.7.0/10.13.7.24", :event=>#<LogStash::Event:0x4119464f>}
[2019-12-10T14:20:32,143][WARN][logstash.filters.cidr] Invalid IP network, skipping {:network=>"10.12.7.0/10.12.7.24", :event=>#<LogStash::Event:0x5dbd29a8>}
[2019-12-10T14:20:32,144][WARN][logstash.filters.cidr] Invalid IP network, skipping {:network=>"10.13.7.0/10.13.7.24", :event=>#<LogStash::Event:0x5dbd29

```

My error.

what I want is it should add tag if my Ip is in the specified range if ip.txt file

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [December 10, 2019, 3:06pm UTC](https://discuss.elastic.co/t/invalid-ip-network-skipping-network-10-13-7-0-10-13-7-24/211252/2 "2019-12-10T15:06:58Z")

</div>

> [@Vishnu\_mk](#):
>
> 10.12.7.0-10.12.7.24

That's not the right notation for CIDR. You need two CIDR patterns, 10.12.7.0/28 (which includes 0 to 15) and 10.12.7.16/29 (which includes 16 to 23). Together they include 24 addresses. If you really want .24 as the 25th address then you need a third -- 10.12.7.24/32.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 7, 2020, 3:07pm UTC](https://discuss.elastic.co/t/invalid-ip-network-skipping-network-10-13-7-0-10-13-7-24/211252/3 "2020-01-07T15:07:00Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
