Weave Net

Concepts

This section describes some of the essential concepts with which you will need to be familiar before continuing to the example deployment scenarios.

The following concepts are described:

Host

For the purposes of this documentation a host is an installation of the Linux operating system that is running an instance of the Docker Engine. The host may be executing directly on bare hardware or inside a virtual machine.

Peer

A peer is a running instance of Weave Net, typically one per host.

Peer Name

Weave Net peers are identified by a 48-bit value formatted like an ethernet MAC address, for example, 01:23:45:67:89:ab. The ‘peer name’ is used for various purposes:

While it is desirable for the peer name to remain stable across restarts, it is essential that it is unique. If two or more peers share the same name chaos will ensue, which includes but is not limited to double allocation of addresses and the inability to route packets on the overlay network.

When the router is launched on a host, it derives its peer name in order of preference:

The appropriate strategy for assigning peer names depends on the type and method of your particular deployment and is discussed in more detail below.

Peer Discovery

Peer discovery is a mechanism that allows peers to learn about new Weave Net hosts from existing peers without being explicitly told. Peer discovery is enabled by default.

Network Partition

A network partition is a transient condition whereby some arbitrary subsets of peers are unable to communicate with each other for the duration - perhaps because a network switch has failed, or a fibre optic line severed. Weave Net is designed to allow peers and their containers to make maximum safe progress under conditions of partition, healing automatically once the partition is over.

IP Address Manager (IPAM)

IPAM is the subsystem responsible for dividing up a large contiguous block of IP addresses (known as the IP allocation range) amongst peers so that individual addresses may be uniquely assigned to containers anywhere on the overlay network.

When a new network is formed an initial division of the IP allocation range must be made. Two (mutually exclusive) mechanisms with different tradeoffs are provided to perform this task: seeding and consensus.

Seeding

Seeding requires each peer to be told the list of peer names amongst which the address space is to be divided initially. There are some constraints and consequences:

Example configurations are given in the section on deployment scenarios:

Consensus

Alternatively, when a new network is formed for the first time, peers can be configured to co-ordinate amongst themselves to automatically divide up the IP allocation range. This process is known as consensus and it requires each peer to be told the total number of expected peers (the ‘initial peer count’) in order to prevent the formation of disjoint peer groups which would, ultimately, result in duplicate IP addresses.

Example configurations are given in the section on deployment scenarios:

Observers

Finally, an option is provided to start a peer as an observer. Such peers do not require a seed peer name list or an initial peer count; instead they rely on the existence of other peers in the network which have been so configured. When an observer needs address space, it asks for it from one of the peers which partook of the initial division, triggering consensus if necessary.

Example configurations are given in the section on deployment scenarios:

Persistence

Certain information is remembered between launches of Weave Net (for example across reboots):

The persistence of this information is managed transparently in a volume container but can be destroyed explicitly if necessary.