Starting with Resilio Connect v3.2, network policy is available to shape connections across the Agents located in different arears. Shaping is based on the Agents' tags and shall be configured in the Job profile. Only Agents of version 3.2 and newer can follow such a rule.
The idea about the network policy rules is that there's a set of preferred connections that the Agents can establish and a number of such possible connections. Each rule is configured on a separate line in the Job profile and are prioritized from top to the bottom.
A rule can be edited, moved up and down or deleted. If a rule is changed or a tag is edited, the rule is re-evaluated and all connections in this rule are re-established. Connections are also re-established if an Agent that fits a rule goes offline or online on the MC, or a new Agent is connected.
Tags need to be assigned on Agents in advance. In the examples below there will be a special tag AGENT - it is an implicit tag created and used by MC specifically for the network policy. It helps MC to uniquely identify an Agent. Don't use this tag elsewhere in scripts or jobs.
Rule syntax and connectivity
The rule is based on the tags of the Agents and the number of connections that the Agents with such tags can establish.
Two possible rule types are:
Agents with same value of a TAG_NAME are virtually split into a kind of a set. In the rule, the number defines the number of total connections that Agents from set TAG_NAME before dash can establish to other Agents from set TAG_NAME after dash, in total; or to the agents with same TAG value.
Only online Agents can establish such connections. MC chooses such an Agents from each of the sets randomly, but balanced.
In the example from the image above, and a few more possible examples, the rules are :
It means that each Agent will establish 3 connections to three other Agents with same value of tag LAN as self.
Agents with a tag LAN will establish two connections to Agents with another (different) value of tag LAN than self. In other words, each of LANs will have two connections to another LAN. If you know that you have more LAN groups than you configured possible connections, only the allowed number of connections will be established. In this example, if you have 5 LAN groups, two of them will be remain disconnected (only 2 connections are possible between different LANs, as configured).
Agents with tag LAN will establish only one connection to agents with tag CLOUD in total, i.e. each of the LAN groups will have one connection to a cloud. If you know you have two or more CLOUDs configured, the rest will remain unconnected until you increase the number of allowed connections accordingly. The choice of connected CLOUDs is random.
No connections will be established at all, if none of the Agents match the rule, for example, if a job has rule LAN-LAN:1, but all Agents have the same LAN tag.
If the network policy rules are deleted from the job, all agents use standard peer discovery mechanism to discover and connect to all available Agents.
If an Agent is not connected to any other Agent in the job with a configured network rule, it reports the error "There are no other Agents to connect to within the configured network policy map. Please review the network policy rule and make sure that the configured Agents are online".
Review the rule
Administrator can check the built connections topology from a job run's overview tab. Download a json file with the topology.
Also, information about connections per the network rule policy can be seen in the Agents' connectivity matrix inside the job run