@@ -169,51 +169,30 @@ The sketch below is the one-screen version.
169169
170170` ` ` mermaid
171171flowchart TD
172- %% Three roles in vertical layers:
173- %% LAN -> network-anchor (anchord) -> transit-bridge
174- %% -> service-anchors (+ app containers via netns share)
175- %% -> backend-bridge -> DBs
172+ %% Three roles in vertical layers: LAN -> network-anchor ->
173+ %% transit-bridge -> service-anchors (+ app containers joined
174+ %% via netns share) -> backend-bridge -> DBs.
176175 %%
177- %% Edge styles:
178- %% solid arrow = traffic flow
179- %% thick arrow = membership in a Docker bridge
180- %% dashed arrow = netns share via network_mode:service:<anchor>
181-
182- %% External entry: VLAN sub-interface on the host. The whole
183- %% project gets ONE IP via DHCP on this VLAN.
184- LAN[/"External LAN<br/>VLAN eth0.42"/]
185-
186- %% Network-anchor: holds the macvlan child, runs the DHCP
187- %% client, owns the nftables NAT state. One per project.
188- Anchord["<b>anchord</b> (network-anchor mode)<br/>macvlan child + DNAT-by-map<br/>+ masquerade on egress"]
189-
190- %% Transit bridge: where the network-anchor and all
191- %% service-anchors meet. internal:true so Docker's
192- %% own MASQUERADE doesn't meddle with our paths.
193- Transit[("<b>transit-bridge</b><br/>Docker bridge, internal: true")]
194-
195- %% Service-anchors: own a netns, maintain a default route
196- %% to the network-anchor, serve as namespace targets for
197- %% application containers via network_mode: service:<anchor>.
198- Smtp["<b>smtp-anchor</b><br/>service-anchor mode<br/>(namespace owner)"]
199- Imap["<b>imap-anchor</b><br/>service-anchor mode<br/>(namespace owner)"]
200-
201- %% Application containers - share the SA's netns,
202- %% no own IP, no own MAC. Just processes in a borrowed namespace.
203- Postfix(("postfix"))
204- Dovecot(("dovecot"))
205-
206- %% Backend bridge: shared L2 for SAs to reach DBs.
207- %% Backend services never see the transit network.
208- Backend[("<b>backend-bridge</b><br/>Docker bridge, internal: true")]
209- DBs[/"mysql, redis, ..."/]
210-
211- LAN -->|"macvlan + DHCP<br/>one IP per project"| Anchord
176+ %% Edge styles: solid arrow = traffic flow,
177+ %% thick arrow = membership in a Docker bridge,
178+ %% dashed arrow = netns share via network_mode service.
179+
180+ LAN[External LAN - VLAN eth0.42]
181+ Anchord[anchord network-anchor mode<br>macvlan + nftables<br>DNAT-by-map + masquerade]
182+ Transit[transit-bridge<br>Docker bridge, internal: true]
183+ Smtp[smtp-anchor<br>service-anchor mode<br>namespace owner]
184+ Imap[imap-anchor<br>service-anchor mode<br>namespace owner]
185+ Postfix(postfix)
186+ Dovecot(dovecot)
187+ Backend[backend-bridge<br>Docker bridge, internal: true]
188+ DBs[mysql, redis, ...]
189+
190+ LAN -->|macvlan + DHCP - one IP per project| Anchord
212191 Anchord ==> Transit
213192 Transit ==> Smtp
214193 Transit ==> Imap
215- Smtp -.->|" network_mode:<br/> service:smtp-anchor" | Postfix
216- Imap -.->|" network_mode:<br/> service:imap-anchor" | Dovecot
194+ Smtp -.->|network_mode service| Postfix
195+ Imap -.->|network_mode service| Dovecot
217196 Smtp ==> Backend
218197 Imap ==> Backend
219198 Backend ==> DBs
0 commit comments