wireguard: add peers roaming support
[vpp.git] / src / plugins / wireguard / README.rst
1 .. _wireguard_plugin_doc:
2
3 Wireguard vpp-plugin
4 ====================
5
6 Overview
7 --------
8
9 This plugin is an implementation of `wireguard
10 protocol <https://www.wireguard.com/>`__ for VPP. It allows one to
11 create secure VPN tunnels. This implementation is based on
12 `wireguard-openbsd <https://git.zx2c4.com/wireguard-openbsd/>`__.
13
14 Crypto
15 ------
16
17 The crypto protocols:
18
19 -  blake2s `[Source] <https://github.com/BLAKE2/BLAKE2>`__
20
21 OpenSSL:
22
23 -  curve25519
24 -  chachapoly1305
25
26 Plugin usage example
27 --------------------
28
29 Create wireguard interface
30 ~~~~~~~~~~~~~~~~~~~~~~~~~~
31
32 ::
33
34    > vpp# wireguard create listen-port <port> private-key <priv_key> src <src_ip4> [generate-key]
35    > *wg_interface*
36    > vpp# set int state <wg_interface> up
37    > vpp# set int ip address <wg_interface> <wg_ip4>
38
39 Add a peer configuration:
40 ~~~~~~~~~~~~~~~~~~~~~~~~~
41
42 ::
43
44    > vpp# wireguard peer add <wg_interface> public-key <pub_key_other> endpoint <ip4_dst> allowed-ip <prefix> port <port_dst> persistent-keepalive [keepalive_interval]
45    > vpp# *peer_idx*
46
47 Add routes for allowed-ip:
48 ~~~~~~~~~~~~~~~~~~~~~~~~~~
49
50 ::
51
52    > ip route add <prefix> via <wg_ip4> <wg_interface>
53
54 Show config
55 ~~~~~~~~~~~
56
57 ::
58
59    > vpp# show wireguard interface
60    > vpp# show wireguard peer
61
62 Remove peer
63 ~~~~~~~~~~~
64
65 ::
66
67    > vpp# wireguard peer remove <peer_idx>
68
69 Delete interface
70 ~~~~~~~~~~~~~~~~
71
72 ::
73
74    > vpp# wireguard delete <wg_interface>
75
76 Main next steps for improving this implementation
77 -------------------------------------------------
78
79 1. Use all benefits of VPP-engine.