# Configuring network.host and network.publish\_host in dual stack environment

**URL:** <https://discuss.elastic.co/t/configuring-network-host-and-network-publish-host-in-dual-stack-environment/273342>\
**Category:** Elasticsearch\
**Created:** [May 18, 2021, 7:33pm UTC](https://discuss.elastic.co/t/configuring-network-host-and-network-publish-host-in-dual-stack-environment/273342 "2021-05-18T19:33:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mahudees](https://avatars.discourse-cdn.com/v4/letter/m/e95f7d/32.png) [@mahudees](https://discuss.elastic.co/u/mahudees)\
**Post date:** [May 18, 2021, 7:33pm UTC](https://discuss.elastic.co/t/configuring-network-host-and-network-publish-host-in-dual-stack-environment/273342/1 "2021-05-18T19:33:11Z")

</div>

Need to create a elasticsearch cluster where the environment is dual stack.

From the document came to know that we can configure `network.host: 0.0.0.0` to make it bind on all the available interfaces, in this case it can listen on both IPV4 and IPV6 interface.

Is there a possibility that we can configure `network.publish_host` to include both IPv4 and IPV6. So that other nodes can reach by using any of the IPV4/V6 address if there is any issue in reaching via either of them.

What is the best way to configure ES cluster in dual stack environment.

Thanks,  
Mahudees

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [May 18, 2021, 8:59pm UTC](https://discuss.elastic.co/t/configuring-network-host-and-network-publish-host-in-dual-stack-environment/273342/2 "2021-05-18T20:59:07Z")

</div>

No. From [the docs](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html#advanced-network-settings) (emphasis mine):

> You can specify a list of addresses for `network.host` and `network.publish_host` . You can also specify a single hostname which resolves to multiple addresses. If you do this then **Elasticsearch chooses one of the addresses for its publish address**. This choice uses heuristics based on IPv4/IPv6 stack preference and reachability and may change when the node restarts. **You must make sure that each node is accessible at all possible publish addresses**.

If a node is unreachable at its publish address then it will leave the cluster. This might happen occasionally, but as long as the cluster is [designed for resilience](https://www.elastic.co/guide/en/elasticsearch/reference/current/high-availability-cluster-design.html) then service will not be interrupted.

---

<div class="post-metadata">

**Author:** ![mahudees](https://avatars.discourse-cdn.com/v4/letter/m/e95f7d/32.png) [@mahudees](https://discuss.elastic.co/u/mahudees)\
**Post date:** [May 19, 2021, 5:08pm UTC](https://discuss.elastic.co/t/configuring-network-host-and-network-publish-host-in-dual-stack-environment/273342/3 "2021-05-19T17:08:08Z")

</div>

Thanks @DavidTurner, for the clarification.

---

<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:** [June 16, 2021, 5:08pm UTC](https://discuss.elastic.co/t/configuring-network-host-and-network-publish-host-in-dual-stack-environment/273342/4 "2021-06-16T17:08:18Z")

</div>

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