Environment variables¶
The programs take their settings from the environment; under systemd, from
the unit’s EnvironmentFile (/etc/vnet/conductor.env,
switch.env, agent.env). The Programs column says which program
reads a variable: C conductor, S switch, A agent.
An integer outside its range stops the program at start with
[Config] NAME must be an integer between MIN and MAX, got 'VALUE'.
A flag that is off by default is turned on by exactly 1; a flag that is
on by default (VNET_TLS_ROLE_CHECK, VNET_CONFIG_HASH_CHECK,
VNET_DEFAULT_VIA_TUN) is turned off by exactly 0.
Command line¶
conductor
switch <name> [auth_key] <port>
agent <name> [auth_key]
Names are 1 to 10 characters for an agent, 1 to 32 for a switch, from
[A-Za-z0-9_-]. Give the key in the environment rather than on the
command line, where every local user can read it. The systemd units take
the name and port from VNET_AGENT_NAME, VNET_SWITCH_NAME and
VNET_SWITCH_PORT in the env file; the programs themselves do not read
these three.
Connection and identity¶
Variable |
Programs |
Default |
Meaning |
|---|---|---|---|
|
S A |
required |
Address or host name of the conductor. |
|
C S A |
5000 (C), required (S A) |
TCP port of the conductor, 1 to 65535. The conductor listens on it on every address. |
|
S A |
This machine’s key, as in the auth file. Takes precedence over
|
|
|
S A |
A file whose first line is the key. |
|
|
C |
required |
The auth file (Auth file). Read again on |
|
S |
the address the conductor sees |
Address or host name that agents and other switches dial to reach this switch. Set it when the switch is behind NAT or has several addresses. |
|
S A |
|
Network name used to place agents on switches
(Architecture). A switch on |
TLS¶
Variable |
Programs |
Default |
Meaning |
|---|---|---|---|
|
C S A |
off |
|
|
C S A |
required with TLS |
The CA certificate, PEM. |
|
C S A |
required with TLS |
This machine’s certificate, PEM. |
|
C S A |
required with TLS |
This machine’s private key, PEM. |
|
C S A |
on |
|
|
C S A |
off |
|
Access list¶
Variable |
Programs |
Default |
Meaning |
|---|---|---|---|
|
C S |
The switch config (Switch config). On the conductor: sent to
every switch, read again on |
|
|
C |
on |
When the switches read their own files: refuse a switch whose config
differs from the others’. |
|
S A |
|
The overlay prefix. Must be the same on every switch and agent. |
Switch¶
Variable |
Programs |
Default |
Meaning |
|---|---|---|---|
|
S |
20000 |
Packets per second each machine may send, 0 to 100000000; 0 is no limit. Burst of one second. |
|
S |
200 |
Mbit/s each machine may send, 0 to 100000; 0 is no limit. Burst of one second. |
|
S |
60 |
Seconds between statistics lines, 0 to 86400; 0 turns them off
( |
|
S |
off |
|
Agent¶
Variable |
Programs |
Default |
Meaning |
|---|---|---|---|
|
A |
on |
The default route goes through the TUN. |
|
A |
off |
|
|
A |
off |
|
|
A |
Comma-separated prefixes |
|
|
A |
The bypass file (Bypass file). Read again on |
|
|
A |
|
Where the agent saves the physical default route, as
|
Liveness and state¶
Variable |
Programs |
Default |
Meaning |
|---|---|---|---|
|
C S A |
10 |
Seconds between heartbeats on every link, 1 to 3600. |
|
C S A |
30 |
Seconds without anything received before a link is closed, 1 to
86400; must be larger than |
|
C, |
|
Where the conductor writes its state dump. |
|
C |
60 |
Seconds between dumps, 1 to 86400. |
Certificates tool¶
VNET_CERT_DAYS (default 400) is read by vnet-certs: the validity of
the certificates it issues.