11-10-2020, 09:08 PM
Mrefd uses a mesh model of interlinking developed by the xlxd team. First of all, any particular connection has to be configured on both ends of the connection. We'll call a collection of interconnected reflectors a group. The smallest possible group contains two reflectors. Once the link is established, clients on one reflector can hear and be heard from clients on the other reflector.
A group can share multiple modules. If they do, traffic on one of the shared modules will not be heard by clients linked to the other modules in that group. A reflector may participate in multiple groups, but any given module can only be in a single group. Once a module is assigned to a group, it should never be configured to be in another group.
With larger groups, each reflector in the group must link to every other reflector in the group. Consider a group of three reflectors, M17-001, -002 and -003. Each reflector needs two entries in its mrefd.interlink file pointing to the two other reflectors in the group. Traffic is managed in this more complex group by a "one hop" policy. This policy prevents "looping" that might arise in the the older styled "train-car" linking. Here is how mesh linking works:
When a client on one of the group modules sends a voice stream to its reflector, the reflector sends it to all its linked clients, including other linked reflectors. However, the voice stream directed to another reflector is marked with an extra byte. When the receiving reflector gets this voice stream, it can easily identify that it is from a reflector and not a normal client so it will only pass the stream to its normal clients, not to other reflectors in the group! A stream is only relayed one time within a group.
If a group is missing a link in one of the connections, all clients on the group may not be able to hear everyone else on the group. Let's say in the example above M17-003 hasn't yet got around to configuring the link to -002. In that case clients on -001 will hear everyone, but clients on -002 won't hear clients on -003 and vis versa. That can be very confusing for clients listening to the group module. Administrators can usually easily tell if something is wrong by monitoring the mrefd logs, "sudo journalctl -u mrefd -f". If a link is only configured on one side, both sides of the link will see the attempted link fail, over and over again. See the attached file for an illustration of a good and bad four-way group.
Administrators that want to join an established group need to communicate with all of the current group members. It's also a good idea for group members to occasionally look at the dashboards of each of their group reflectors to be sure there aren't "dangling" members connected somewhere on the group.
A group can share multiple modules. If they do, traffic on one of the shared modules will not be heard by clients linked to the other modules in that group. A reflector may participate in multiple groups, but any given module can only be in a single group. Once a module is assigned to a group, it should never be configured to be in another group.
With larger groups, each reflector in the group must link to every other reflector in the group. Consider a group of three reflectors, M17-001, -002 and -003. Each reflector needs two entries in its mrefd.interlink file pointing to the two other reflectors in the group. Traffic is managed in this more complex group by a "one hop" policy. This policy prevents "looping" that might arise in the the older styled "train-car" linking. Here is how mesh linking works:
When a client on one of the group modules sends a voice stream to its reflector, the reflector sends it to all its linked clients, including other linked reflectors. However, the voice stream directed to another reflector is marked with an extra byte. When the receiving reflector gets this voice stream, it can easily identify that it is from a reflector and not a normal client so it will only pass the stream to its normal clients, not to other reflectors in the group! A stream is only relayed one time within a group.
If a group is missing a link in one of the connections, all clients on the group may not be able to hear everyone else on the group. Let's say in the example above M17-003 hasn't yet got around to configuring the link to -002. In that case clients on -001 will hear everyone, but clients on -002 won't hear clients on -003 and vis versa. That can be very confusing for clients listening to the group module. Administrators can usually easily tell if something is wrong by monitoring the mrefd logs, "sudo journalctl -u mrefd -f". If a link is only configured on one side, both sides of the link will see the attempted link fail, over and over again. See the attached file for an illustration of a good and bad four-way group.
Administrators that want to join an established group need to communicate with all of the current group members. It's also a good idea for group members to occasionally look at the dashboards of each of their group reflectors to be sure there aren't "dangling" members connected somewhere on the group.