# ElasticSearch does not allow IPv6-mapped IPv4 address in field of type ip\_range

**URL:** <https://discuss.elastic.co/t/elasticsearch-does-not-allow-ipv6-mapped-ipv4-address-in-field-of-type-ip-range/290656>\
**Category:** Elasticsearch\
**Created:** [December 1, 2021, 11:17am UTC](https://discuss.elastic.co/t/elasticsearch-does-not-allow-ipv6-mapped-ipv4-address-in-field-of-type-ip-range/290656 "2021-12-01T11:17:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![swapnil\_vaidya](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/swapnil_vaidya/32/53284_2.png) [@swapnil\_vaidya](https://discuss.elastic.co/u/swapnil_vaidya)\
**Post date:** [December 1, 2021, 11:17am UTC](https://discuss.elastic.co/t/elasticsearch-does-not-allow-ipv6-mapped-ipv4-address-in-field-of-type-ip-range/290656/1 "2021-12-01T11:17:08Z")

</div>

Hi All,  
I am trying to index the document with field having value as IPV6 mapped IPV4 address in the field with type as ip\_range.  
However ES throws following error:  
CIDR notation is not allowed with IPv6-mapped IPv4 address [::ffff:10.170.0.0/112 as it introduces ambiguity as to whether the prefix length should be interpreted as a v4 prefix length or a v6 prefix length.  
Could anybody please help with workaround to store this kind of address in field of type ip\_range?

---

<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:** [December 29, 2021, 11:17am UTC](https://discuss.elastic.co/t/elasticsearch-does-not-allow-ipv6-mapped-ipv4-address-in-field-of-type-ip-range/290656/2 "2021-12-29T11:17:26Z")

</div>

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