<ul dir="auto">
<li>[-] I have searched the <a href="https://github.com/apache/incubator-dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li>[-] I have checked the <a href="https://github.com/apache/incubator-dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: 2.6.2</li>
<li>Operating System version: centos7.0</li>
<li>Java version: 1.8</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<ol dir="auto">
<li>xxx</li>
<li>xxx</li>
<li>xxx</li>
</ol>
<p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">What do you expected from the above steps？</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">Hello,<br>
There are two network cards in my machine, IP are 10.x.x.x and 172.x.x.x,  zookeeper IP is 172.x.x.x, after services start up, providers path in zookeeper, service ip is 10.x.x.x. and because of all my business servers IP are 172.x.x.x, this service who exported with IP 10.x.x.x could not be invoked by other services.</p>
<p dir="auto">I read the source code of Dubbo, it chooses IP from IP list only if one is a valid IP address.<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/8693336/47011493-ab96d300-d174-11e8-851e-ec1ef341e825.png"><img src="https://user-images.githubusercontent.com/8693336/47011493-ab96d300-d174-11e8-851e-ec1ef341e825.png" alt="image" style="max-width: 100%;"></a><br>
IP_PATTERN in this picture, just a regular expression which matches a valid IP address.</p>
<p dir="auto">Can we choose the IP first in the same IP segment with zookeeper address instead of a random one? That's guaranteed that servers are reachable to each other at default configure.</p>
<ul dir="auto">
<li>[ x ] I have searched the <a href="https://github.com/apache/incubator-dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li>[ x ] I have checked the <a href="https://github.com/apache/incubator-dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: 2.7.0</li>
<li>Operating System version: windows 10</li>
<li>Java version: 1.8</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<ol dir="auto">
<li>当dubbo端口设为-1时, 如何在代码中获取当前dubbo的端口?</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"></code></pre></div>