2.8 KiB
title, layout
| title | layout |
|---|---|
| Using Fast Datapath | default |
The most important thing to know about fast datapath is that you don't need to configure anything before using this feature. If you are using Weave Net 1.2 or greater, fast datapath (fastdp) is automatically enabled.
When Weave Net can't use the fast data path between two hosts, it falls back to the slower packet forwarding approach. Selecting the fastest forwarding approach is automatic, and is determined on a connection-by-connection basis. For example, a Weave network spanning two data centers might use fast data path within the data centers, but not for the more constrained network link between them.
See How Fastdp Works for a more indepth discussion of this feature.
###Disabling Fast Datapath
You can disable fastdp by enabling the WEAVE_NO_FASTDP environment variable at weave launch:
$ WEAVE_NO_FASTDP=true weave launch
###Fast Datapath and Encryption
Encryption does not work with fast datapath. If you enable encryption using the --password option to launch weave (or you use the WEAVE_PASSWORD environment variable), fast data path will by default be disabled.
When encryption is not in use there may be other conditions in which the fastdp will revert back to sleeve mode. Once these conditions pass, weave will revert back to using fastdp. To view which mode Weave is using, run weave status connections.
###Viewing Connection Mode Fastdp or Sleeve
Weave automatically uses the fastest datapath for every connection unless it encounters a situation that prevents it from working. To ensure that Weave can use the fast data path:
- Avoid Network Address Translation (NAT) devices
- Open UDP port 6784 (This is the port used by the Weave routers)
- Ensure that
WEAVE_MTUfits with theMTUof the intermediate network (see below)
The use of fast datapath is an automated connection-by-connection decision made by Weave, and because of this, you may end up with a mixture of connection tunnel types. If fast data path cannot be used for a connection, Weave falls back to the "user space" packet path.
Once a Weave network is set up, you can query the connections using the weave status connections command:
$ weave status connections
<-192.168.122.25:43889 established fastdp a6:66:4f:a5:8a:11(ubuntu1204)
Where fastdp indicates that fast data path is being used on a connection. If fastdp is not shown, the field displays sleeve indicating Weave Net's fall-back encapsulation method:
$ weave status connections
<- 192.168.122.25:54782 established sleeve 8a:50:4c:23:11:ae(ubuntu1204)
See Also