title: Difference between --link and --alias in overlay docker network?
body: <p>I am reading <a href="https://github.com/docker/docker/blob/bump_v1.10.3/docs/userguide/networking/configure-dns.md" rel="noreferrer">this</a> official Docker 0.10.3 documentation (at this time, it is still in a branch) and it says:</p>
  
  <pre><code>--net-alias=ALIAS
  </code></pre>
  
  <blockquote>
    <p>In addition to --name as described above, a container is discovered by one or more of its configured --net-alias (or --alias in docker network connect command) within the user-defined network. The embedded DNS server maintains the mapping between all of the container aliases and its IP address on a specific user-defined network. A container can have different aliases in different networks by using the --alias option in docker network connect command.</p>
  </blockquote>
  
  <pre><code>--link=CONTAINER_NAME:ALIAS
  </code></pre>
  
  <blockquote>
    <p>Using this option as you run a container gives the embedded DNS an extra entry named ALIAS that points to the IP address of the container identified by CONTAINER_NAME. When using --link the embedded DNS will guarantee that localized lookup result only on that container where the --link is used. This lets processes inside the new container connect to container without without having to know its name or IP.</p>
  </blockquote>
  
  <p>Does network alias from one container actually is a link from the second container in the same network?</p>