Document adding a route on non-Weave hosts

This commit is contained in:
Bryan Boreham committed 2016-05-06 11:13:15 +01:00
1 parent 4fc232be61
commit e16a4aa97a
2 files changed
+19 -2

No files matched your search

+2 -2
View File
@@ -31,9 +31,9 @@ Yes you can.
For example, you have a Weave network that runs on hosts A, B, C. and you have an additional host, that we'll call P, where neither Weave nor Docker are running. However, you need to connect from a process running on host P to a specific container running on host B on the Weave network. Since the Weave network is completely separate from any network that P is connected to, you cannot connect the container using the container's IP address.
The simplest way to accomplish this would be to run Weave on the host and then run, `weave expose` to expose the network to any running containers. See [Integrating a Network Host](/site/using-weave/host-network-integration.md) If this is not possible, you could also expose a port on the container on host B and then connect to it.
A simple way to accomplish this would be to run Weave on the host and then run, `weave expose` to expose the network to any running containers. Or you set up a route from P to one of A, B or C. See [Integrating a Network Host](/site/using-weave/host-network-integration.md).
You can read about exposing ports in [Exporting Services](/site/using-weave/service-management.md#exporting).
Yet another option is to expose a port from the container on host B and then connect to it. You can read about exposing ports in [Exporting Services](/site/using-weave/service-management.md#exporting).
**Q: Why am I seeing the same IP address assigned to two different containers on different hosts?**
@@ -38,8 +38,25 @@ Exposed addresses can also be added to weaveDNS by supplying fully qualified dom
host2$ weave expose -h exposed.weave.local
10.2.1.132
###<a name="routing"></a>Routing from Another Host
After running `weave expose`, you can use Linux routing to provide
access to the Weave network from hosts that are not running Weave Net:
ip route add <network-cidr> via <exposing-host>
Where,
* `<network-cidr>` is an IP address range in use on Weave Net,
for example, `10.2.0.0/16` or `10.32.0.0/12` and,
* `<exposing-host>` is the address of the machine on which you ran `weave expose`.
>**Note:** You must ensure that the [IP subnet used by Weave
Net](/site/ipam.md#range) does not clash with anything on those other
hosts.
**See Also**
* [Using Weave Net](/site/using-weave.md)
* [General information on IP Addresses, Routes and Networks](/site/how-it-works/ip-addresses.md)
* [Managing Services - Exporting, Importing, Binding and Routing](/site/using-weave/service-management.md)