The bridge or host network works when 2 containers run on the same host. If two containers runs on different hosts, they will not be able to talk with each other.
For two containers on different hosts to talk with each other, the docker overlay network should be used.
The docker --link is a deprecated feature, as mentioned on docker links doc.