Update all documentation for mandatory matching trunk section names

Both sides of a trunk link must now use the same [TRUNK_x] section
name, agreed upon by both sysops. Updated all examples across README,
TRUNK_PROTOCOL, INSTALL, DEPLOYMENT_ITALY (EN+IT), and
DESIGN_SATELLITE_AND_CLUSTER to use sorted-pair naming convention
(e.g. TRUNK_01_02 for the link between prefix 01 and 02).
This commit is contained in:
Audric committed 2026-04-05 18:33:29 +02:00
1 parent 05c4c88ff3
commit aa4b41f702
7 files changed
+109 -76

No files matched your search

+17 -9
View File
@@ -182,7 +182,7 @@ it immediately.
### 4. Add a trunk section per peer ### 4. Add a trunk section per peer
```ini ```ini
[TRUNK_2] [TRUNK_AB]
HOST=reflector-b.example.com HOST=reflector-b.example.com
PORT=5302 # trunk port (default 5302, separate from client port 5300) PORT=5302 # trunk port (default 5302, separate from client port 5300)
SECRET=shared_secret SECRET=shared_secret
@@ -190,7 +190,13 @@ REMOTE_PREFIX=2 # peer owns TGs 2, 20, 200, 2000, ...
# REMOTE_PREFIX=11,12,13 # comma-separated list accepted here too # REMOTE_PREFIX=11,12,13 # comma-separated list accepted here too
``` ```
Repeat for each peer (`[TRUNK_3]`, `[TRUNK_4]`, …). Repeat for each peer (`[TRUNK_AC]`, `[TRUNK_AD]`, …).
**Important:** The `[TRUNK_x]` section name must be **identical on both sides** of
the link. Both sysops must agree on a shared section name before configuring the
link. For example, if reflectors A and B want to link, both configs must use the
same name (e.g. `[TRUNK_AB]`). A connection from a peer whose section name does
not match any local section will be rejected.
### Network requirements ### Network requirements
@@ -222,12 +228,12 @@ run behind NAT, just like a regular SvxLink client node.
[GLOBAL] [GLOBAL]
LOCAL_PREFIX=1 LOCAL_PREFIX=1
[TRUNK_2] [TRUNK_AB]
HOST=reflector-b.example.com HOST=reflector-b.example.com
SECRET=secret_ab SECRET=secret_ab
REMOTE_PREFIX=2 REMOTE_PREFIX=2
[TRUNK_3] [TRUNK_AC]
HOST=reflector-c.example.com HOST=reflector-c.example.com
SECRET=secret_ac SECRET=secret_ac
REMOTE_PREFIX=3 REMOTE_PREFIX=3
@@ -238,12 +244,12 @@ REMOTE_PREFIX=3
[GLOBAL] [GLOBAL]
LOCAL_PREFIX=2 LOCAL_PREFIX=2
[TRUNK_1] [TRUNK_AB]
HOST=reflector-a.example.com HOST=reflector-a.example.com
SECRET=secret_ab SECRET=secret_ab
REMOTE_PREFIX=1 REMOTE_PREFIX=1
[TRUNK_3] [TRUNK_BC]
HOST=reflector-c.example.com HOST=reflector-c.example.com
SECRET=secret_bc SECRET=secret_bc
REMOTE_PREFIX=3 REMOTE_PREFIX=3
@@ -254,18 +260,20 @@ REMOTE_PREFIX=3
[GLOBAL] [GLOBAL]
LOCAL_PREFIX=3 LOCAL_PREFIX=3
[TRUNK_1] [TRUNK_AC]
HOST=reflector-a.example.com HOST=reflector-a.example.com
SECRET=secret_ac SECRET=secret_ac
REMOTE_PREFIX=1 REMOTE_PREFIX=1
[TRUNK_2] [TRUNK_BC]
HOST=reflector-b.example.com HOST=reflector-b.example.com
SECRET=secret_bc SECRET=secret_bc
REMOTE_PREFIX=2 REMOTE_PREFIX=2
``` ```
Both sides of each trunk must point at each other and share the same `SECRET`. Both sides of each trunk link must use the **same section name** and share the
same `SECRET`. The sysops of both reflectors agree on the section name and
secret when setting up the link.
### Satellite reflectors ### Satellite reflectors
+29 -23
View File
@@ -122,115 +122,115 @@ CLUSTER_TGS=222
HTTP_SRV_PORT=8080 HTTP_SRV_PORT=8080
COMMAND_PTY=/dev/shm/reflector_ctrl COMMAND_PTY=/dev/shm/reflector_ctrl
[TRUNK_02] [TRUNK_01_02]
HOST=svxref-sardegna.example.it HOST=svxref-sardegna.example.it
PORT=5302 PORT=5302
SECRET=IT_01_02 SECRET=IT_01_02
REMOTE_PREFIX=02 REMOTE_PREFIX=02
[TRUNK_03] [TRUNK_01_03]
HOST=svxref-umbria.example.it HOST=svxref-umbria.example.it
PORT=5302 PORT=5302
SECRET=IT_01_03 SECRET=IT_01_03
REMOTE_PREFIX=03 REMOTE_PREFIX=03
[TRUNK_11] [TRUNK_01_11]
HOST=svxref-liguria.example.it HOST=svxref-liguria.example.it
PORT=5302 PORT=5302
SECRET=IT_01_11 SECRET=IT_01_11
REMOTE_PREFIX=11 REMOTE_PREFIX=11
[TRUNK_12] [TRUNK_01_12]
HOST=svxref-piemonte.example.it HOST=svxref-piemonte.example.it
PORT=5302 PORT=5302
SECRET=IT_01_12 SECRET=IT_01_12
REMOTE_PREFIX=12 REMOTE_PREFIX=12
[TRUNK_13] [TRUNK_01_13]
HOST=svxref-valledaosta.example.it HOST=svxref-valledaosta.example.it
PORT=5302 PORT=5302
SECRET=IT_01_13 SECRET=IT_01_13
REMOTE_PREFIX=13 REMOTE_PREFIX=13
[TRUNK_21] [TRUNK_01_21]
HOST=svxref-lombardia.example.it HOST=svxref-lombardia.example.it
PORT=5302 PORT=5302
SECRET=IT_01_21 SECRET=IT_01_21
REMOTE_PREFIX=21 REMOTE_PREFIX=21
[TRUNK_31] [TRUNK_01_31]
HOST=svxref-friuli.example.it HOST=svxref-friuli.example.it
PORT=5302 PORT=5302
SECRET=IT_01_31 SECRET=IT_01_31
REMOTE_PREFIX=31 REMOTE_PREFIX=31
[TRUNK_32] [TRUNK_01_32]
HOST=svxref-trentino.example.it HOST=svxref-trentino.example.it
PORT=5302 PORT=5302
SECRET=IT_01_32 SECRET=IT_01_32
REMOTE_PREFIX=32 REMOTE_PREFIX=32
[TRUNK_33] [TRUNK_01_33]
HOST=svxref-veneto.example.it HOST=svxref-veneto.example.it
PORT=5302 PORT=5302
SECRET=IT_01_33 SECRET=IT_01_33
REMOTE_PREFIX=33 REMOTE_PREFIX=33
[TRUNK_41] [TRUNK_01_41]
HOST=svxref-emilia.example.it HOST=svxref-emilia.example.it
PORT=5302 PORT=5302
SECRET=IT_01_41 SECRET=IT_01_41
REMOTE_PREFIX=41 REMOTE_PREFIX=41
[TRUNK_51] [TRUNK_01_51]
HOST=svxref-toscana.example.it HOST=svxref-toscana.example.it
PORT=5302 PORT=5302
SECRET=IT_01_51 SECRET=IT_01_51
REMOTE_PREFIX=51 REMOTE_PREFIX=51
[TRUNK_61] [TRUNK_01_61]
HOST=svxref-abruzzo.example.it HOST=svxref-abruzzo.example.it
PORT=5302 PORT=5302
SECRET=IT_01_61 SECRET=IT_01_61
REMOTE_PREFIX=61 REMOTE_PREFIX=61
[TRUNK_62] [TRUNK_01_62]
HOST=svxref-marche.example.it HOST=svxref-marche.example.it
PORT=5302 PORT=5302
SECRET=IT_01_62 SECRET=IT_01_62
REMOTE_PREFIX=62 REMOTE_PREFIX=62
[TRUNK_71] [TRUNK_01_71]
HOST=svxref-puglia.example.it HOST=svxref-puglia.example.it
PORT=5302 PORT=5302
SECRET=IT_01_71 SECRET=IT_01_71
REMOTE_PREFIX=71 REMOTE_PREFIX=71
[TRUNK_81] [TRUNK_01_81]
HOST=svxref-basilicata.example.it HOST=svxref-basilicata.example.it
PORT=5302 PORT=5302
SECRET=IT_01_81 SECRET=IT_01_81
REMOTE_PREFIX=81 REMOTE_PREFIX=81
[TRUNK_82] [TRUNK_01_82]
HOST=svxref-calabria.example.it HOST=svxref-calabria.example.it
PORT=5302 PORT=5302
SECRET=IT_01_82 SECRET=IT_01_82
REMOTE_PREFIX=82 REMOTE_PREFIX=82
[TRUNK_83] [TRUNK_01_83]
HOST=svxref-campania.example.it HOST=svxref-campania.example.it
PORT=5302 PORT=5302
SECRET=IT_01_83 SECRET=IT_01_83
REMOTE_PREFIX=83 REMOTE_PREFIX=83
[TRUNK_84] [TRUNK_01_84]
HOST=svxref-molise.example.it HOST=svxref-molise.example.it
PORT=5302 PORT=5302
SECRET=IT_01_84 SECRET=IT_01_84
REMOTE_PREFIX=84 REMOTE_PREFIX=84
[TRUNK_91] [TRUNK_01_91]
HOST=svxref-sicilia.example.it HOST=svxref-sicilia.example.it
PORT=5302 PORT=5302
SECRET=IT_01_91 SECRET=IT_01_91
@@ -238,8 +238,12 @@ REMOTE_PREFIX=91
``` ```
All other regional configs follow the same pattern: set `LOCAL_PREFIX` to the All other regional configs follow the same pattern: set `LOCAL_PREFIX` to the
region's 2-digit code and add one `[TRUNK_xx]` section for each of the other region's 2-digit code and add one `[TRUNK_xx_yy]` section for each of the other
19 regions, using the matching `SECRET` from the convention above. 19 regions, where `xx` and `yy` are the sorted pair of region codes (lower code
first). Both sides of a trunk link must use the **same section name** — for
example, the link between regions 02 and 21 is named `[TRUNK_02_21]` on both
the SARDEGNA and LOMBARDIA reflectors. Use the matching `SECRET` from the
convention above.
--- ---
@@ -313,7 +317,7 @@ SATELLITE_SECRET=lazio_satellite_secret
SATELLITE_ID=sat-roma SATELLITE_ID=sat-roma
``` ```
The satellite does not set `LOCAL_PREFIX`, `REMOTE_PREFIX`, or any `[TRUNK_xx]` The satellite does not set `LOCAL_PREFIX`, `REMOTE_PREFIX`, or any `[TRUNK_xx_yy]`
sections. It only needs `LISTEN_PORT=5300` for its local SvxLink clients. Also sections. It only needs `LISTEN_PORT=5300` for its local SvxLink clients. Also
open port `5303` inbound on the regional reflector firewall. open port `5303` inbound on the regional reflector firewall.
@@ -322,7 +326,9 @@ open port `5303` inbound on the regional reflector firewall.
## Per-region config checklist ## Per-region config checklist
1. Set `LOCAL_PREFIX` to the 2-digit code from the table above. 1. Set `LOCAL_PREFIX` to the 2-digit code from the table above.
2. Add one `[TRUNK_xx]` section for **every other region** (19 sections total). 2. Add one `[TRUNK_xx_yy]` section for **every other region** (19 sections total),
where `xx` and `yy` are the sorted pair of region codes (lower first). Both
sides of a trunk link must use the **same** `[TRUNK_xx_yy]` section name.
3. Use the same `SECRET` value as the matching section on the peer — mismatched 3. Use the same `SECRET` value as the matching section on the peer — mismatched
secrets will prevent the trunk from connecting. secrets will prevent the trunk from connecting.
4. Open TCP port `5302` inbound in the firewall (trunk) and `5300` inbound (clients). 4. Open TCP port `5302` inbound in the firewall (trunk) and `5300` inbound (clients).
+26 -23
View File
@@ -125,115 +125,115 @@ CLUSTER_TGS=222
HTTP_SRV_PORT=8080 HTTP_SRV_PORT=8080
COMMAND_PTY=/dev/shm/reflector_ctrl COMMAND_PTY=/dev/shm/reflector_ctrl
[TRUNK_02] [TRUNK_01_02]
HOST=svxref-sardegna.example.it HOST=svxref-sardegna.example.it
PORT=5302 PORT=5302
SECRET=IT_01_02 SECRET=IT_01_02
REMOTE_PREFIX=02 REMOTE_PREFIX=02
[TRUNK_03] [TRUNK_01_03]
HOST=svxref-umbria.example.it HOST=svxref-umbria.example.it
PORT=5302 PORT=5302
SECRET=IT_01_03 SECRET=IT_01_03
REMOTE_PREFIX=03 REMOTE_PREFIX=03
[TRUNK_11] [TRUNK_01_11]
HOST=svxref-liguria.example.it HOST=svxref-liguria.example.it
PORT=5302 PORT=5302
SECRET=IT_01_11 SECRET=IT_01_11
REMOTE_PREFIX=11 REMOTE_PREFIX=11
[TRUNK_12] [TRUNK_01_12]
HOST=svxref-piemonte.example.it HOST=svxref-piemonte.example.it
PORT=5302 PORT=5302
SECRET=IT_01_12 SECRET=IT_01_12
REMOTE_PREFIX=12 REMOTE_PREFIX=12
[TRUNK_13] [TRUNK_01_13]
HOST=svxref-valledaosta.example.it HOST=svxref-valledaosta.example.it
PORT=5302 PORT=5302
SECRET=IT_01_13 SECRET=IT_01_13
REMOTE_PREFIX=13 REMOTE_PREFIX=13
[TRUNK_21] [TRUNK_01_21]
HOST=svxref-lombardia.example.it HOST=svxref-lombardia.example.it
PORT=5302 PORT=5302
SECRET=IT_01_21 SECRET=IT_01_21
REMOTE_PREFIX=21 REMOTE_PREFIX=21
[TRUNK_31] [TRUNK_01_31]
HOST=svxref-friuli.example.it HOST=svxref-friuli.example.it
PORT=5302 PORT=5302
SECRET=IT_01_31 SECRET=IT_01_31
REMOTE_PREFIX=31 REMOTE_PREFIX=31
[TRUNK_32] [TRUNK_01_32]
HOST=svxref-trentino.example.it HOST=svxref-trentino.example.it
PORT=5302 PORT=5302
SECRET=IT_01_32 SECRET=IT_01_32
REMOTE_PREFIX=32 REMOTE_PREFIX=32
[TRUNK_33] [TRUNK_01_33]
HOST=svxref-veneto.example.it HOST=svxref-veneto.example.it
PORT=5302 PORT=5302
SECRET=IT_01_33 SECRET=IT_01_33
REMOTE_PREFIX=33 REMOTE_PREFIX=33
[TRUNK_41] [TRUNK_01_41]
HOST=svxref-emilia.example.it HOST=svxref-emilia.example.it
PORT=5302 PORT=5302
SECRET=IT_01_41 SECRET=IT_01_41
REMOTE_PREFIX=41 REMOTE_PREFIX=41
[TRUNK_51] [TRUNK_01_51]
HOST=svxref-toscana.example.it HOST=svxref-toscana.example.it
PORT=5302 PORT=5302
SECRET=IT_01_51 SECRET=IT_01_51
REMOTE_PREFIX=51 REMOTE_PREFIX=51
[TRUNK_61] [TRUNK_01_61]
HOST=svxref-abruzzo.example.it HOST=svxref-abruzzo.example.it
PORT=5302 PORT=5302
SECRET=IT_01_61 SECRET=IT_01_61
REMOTE_PREFIX=61 REMOTE_PREFIX=61
[TRUNK_62] [TRUNK_01_62]
HOST=svxref-marche.example.it HOST=svxref-marche.example.it
PORT=5302 PORT=5302
SECRET=IT_01_62 SECRET=IT_01_62
REMOTE_PREFIX=62 REMOTE_PREFIX=62
[TRUNK_71] [TRUNK_01_71]
HOST=svxref-puglia.example.it HOST=svxref-puglia.example.it
PORT=5302 PORT=5302
SECRET=IT_01_71 SECRET=IT_01_71
REMOTE_PREFIX=71 REMOTE_PREFIX=71
[TRUNK_81] [TRUNK_01_81]
HOST=svxref-basilicata.example.it HOST=svxref-basilicata.example.it
PORT=5302 PORT=5302
SECRET=IT_01_81 SECRET=IT_01_81
REMOTE_PREFIX=81 REMOTE_PREFIX=81
[TRUNK_82] [TRUNK_01_82]
HOST=svxref-calabria.example.it HOST=svxref-calabria.example.it
PORT=5302 PORT=5302
SECRET=IT_01_82 SECRET=IT_01_82
REMOTE_PREFIX=82 REMOTE_PREFIX=82
[TRUNK_83] [TRUNK_01_83]
HOST=svxref-campania.example.it HOST=svxref-campania.example.it
PORT=5302 PORT=5302
SECRET=IT_01_83 SECRET=IT_01_83
REMOTE_PREFIX=83 REMOTE_PREFIX=83
[TRUNK_84] [TRUNK_01_84]
HOST=svxref-molise.example.it HOST=svxref-molise.example.it
PORT=5302 PORT=5302
SECRET=IT_01_84 SECRET=IT_01_84
REMOTE_PREFIX=84 REMOTE_PREFIX=84
[TRUNK_91] [TRUNK_01_91]
HOST=svxref-sicilia.example.it HOST=svxref-sicilia.example.it
PORT=5302 PORT=5302
SECRET=IT_01_91 SECRET=IT_01_91
@@ -242,8 +242,11 @@ REMOTE_PREFIX=91
Tutte le altre configurazioni regionali seguono lo stesso schema: impostare Tutte le altre configurazioni regionali seguono lo stesso schema: impostare
`LOCAL_PREFIX` al codice a 2 cifre della propria regione e aggiungere una sezione `LOCAL_PREFIX` al codice a 2 cifre della propria regione e aggiungere una sezione
`[TRUNK_xx]` per ciascuna delle altre 19 regioni, usando il `SECRET` corrispondente `[TRUNK_xx_yy]` per ciascuna delle altre 19 regioni, dove `xx` e `yy` sono la
secondo la convenzione sopra indicata. coppia ordinata di codici regionali (il minore per primo). I nomi delle sezioni
devono essere identici su entrambi i lati del link — ad esempio il collegamento
tra Sardegna (02) e Umbria (03) si chiama `[TRUNK_02_03]` su entrambi i reflector.
Usare il `SECRET` corrispondente secondo la convenzione sopra indicata.
--- ---
@@ -321,7 +324,7 @@ SATELLITE_ID=sat-roma
``` ```
Il satellite non imposta `LOCAL_PREFIX`, `REMOTE_PREFIX` o alcuna sezione Il satellite non imposta `LOCAL_PREFIX`, `REMOTE_PREFIX` o alcuna sezione
`[TRUNK_xx]`. Necessita solo di `LISTEN_PORT=5300` per i propri client SvxLink `[TRUNK_xx_yy]`. Necessita solo di `LISTEN_PORT=5300` per i propri client SvxLink
locali. Aprire anche la porta `5303` in ingresso sul firewall del reflector locali. Aprire anche la porta `5303` in ingresso sul firewall del reflector
regionale. regionale.
@@ -330,7 +333,7 @@ regionale.
## Lista di controllo per ogni regione ## Lista di controllo per ogni regione
1. Impostare `LOCAL_PREFIX` al codice a 2 cifre dalla tabella sopra. 1. Impostare `LOCAL_PREFIX` al codice a 2 cifre dalla tabella sopra.
2. Aggiungere una sezione `[TRUNK_xx]` per **ciascuna delle altre regioni** (19 sezioni in totale). 2. Aggiungere una sezione `[TRUNK_xx_yy]` per **ciascuna delle altre regioni** (19 sezioni in totale), dove `xx` e `yy` sono la coppia ordinata di codici regionali. I nomi delle sezioni devono essere identici su entrambi i lati del link.
3. Usare lo stesso valore di `SECRET` della sezione corrispondente sul peer — secret 3. Usare lo stesso valore di `SECRET` della sezione corrispondente sul peer — secret
non corrispondenti impediranno la connessione del trunk. non corrispondenti impediranno la connessione del trunk.
4. Aprire la porta TCP `5302` in ingresso nel firewall (trunk) e la porta `5300` (client). 4. Aprire la porta TCP `5302` in ingresso nel firewall (trunk) e la porta `5300` (client).
+2 -2
View File
@@ -47,7 +47,7 @@ On the **parent reflector** (existing reflector, no role change needed):
LOCAL_PREFIX=01 LOCAL_PREFIX=01
# Existing trunk config unchanged # Existing trunk config unchanged
[TRUNK_02] [TRUNK_01_02]
HOST=reflector-02.example.com HOST=reflector-02.example.com
SECRET=secret_01_02 SECRET=secret_01_02
REMOTE_PREFIX=02 REMOTE_PREFIX=02
@@ -330,7 +330,7 @@ each trunk link's `active_talkers`:
{ {
"cluster_tgs": [222, 2221, 91], "cluster_tgs": [222, 2221, 91],
"trunks": { "trunks": {
"TRUNK_02": { "TRUNK_01_02": {
"active_talkers": { "active_talkers": {
"222": "IW1GEU", "222": "IW1GEU",
"25": "SM0ABC" "25": "SM0ABC"
+6 -4
View File
@@ -108,15 +108,17 @@ LOCAL_PREFIX=11,12,13
At the end of the config file, add one `[TRUNK_x]` section per peer reflector: At the end of the config file, add one `[TRUNK_x]` section per peer reflector:
```ini ```ini
[TRUNK_2] [TRUNK_1_2]
HOST=reflector-b.example.com HOST=reflector-b.example.com
PORT=5302 PORT=5302
SECRET=a_strong_shared_secret SECRET=a_strong_shared_secret
REMOTE_PREFIX=2 REMOTE_PREFIX=2
``` ```
- **The section name must be identical on both sides.** Both sysops must agree
on a shared name (e.g. `TRUNK_1_2` for the link between prefix 1 and 2).
- `PORT` defaults to `5302` if omitted. - `PORT` defaults to `5302` if omitted.
- Both sides of each trunk must use the same `SECRET`. - Both sides must use the same `SECRET`.
- `REMOTE_PREFIX` also accepts a comma-separated list. - `REMOTE_PREFIX` also accepts a comma-separated list.
### 6c. Optional: enable the HTTP status endpoint ### 6c. Optional: enable the HTTP status endpoint
@@ -170,8 +172,8 @@ journalctl -u svxreflector -f
A successful trunk connection looks like: A successful trunk connection looks like:
``` ```
TRUNK_2: Connected to reflector-b.example.com:5302 TRUNK_1_2: Connected to reflector-b.example.com:5302
TRUNK_2: Trunk hello from peer 'TRUNK_1' local_prefix=2 priority=3847291042 TRUNK_1_2: Trunk hello from peer 'TRUNK_1_2' local_prefix=2 priority=3847291042
``` ```
If `HTTP_SRV_PORT` is set, query the status endpoint: If `HTTP_SRV_PORT` is set, query the status endpoint:
+23 -12
View File
@@ -13,10 +13,17 @@ reflector configured with `LOCAL_PREFIX=1` is authoritative for TG 1, 10, 100,
(country codes, area codes). (country codes, area codes).
Multiple reflectors can be trunked together in a full mesh. Each pair of Multiple reflectors can be trunked together in a full mesh. Each pair of
reflectors has one `[TRUNK_x]` section per side. Each TG has exactly one reflectors shares one `[TRUNK_x]` section name on both sides. Each TG has exactly one
authoritative home reflector (the one whose prefix matches); all other authoritative home reflector (the one whose prefix matches); all other
reflectors are transparent proxies for that TG. reflectors are transparent proxies for that TG.
> **Important:** Both reflectors in a trunk link **must use the same `[TRUNK_x]`
> section name**. The section name is transmitted in the `MsgTrunkHello`
> handshake and both sides must agree on it for the connection to be matched to
> the correct `TrunkLink` instance. The convention is to use sorted pair
> identifiers — for example, the link between reflector 1 and reflector 2 uses
> `[TRUNK_1_2]` on **both** sides.
Clients (SvxLink nodes) connect to their local reflector as normal and are Clients (SvxLink nodes) connect to their local reflector as normal and are
completely unaware of the trunk. When a remote talker is active on a TG whose completely unaware of the trunk. When a remote talker is active on a TG whose
prefix belongs to another reflector, local clients receive a standard prefix belongs to another reflector, local clients receive a standard
@@ -215,7 +222,8 @@ is rejected. Outbound reconnection is handled automatically by
### `MsgTrunkHello` fields ### `MsgTrunkHello` fields
- `id` — the config section name (e.g. `TRUNK_2`), used for logging - `id` — the config section name (e.g. `TRUNK_1_2`), used for logging and
connection matching — both sides must use the same section name
- `local_prefix` — the sender's authoritative TG prefix (e.g. `"1"`) - `local_prefix` — the sender's authoritative TG prefix (e.g. `"1"`)
- `priority` — random 32-bit nonce, regenerated per connection, used for - `priority` — random 32-bit nonce, regenerated per connection, used for
talker arbitration tie-breaking talker arbitration tie-breaking
@@ -358,7 +366,7 @@ The `/status` JSON endpoint includes a `trunks` object alongside `nodes`:
{ {
"nodes": { ... }, "nodes": { ... },
"trunks": { "trunks": {
"TRUNK_2": { "TRUNK_1_2": {
"host": "reflector-b.example.com", "host": "reflector-b.example.com",
"port": 5302, "port": 5302,
"connected": true, "connected": true,
@@ -395,11 +403,14 @@ TRUNK_LISTEN_PORT=5302 # trunk server port (default 5302, optional)
### Per-trunk section ### Per-trunk section
Add one `[TRUNK_x]` section per peer. `REMOTE_PREFIX` declares which TG prefix Add one `[TRUNK_x]` section per peer. Both reflectors in a link **must use the
the peer owns: same section name** — the name is exchanged during the handshake and used to
match connections. The convention is to use sorted pair identifiers (e.g.
`[TRUNK_1_2]` for the link between reflector 1 and reflector 2).
`REMOTE_PREFIX` declares which TG prefix the peer owns:
```ini ```ini
[TRUNK_2] [TRUNK_1_2]
HOST=reflector-b.example.com # peer hostname or IP HOST=reflector-b.example.com # peer hostname or IP
PORT=5302 # peer trunk port (default 5302) PORT=5302 # peer trunk port (default 5302)
SECRET=change_this_secret # shared secret SECRET=change_this_secret # shared secret
@@ -410,12 +421,12 @@ REMOTE_PREFIX=2 # peer owns TGs 2, 20, 200, 2000, ...
**Reflector 1** (`LOCAL_PREFIX=1`): **Reflector 1** (`LOCAL_PREFIX=1`):
```ini ```ini
[TRUNK_2] [TRUNK_1_2]
HOST=reflector-b.example.com HOST=reflector-b.example.com
SECRET=secret_ab SECRET=secret_ab
REMOTE_PREFIX=2 REMOTE_PREFIX=2
[TRUNK_3] [TRUNK_1_3]
HOST=reflector-c.example.com HOST=reflector-c.example.com
SECRET=secret_ac SECRET=secret_ac
REMOTE_PREFIX=3 REMOTE_PREFIX=3
@@ -423,12 +434,12 @@ REMOTE_PREFIX=3
**Reflector 2** (`LOCAL_PREFIX=2`): **Reflector 2** (`LOCAL_PREFIX=2`):
```ini ```ini
[TRUNK_1] [TRUNK_1_2]
HOST=reflector-a.example.com HOST=reflector-a.example.com
SECRET=secret_ab SECRET=secret_ab
REMOTE_PREFIX=1 REMOTE_PREFIX=1
[TRUNK_3] [TRUNK_2_3]
HOST=reflector-c.example.com HOST=reflector-c.example.com
SECRET=secret_bc SECRET=secret_bc
REMOTE_PREFIX=3 REMOTE_PREFIX=3
@@ -436,12 +447,12 @@ REMOTE_PREFIX=3
**Reflector 3** (`LOCAL_PREFIX=3`): **Reflector 3** (`LOCAL_PREFIX=3`):
```ini ```ini
[TRUNK_1] [TRUNK_1_3]
HOST=reflector-a.example.com HOST=reflector-a.example.com
SECRET=secret_ac SECRET=secret_ac
REMOTE_PREFIX=1 REMOTE_PREFIX=1
[TRUNK_2] [TRUNK_2_3]
HOST=reflector-b.example.com HOST=reflector-b.example.com
SECRET=secret_bc SECRET=secret_bc
REMOTE_PREFIX=2 REMOTE_PREFIX=2
+6 -3
View File
@@ -88,15 +88,18 @@ CERT_CA_HOOK=@SVX_SHARE_INSTALL_DIR@/ca-hook.py
# Add LOCAL_PREFIX to the [GLOBAL] section, then add one [TRUNK_x] section # Add LOCAL_PREFIX to the [GLOBAL] section, then add one [TRUNK_x] section
# per peer. REMOTE_PREFIX declares which TG prefix the peer owns. # per peer. REMOTE_PREFIX declares which TG prefix the peer owns.
# #
# IMPORTANT: The [TRUNK_x] section name must be identical on both sides.
# Both sysops must agree on a shared name and secret for each link.
#
# Example for a two-reflector mesh: # Example for a two-reflector mesh:
# Reflector A: LOCAL_PREFIX=1, [TRUNK_2] with REMOTE_PREFIX=2 # Reflector A: LOCAL_PREFIX=1, [TRUNK_AB] with REMOTE_PREFIX=2
# Reflector B: LOCAL_PREFIX=2, [TRUNK_1] with REMOTE_PREFIX=1 # Reflector B: LOCAL_PREFIX=2, [TRUNK_AB] with REMOTE_PREFIX=1
# #
#LOCAL_PREFIX=1 #LOCAL_PREFIX=1
#TRUNK_LISTEN_PORT=5302 #TRUNK_LISTEN_PORT=5302
#TRUNK_DEBUG=0 # verbose trunk logging (high log volume — disable after diagnosis) #TRUNK_DEBUG=0 # verbose trunk logging (high log volume — disable after diagnosis)
#[TRUNK_2] #[TRUNK_AB]
#HOST=reflector-b.example.com #HOST=reflector-b.example.com
#PORT=5302 #PORT=5302
#SECRET=change_this_shared_secret #SECRET=change_this_shared_secret