============================
Managed mesh space protocols
============================

Space protocols are a method of dynamically defining which VLAN interfaces and
addresses will be used on aggregators, as well as which dynamic routing
protocols will run.

The configuration is split into 3 sections:

* **Routing group VLAN assignments** manage the VLAN ID used for VLAN interfaces
  on aggregators in this routing group, along with the pool of addresses from
  which to assign IPs on these interfaces.
* **Gateway aggregators** which will run the VLAN interfaces and
  protocols even without any bonds from this space assigned to them.
* **Protocols and filters** which define how routing protocols will run in
  which routing group for this space, and how networks are filtered for
  dynamic routing protocols.

If you require more customization than this provides, it is recommended to
manage any interfaces and protocols manually on aggregators.

Routing group VLAN assignments
-------------------------------

The routing group VLAN assignment controls which VLAN interfaces will be
created for an aggregator in a space, along with what IP addresses to assign to
it. Each routing group may have at most one VLAN assignment for any particular
space.

There are 2 pools that can assigned to draw addresses out of, one for IPv4 and
one for IPv6. Either can be omitted if not needed for the space.

With this configured, any aggregator hosting a bond in the space will configure
a VLAN interface with a matching VLAN ID and addresses out of any pools
configured.

.. warning:
    You should not configure a VLAN interface with this VLAN ID on the
    aggregator itself, or manually on the aggregator. This may prevent the
    correct VLAN interface from being created at runtime and cause routing to
    fail.

.. _gateway aggregators:

Gateway aggregators
--------------------

Gateway aggregators are only necessary if you will ever run into the scenario
where no aggregators in a routing group with trunk interfaces are hosting
bonds. This can be useful if the gateway for a space is in a different routing
group than any of the aggregators bonds in that space are assigned to, for
example.

An aggregator defined as a gateway aggregator will always run the VLAN
interfaces, as well as any dynamic routing protocols.

Protocols and filters
----------------------

Much like the `protocols
<../../dynamic-routing/configuring-dynamic-routing-in-bonding.html>`__
available on nodes, these protocols will be adapted with any local addresses or
interface names from the routing group VLAN assignments before being applied on
any relevant aggregators. Any interface-specific configuration is unavailable
in the configuration here due to the generic nature of figuring out which
interface to use.
