# IPv4 and IPv6

**URL:** <https://discuss.elastic.co/t/ipv4-and-ipv6/57795>\
**Category:** Logstash\
**Created:** [August 11, 2016, 10:34am UTC](https://discuss.elastic.co/t/ipv4-and-ipv6/57795 "2016-08-11T10:34:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kevin\_Csuka](https://avatars.discourse-cdn.com/v4/letter/k/7feea3/32.png) [@Kevin\_Csuka](https://discuss.elastic.co/u/Kevin_Csuka)\
**Post date:** [August 11, 2016, 10:34am UTC](https://discuss.elastic.co/t/ipv4-and-ipv6/57795/1 "2016-08-11T10:34:35Z")

</div>

Hi,

Scenario:  
The input i'm receiving in Logstash is sometimes IPv4 and sometimes IPv6, on the same column.  
It differs sometimes from time to time.

Right now, I have an IPv4 GROK pattern.  
Problem:  
When an IPv6 address passes by, I get this error:

```auto

```

How can I make the GROK pattern valid for IPv4 and IPv6?

---

<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:** [July 6, 2017, 4:43am UTC](https://discuss.elastic.co/t/ipv4-and-ipv6/57795/2 "2017-07-06T04:43:52Z")

</div>


