diff --git a/README.md b/README.md
index 1116c8b..619e389 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,801 @@
-# interconnect
+# Datum Interconnect: The Neutral Virtual Meet-Me Room (vMMR) for the AI & Multi-Cloud Era
-Datum Cloud interconnect service.
+> **A unified, software-defined interconnection platform connecting Neoclouds, Hyperscalers, and Last-Mile Providers across Dynamic Tunnels—delivering seamless Private VPC Backbones and Public Internet Transit.**
-## Layout
+---
-- `ui/consumer/` — consumer-side Portal Plugin (`ConsumerPortalPlugin`) for
- the interconnect service, loaded by [cloud-portal](https://github.com/datum-cloud/cloud-portal)
- at runtime. Bare-bones scaffold — see its README for details.
+## Table of Contents
+
+- [1. Executive Summary & Strategic Vision](#1-executive-summary--strategic-vision)
+- [2. The Strategic Narrative: Solving the Multi-Cloud AI Networking Chasm](#2-the-strategic-narrative-solving-the-multi-cloud-ai-networking-chasm)
+ - [2.1 The Traditional Meet-Me Room (MMR) & Its Failure Modes](#21-the-traditional-meet-me-room-mmr--its-failure-modes)
+ - [2.2 The Three Fractured Worlds](#22-the-three-fractured-worlds)
+ - [2.3 Datum's Value Proposition: "Plaid for Alt-Clouds & Hyperscalers"](#23-datums-value-proposition-plaid-for-alt-clouds--hyperscalers)
+- [3. Visual Architecture & Draw.io Diagram Suite](#3-visual-architecture--drawio-diagram-suite)
+ - [3.1 Accessing the Draw.io Assets](#31-accessing-the-drawio-assets)
+ - [3.2 Diagram 1: Ecosystem Overview — The Virtual Meet-Me Room](#32-diagram-1-ecosystem-overview--the-virtual-meet-me-room)
+ - [3.3 Diagram 2: Layered Technical Architecture & Protocol Stack](#33-diagram-2-layered-technical-architecture--protocol-stack)
+ - [3.4 Diagram 3: Concrete Practical Deployment & Packet Flow Traces](#34-diagram-3-concrete-practical-deployment--packet-flow-traces)
+ - [3.5 Diagram 4: Dynamic Tunnel Architecture & Agent Lifecycle](#35-diagram-4-dynamic-tunnel-architecture--agent-lifecycle)
+- [4. Deep-Dive: Core Interconnect Capabilities](#4-deep-dive-core-interconnect-capabilities)
+ - [4.1 Dynamic Tunnels (Iroh + IETF MASQUE Convergence)](#41-dynamic-tunnels-iroh--ietf-masque-convergence)
+ - [4.2 Private Transit: The Galactic VPC Backbone (SRv6 uSID + VRF)](#42-private-transit-the-galactic-vpc-backbone-srv6-usid--vrf)
+ - [4.3 High-Performance Ingress: Stateless Maglev DSR](#43-high-performance-ingress-stateless-maglev-dsr)
+ - [4.4 Public Internet Transit: BGP /48 Allocations & Stateful NAT66 Egress](#44-public-internet-transit-bgp-48-allocations--stateful-nat66-egress)
+- [5. Declarative Kubernetes Control Plane (CRD Model)](#5-declarative-kubernetes-control-plane-crd-model)
+ - [5.1 API Resource Relationship Topology](#51-api-resource-relationship-topology)
+ - [5.2 Production CRD Specifications](#52-production-crd-specifications)
+- [6. Concrete Deployment Blueprint: What It Looks Like in Practice](#6-concrete-deployment-blueprint-what-it-looks-like-in-practice)
+ - [6.1 Real-World Reference Scenario](#61-real-world-reference-scenario)
+ - [6.2 Edge Node & Workload Deployment Steps](#62-edge-node--workload-deployment-steps)
+ - [6.3 Step-by-Step Packet Traces Across the Interconnect](#63-step-by-step-packet-traces-across-the-interconnect)
+- [7. Operational Reliability, Security & Zero-Trust Architecture](#7-operational-reliability-security--zero-trust-architecture)
+- [8. Architectural Comparison: Datum vs. Legacy Alternatives](#8-architectural-comparison-datum-vs-legacy-alternatives)
+
+---
+
+## 1. Executive Summary & Strategic Vision
+
+Modern infrastructure is undergoing a seismic shift:
+1. **The Rise of the AI-Native Era**: Compute has decentralized into specialized GPU clouds (**Neoclouds** such as CoreWeave, Lambda Labs, Together AI, Nebius, RunPod, and Crusoe).
+2. **Hyperscaler Data Gravity**: Core enterprise records, data lakes, and transactional storage remain anchored inside legacy **Hyperscalers** (AWS, GCP, Azure, OCI).
+3. **The Edge & Last-Mile Frontier**: Real-time sensor telemetry, hospital imaging, factory automation, and local developer workstations operate at the **Last Mile**, behind strict corporate firewalls and NATs.
+
+Connecting these three environments today requires fragile VPN overlays, expensive leased physical circuits (AWS Direct Connect, GCP Cloud Interconnect), or exposing internal microservices to the public internet across fragile CDNs.
+
+**Datum Interconnect** provides a neutral, programmatic **Virtual Meet-Me Room (vMMR)**. Built upon open standards—including **IETF MASQUE (RFC 9484 CONNECT-IP)**, **Iroh P2P QUIC**, **Segment Routing over IPv6 (SRv6 uSID)**, **eBPF/XDP Maglev load balancing**, and **BGP EVPN**—Datum enables any node, cluster, or client to connect across dynamically provisioned, cryptographic tunnels. Workloads gain both **deterministic, isolated Private Transit** and **shielded, high-capacity Public Internet Transit** in a single unified network fabric.
+
+```
+ ┌────────────────────────────────────────────────────────┐
+ │ NEOCLOUDS & AI CLOUDS │
+ │ CoreWeave • Lambda • Nebius • Together AI • Crusoe │
+ └───────────────────────────┬────────────────────────────┘
+ │ Dynamic QUIC / MASQUE Tunnels
+ ▼
+┌──────────────────────────────────────────────────────────────────────────────┐
+│ DATUM INTERCONNECT: VIRTUAL MEET-ME ROOM (vMMR) │
+│ │
+│ ┌───────────────────────────────┐ ┌────────────────────────────────┐ │
+│ │ PRIVATE TRANSIT BACKBONE │ │ PUBLIC TRANSIT ENGINES │ │
+│ │ • Galactic SRv6 uSID Mesh │ │ • Per-Site /48 IPv6 Transit │ │
+│ │ • Multi-Tenant Kernel VRFs │ │ • Stateless Maglev DSR (XDP) │ │
+│ │ • BGP EVPN / L3VPN Overlay │ │ • Stateful Sharded NAT66 │ │
+│ │ • Direct Server Return (DSR)│ │ • OWASP CRS WAF & ACME TLS │ │
+│ └───────────────────────────────┘ └────────────────────────────────┘ │
+│ │
+│ 17+ Global Edge PoPs: Ashburn • Silicon Valley • Dallas • │
+│ Frankfurt • London • Amsterdam • Singapore • Tokyo • Sydney │
+└──────────────┬───────────────────────────────┬───────────────────────────────┘
+ │ │
+ Dynamic QUIC │ │ Cloud Interconnect /
+ / MASQUE ▼ ▼ Direct Connect
+┌───────────────────────────────┐ ┌────────────────────────────────────────┐
+│ LAST-MILE & ENTERPRISE │ │ HYPERSCALER ENTERPRISE V вы │
+│ • Private On-Prem Data Centers│ │ • AWS (S3 Lakes, Aurora, IAM) │
+│ • Healthcare & Financial Edge│ │ • GCP (BigQuery, Vertex AI) │
+│ • Telco 5G MEC & Developers │ │ • Microsoft Azure (Entra ID, O365) │
+└───────────────────────────────┘ └────────────────────────────────────────┘
+```
+
+---
+
+## 2. The Strategic Narrative: Solving the Multi-Cloud AI Networking Chasm
+
+### 2.1 The Traditional Meet-Me Room (MMR) & Its Failure Modes
+
+In telecommunications, an **Internet Exchange (IX)** or **Meet-Me Room (MMR)** (such as Equinix DC2 in Ashburn or Interxion in Frankfurt) is a physical facility where telecommunications carriers, ISPs, and large tech firms physically run fiber optic cross-connects between equipment racks.
+
+While physically sound for static backbones, physical MMRs fail the modern cloud and AI ecosystem:
+- **Lead Times**: Running a cross-connect, obtaining Letters of Authorization (LOA-CFA), and provisioning BGP sessions takes **4 to 12 weeks**.
+- **Prohibitive Capex & Port Costs**: Cross-connect monthly recurring charges (MRCs) plus 100Gbps cross-connect fees create an insurmountable financial barrier for emerging AI infrastructure providers.
+- **Physical Boundary**: Software workloads running on serverless platforms, developer machines, or ephemeral GPU nodes in a neocloud cannot plug a physical patch cable into an MMR patch panel.
+
+### 2.2 The Three Fractured Worlds
+
+| Participant | Primary Workloads & Strengths | Networking Limitations & Pain Points |
+| :--- | :--- | :--- |
+| **Neoclouds / AI Clouds**
*(CoreWeave, Lambda, Nebius, Together AI)* | Ultra-dense GPU clusters (NVIDIA H100, H200, B200), high-throughput RoCEv2/InfiniBand fabrics, agile pricing. | **Siloed Islands**: Lack proprietary global fiber backbones. High egress fees when sending inference results back to clients. No native private peering with customer clouds. |
+| **Hyperscalers**
*(AWS, GCP, Azure, OCI)* | Enterprise data lakes (Amazon S3, Google Cloud Storage), transactional databases (RDS, Spanner), enterprise identity (Entra ID). | **Walled Gardens**: Exorbitant data egress taxation. Proprietary interconnects (AWS Direct Connect, Azure ExpressRoute) require complex virtual interfaces (VIFs) and vendor lock-in. |
+| **Last-Mile Providers & Edge**
*(Enterprise On-Prem, Hospitals, Telco Edge)* | Sensitive data (HIPAA/GDPR medical imaging, proprietary factory telemetry), on-prem GPU inference nodes, developer machines. | **Symmetric NAT & Strict Firewalls**: Block inbound connections entirely. Enterprise security forbids opening port forwards. Dynamic IPs make static BGP routing impossible. |
+
+### 2.3 Datum's Value Proposition: "Plaid for Alt-Clouds & Hyperscalers"
+
+Just as **Plaid** moved banking interactions from batch ACH files and proprietary bank integrations to an elegant, universal developer API, **Datum moves cloud interconnection up into software**:
+
+1. **"Go Anywhere" Software Footprint**: Rather than requiring dedicated physical networking appliances, Datum's data plane runs as lightweight, high-performance software: headless Rust agents (`datum-connect`), Go supervisors (`datumctl-connect`), and kernel eBPF/XDP drivers (`galactic-cni`, `galactic-gateway`, `galactic-router`).
+2. **A Neutral "Sits in the Middle" Network**: Datum operates an open network cloud spanning 17+ major global interconnection hubs. Instead of competing with application clouds or acting as a passive CDN, Datum securely interconnects participants.
+3. **Unified Transit**: One single connection provides:
+ - **Private Transit**: Cryptographically isolated, line-rate L3 interconnects directly into any peer VPC.
+ - **Public Transit**: High-throughput IPv4/IPv6 internet egress and DDoS-shielded ingress.
+
+---
+
+## 3. Visual Architecture & Draw.io Diagram Suite
+
+### 3.1 Accessing the Draw.io Assets
+
+The complete visual specification for Datum Interconnect is stored directly within this repository as an interactive, multi-page Draw.io document:
+
+- **Primary Multi-Page File**: [`docs/datum-interconnect-architecture.drawio`](./docs/datum-interconnect-architecture.drawio)
+- **Individual Diagram Exports**:
+ - Page 1: [`docs/diagrams/1-ecosystem-virtual-meet-me-room.drawio`](./docs/diagrams/1-ecosystem-virtual-meet-me-room.drawio)
+ - Page 2: [`docs/diagrams/2-control-and-data-plane-stack.drawio`](./docs/diagrams/2-control-and-data-plane-stack.drawio)
+ - Page 3: [`docs/diagrams/3-practical-deployment-and-packet-flow.drawio`](./docs/diagrams/3-practical-deployment-and-packet-flow.drawio)
+ - Page 4: [`docs/diagrams/4-dynamic-tunnel-and-agent-lifecycle.drawio`](./docs/diagrams/4-dynamic-tunnel-and-agent-lifecycle.drawio)
+
+> [!TIP]
+> **How to Open and Edit:**
+> 1. **VS Code**: Install the official `Hediet Draw.io Integration` extension and click directly on any `.drawio` file.
+> 2. **Web**: Navigate to [app.diagrams.net](https://app.diagrams.net) and select `File > Open From > Device`.
+> 3. **Desktop**: Use the native Draw.io Desktop application.
+
+---
+
+### 3.2 Diagram 1: Ecosystem Overview — The Virtual Meet-Me Room
+
+This diagram illustrates how diverse participants interface with the Datum Virtual Meet-Me Room across Dynamic Tunnels.
+
+```mermaid
+flowchart TB
+ subgraph Neoclouds["1. NEOCLOUDS & AI CLOUDS (Lambda, CoreWeave, Nebius)"]
+ N_GPU["H100/B200 GPU Workloads
(vLLM, PyTorch Training)"]
+ N_AGT["datum-connect Agent
(Iroh P2P + MASQUE CONNECT-IP)"]
+ N_GPU --> N_AGT
+ end
+
+ subgraph Hyperscalers["2. HYPERSCALERS & ENTERPRISE (AWS, GCP, Azure)"]
+ H_DATA["Enterprise S3 Lake / BigQuery
Aurora PostgreSQL / Entra ID"]
+ H_GW["Direct Connect / Partner Gateway
(BGP Peering / 802.1Q VLANs)"]
+ H_DATA <--> H_GW
+ end
+
+ subgraph LastMile["3. LAST-MILE & ENTERPRISE EDGE"]
+ LM_HOST["On-Prem Hospital PACS / Local DB
Developer Laptops (datumctl)"]
+ LM_NAT["Enterprise Symmetric NAT & Firewall
(Strict Outbound UDP 443 Only)"]
+ LM_AGT["datum-connect Client
(STUN Hole Punch / Relay Fallback)"]
+ LM_HOST --> LM_NAT --> LM_AGT
+ end
+
+ subgraph PublicNet["4. PUBLIC INTERNET & CLIENTS"]
+ P_USER["External Web & Mobile Apps
Inference API Consumers"]
+ P_TIER1["Tier-1 IP Transit
(Netactuate, Equinix, Telia, Cogent)"]
+ P_USER <--> P_TIER1
+ end
+
+ subgraph DatumVMMR["DATUM GLOBAL INTERCONNECT: VIRTUAL MEET-ME ROOM (vMMR)"]
+ direction TB
+ subgraph TunnelTier["Dynamic Tunnel Termination Tier"]
+ DT_P2P["Iroh P2P Engine
(ed25519 NodeId, 0-RTT)"]
+ DT_RELAY["Global Iroh Relays
(Stateless UDP 443 Fallback)"]
+ DT_MASQUE["MASQUE Gateways
(RFC 9484 CONNECT-IP)"]
+ end
+
+ subgraph PrivateBackbone["Galactic VPC Private Transit Backbone"]
+ PB_SRV6["SRv6 Micro-SID (uSID) Data Plane
(TC-eBPF Linux Kernel Decap/Encap)"]
+ PB_VRF["Linux Kernel Multi-Tenant VRFs
(Routing Table & Namespace Isolation)"]
+ PB_BGP["Multi-Cluster BGP EVPN
(Embedded GoBGP + FRR Fabric)"]
+ end
+
+ subgraph EdgeTransit["Edge Ingress & Public Transit Engines"]
+ ET_MAGLEV["Stateless Maglev DSR (XDP)
(Line-Rate L4 Load Balancing)"]
+ ET_NAT66["Stateful Sharded NAT66
(Masquerade Egress PAT Engine)"]
+ ET_WAF["Envoy Gateway + OWASP CRS WAF
(Layer 7 Ingress & ACME TLS)"]
+ end
+ end
+
+ %% Interconnections
+ N_AGT == "Dynamic QUIC / MASQUE" ==> TunnelTier
+ LM_AGT == "Iroh Hole Punch / MASQUE" ==> TunnelTier
+ TunnelTier == "VRF Injection / SRv6 Encap" ==> PrivateBackbone
+ PrivateBackbone == "Private Transit (SRv6 / 802.1Q)" ==> H_GW
+ PrivateBackbone == "Default Route (egress_sid)" ==> EdgeTransit
+ EdgeTransit == "Per-Site /48 & Anycast BGP" ==> P_TIER1
+
+ style DatumVMMR fill:#0B192C,stroke:#0284C7,stroke-width:3px,color:#38BDF8
+ style PrivateBackbone fill:#1E1B4B,stroke:#6366F1,stroke-width:2px,color:#EEF2FF
+ style TunnelTier fill:#172554,stroke:#3B82F6,stroke-width:2px,color:#DBEAFE
+ style EdgeTransit fill:#422006,stroke:#EAB308,stroke-width:2px,color:#FEF08A
+ style Neoclouds fill:#2E1065,stroke:#8B5CF6,stroke-width:2px,color:#EDE9FE
+ style Hyperscalers fill:#451A03,stroke:#F59E0B,stroke-width:2px,color:#FEF3C7
+ style LastMile fill:#064E3B,stroke:#10B981,stroke-width:2px,color:#ECFDF5
+ style PublicNet fill:#4C0519,stroke:#F43F5E,stroke-width:2px,color:#FFF1F2
+```
+
+---
+
+### 3.3 Diagram 2: Layered Technical Architecture & Protocol Stack
+
+This diagram breaks down the software stack from user-facing Kubernetes CRDs down to bare-metal hardware and optical interconnects.
+
+```mermaid
+graph TD
+ subgraph L1["Layer 1: Workloads & User Intent"]
+ W_NEO["Neocloud AI Compute Node
(PyTorch, vLLM Worker)"]
+ W_NIC["NetworkInterfaceClaim
(Decoupled Compute NIC Request)"]
+ W_HYPER["Hyperscaler App
(AWS RDS Postgres, S3 Lake)"]
+ W_EDGE["Edge / Local Developer
(datumctl connect tunnel)"]
+ end
+
+ subgraph L2["Layer 2: Declarative Control Plane (Kubernetes CRDs)"]
+ CRD_CONN["Connector & ConnectorClass
(Liveness, Keys, Capabilities)"]
+ CRD_AD["ConnectorAdvertisement
(Exported Subnets & L4 Ports)"]
+ CRD_ATTACH["ConnectorAttachment & VPC
(VRF Binding & IPAM Allocation)"]
+ CRD_GW["NetworkGateway & NetworkRule
(VIP & Maglev DSR Rules)"]
+ CRD_WAF["TrafficProtectionPolicy
(OWASP CRS Paranoia Levels)"]
+ end
+
+ subgraph L3["Layer 3: Dynamic Tunnel & Connectivity (Iroh + MASQUE)"]
+ T_AGENT["datum-connect Agent
(Rust lib + Go supervisor)"]
+ T_RELAY["Global Iroh Relay Mesh
(Port 443 Fallback)"]
+ T_MASQUE["IETF MASQUE Suite
(RFC 9484 CONNECT-IP)"]
+ T_IPAM["Dynamic IP & Route Injection
(Capsule Frame Updates)"]
+ end
+
+ subgraph L4["Layer 4: High-Performance Overlay (Kernel & eBPF)"]
+ K_SRV6["SRv6 Micro-SID (uSID) Engine
(TC-BPF Encap/Decap in Kernel)"]
+ K_VRF["Linux Kernel VRFs
(Per-Tenant Cryptographic Partition)"]
+ K_XDP["Stateless Maglev DSR (XDP)
(Native Driver Hook, Zero-Copy LB)"]
+ K_NAT["Sharded Stateful NAT66 Egress
(Atomic Linear-Probe PAT)"]
+ end
+
+ subgraph L5["Layer 5: Underlay Fabric & Physical Transit"]
+ U_FRR["fabric-router (FRR eBGP)
(Physical Inter-Node Loopbacks)"]
+ U_EVPN["GoBGP EVPN L3VPN Mesh
(Fleet-Wide Route Propagation)"]
+ U_BGP48["Per-Site /48 BGP Routing
(Unicast IPv6 Identity per PoP)"]
+ U_PHY["Physical Peering & Colocation
(Equinix, Netactuate 100G/400G Links)"]
+ end
+
+ L1 --> L2
+ L2 --> L3
+ L3 --> L4
+ L4 --> L5
+
+ style L1 fill:#1E293B,stroke:#475569,stroke-width:2px,color:#F8FAFC
+ style L2 fill:#0F172A,stroke:#0284C7,stroke-width:2px,color:#F0F9FF
+ style L3 fill:#172554,stroke:#2563EB,stroke-width:2px,color:#EFF6FF
+ style L4 fill:#311042,stroke:#A855F7,stroke-width:2px,color:#FAF5FF
+ style L5 fill:#1C1917,stroke:#78716C,stroke-width:2px,color:#F5F5F4
+```
+
+---
+
+### 3.4 Diagram 3: Concrete Practical Deployment & Packet Flow Traces
+
+This diagram depicts an end-to-end practical scenario: a CoreWeave GPU cluster communicating with an AWS private PostgreSQL database and HuggingFace over public transit.
+
+```mermaid
+sequenceDiagram
+ autonumber
+ participant GPU as CoreWeave GPU Pod
(10.100.1.50)
+ participant CoreNode as CoreWeave Node
(datum-connect)
+ participant DatumPoP as Datum Ashburn Edge PoP
(fc00:datum:ashburn::)
+ participant AWS as AWS Direct Connect / VPC
(172.31.42.10)
+ participant Web as Public Internet / HuggingFace
(2600:9000:20::1)
+
+ Note over GPU, AWS: FLOW 1: PRIVATE CROSS-CLOUD TRANSIT (Neocloud GPU -> AWS RDS Database)
+ GPU->>CoreNode: TCP SYN to 172.31.42.10:5432 (Postgres)
+ CoreNode->>CoreNode: VRF 1001 route match -> datum0 TUN interface
+ CoreNode->>DatumPoP: MASQUE CONNECT-IP capsule over QUIC (UDP 443)
+ DatumPoP->>DatumPoP: Decap QUIC -> Translate to SRv6 uSID [fc00:datum:aws::1]
+ DatumPoP->>AWS: Forward across Private Interconnect (VLAN 400)
+ AWS->>AWS: Direct Connect Gateway delivers private packet to RDS
+ Note right of AWS: RDS receives packet from 10.100.1.50 without NAT rewriting!
+
+ Note over GPU, Web: FLOW 2: PUBLIC TRANSIT EGRESS WITH STATEFUL NAT66 (Neocloud GPU -> Internet)
+ GPU->>CoreNode: HTTPS GET to HuggingFace (2600:9000:20::1:443)
+ CoreNode->>DatumPoP: Forward across dynamic tunnel via default route (egress_sid)
+ DatumPoP->>DatumPoP: galactic-nat66 allocates PAT port: 2607:ed40:1000::masq:42188
+ DatumPoP->>Web: Transmit plain IPv6 over Tier-1 Transit (Netactuate)
+ Web-->>DatumPoP: Reply packet to 2607:ed40:1000::masq:42188
+ DatumPoP->>DatumPoP: LRU Hash match -> DNAT back to 10.100.1.50 -> Wrap in SRv6
+ DatumPoP-->>CoreNode: Tunnel return capsule over QUIC
+ CoreNode-->>GPU: Deliver payload to GPU Pod
+
+ Note over Web, GPU: FLOW 3: PUBLIC INGRESS VIA STATELESS MAGLEV DSR (Client -> Anycast VIP)
+ Web->>DatumPoP: Client HTTP request to Anycast VIP (2607:ed40:cafe::100)
+ DatumPoP->>DatumPoP: XDP Maglev hash ring selects backend: 10.100.1.50
+ DatumPoP->>CoreNode: Push outer SRv6 header -> Forward (Zero packet payload rewrite)
+ CoreNode->>GPU: Deliver original client packet unmodified
+ GPU-->>Web: Direct Server Return (DSR): GPU Pod responds directly to client IP!
+ Note over GPU, Web: Bypasses the gateway on return — eliminates bandwidth bottlenecks!
+```
+
+---
+
+### 3.5 Diagram 4: Dynamic Tunnel Architecture & Agent Lifecycle
+
+This diagram illustrates how the `datum-connect` agent initializes, traverses enterprise NATs, negotiates MASQUE tunnels, and handles seamless failover.
+
+```mermaid
+stateDiagram-v2
+ [*] --> Phase1_Init: datumctl connect tunnel run
+
+ state Phase1_Init {
+ SupervisorSpawn: Go Supervisor spawns Rust datum-connect child
+ KeyGen: Generate/Load Ed25519 Keypair (~/.local/share/datumctl)
+ OAuth: Resolve Token via DATUM_CREDENTIALS_HELPER
+ CRDBind: Reconcile Connector CRD with PublicKey details
+ SupervisorSpawn --> KeyGen --> OAuth --> CRDBind
+ }
+
+ Phase1_Init --> Phase2_Traversal: Credentials & Identity Ready
+
+ state Phase2_Traversal {
+ STUNProbe: Probe local interfaces & Contact Datum Home Relay
+ HolePunch: Execute Simultaneous UDP Hole Punch with Peer
+ PathDecision: Evaluate Path Candidates
+ DirectP2P: Upgrade to Direct 0-RTT P2P QUIC Link
+ RelayFallback: Fallback to Stateless Iroh Relay on UDP 443
+ STUNProbe --> HolePunch --> PathDecision
+ PathDecision --> DirectP2P: Hole Punch Succeeded
+ PathDecision --> RelayFallback: Symmetric / Enterprise NAT
+ }
+
+ Phase2_Traversal --> Phase3_MASQUE: QUIC Transport Established
+
+ state Phase3_MASQUE {
+ ConnectIP: Issue HTTP/3 Extended CONNECT-IP (RFC 9484)
+ CapCheck: Validate Connector.spec.capabilities (CONNECT-IP, TCP)
+ CapsuleAssign: Gateway returns ADDRESS_ASSIGN & ROUTE_ADVERTISEMENT
+ TunAlloc: Create Virtual TUN interface (datum0) & Bind to Kernel VRF
+ ConnectIP --> CapCheck --> CapsuleAssign --> TunAlloc
+ }
+
+ Phase3_MASQUE --> Phase4_Runtime: Tunnel Active & Routes Live
+
+ state Phase4_Runtime {
+ Heartbeat: Async HeartbeatAgent renews k8s coordination Lease (LeaseRef)
+ TrafficForward: Forward L3 IP capsules across QUIC datagrams
+ ConnMigration: Wi-Fi to Cellular handoff via QUIC Connection ID
+ Heartbeat --> TrafficForward
+ TrafficForward --> ConnMigration
+ }
+
+ Phase4_Runtime --> Phase2_Traversal: Path Degraded (Auto-Reconnect)
+ Phase4_Runtime --> [*]: SIGTERM / Graceful Shutdown (Clean GC)
+```
+
+---
+
+## 4. Deep-Dive: Core Interconnect Capabilities
+
+### 4.1 Dynamic Tunnels (Iroh + IETF MASQUE Convergence)
+
+Datum's dynamic tunneling layer combines the P2P NAT traversal capabilities of **Iroh** with the IETF standardization of **MASQUE (Multiplexed Application Substrate over QUIC Encryption)**.
+
+```
+┌─────────────────────────────────────────────────────────────────────────┐
+│ Current vs Future State │
+│ │
+│ Iroh Native Layer IETF MASQUE Standard Layer │
+│ ├─ Best-in-class NAT hole punch ├─ RFC 9484 CONNECT-IP (L3 VPN) │
+│ ├─ Ed25519 Cryptographic NodeID ├─ RFC 9298 CONNECT-UDP (Relaying) │
+│ ├─ Global Relay Fallback ├─ HTTP CONNECT-TCP (L4 Proxying) │
+│ └─ Custom QUIC Framing └─ Native Browser / WebTransport Ready │
+│ │
+│ Convergence Advantage: Iroh provides the connectivity engine; │
+│ MASQUE provides the standards-based wire protocol. │
+└─────────────────────────────────────────────────────────────────────────┘
+```
+
+#### Key Technical Attributes:
+1. **Zero-Configuration NAT Traversal**: Enterprise edge nodes and local developer laptops rarely possess public IP addresses. Iroh's STUN discovery probes local and reflective WAN candidates, executing bidirectional hole punching.
+2. **Symmetric Firewall Resilience**: When connecting through strict enterprise firewalls (which assign randomized port mappings), the agent falls back to Datum's global relay mesh over standard **UDP port 443**.
+3. **Cryptographic Identity**: Tunnels are not bound to fleeting IP addresses. Every endpoint is identified by an **Ed25519 Public Key**. Mutual TLS 1.3 ensures zero man-in-the-middle attacks or BGP hijacking exposure.
+4. **QUIC Connection Migration**: When an edge node shifts network interfaces (e.g., from fixed broadband to cellular backup), QUIC connection IDs ensure that **in-flight TCP/IP sessions across the MASQUE tunnel do not drop**.
+
+---
+
+### 4.2 Private Transit: The Galactic VPC Backbone (SRv6 uSID + VRF)
+
+Once traffic enters a Datum Edge PoP, it is bridged into **Galactic VPC**, Datum's software-defined multi-tenant backbone.
+
+```
+Client IP Packet (Inner) Galactic SRv6 uSID Packet (Outer)
+┌────────────────────────┐ ┌──────────────────────────────────────────────┐
+│ Src: 10.100.1.50 │ SRv6 │ Outer IPv6: fc00:datum:ashburn:: │
+│ Dst: 172.31.42.10 │ ──────► │ ➔ fc00:datum:aws::1 │
+│ Payload (TCP 5432) │ Bridge │ SRH: [uSID: tenant-alpha-vrf:egress] │
+└────────────────────────┘ │ Inner Payload: [Original Client IP Packet] │
+ └──────────────────────────────────────────────┘
+```
+
+#### Architectural Pillars:
+- **Segment Routing over IPv6 (SRv6 Micro-SID / uSID)**: Galactic replaces bloated encapsulation protocols (Geneve, VXLAN) with native IPv6 extension headers. Routing paths, service functions, and tenant identifiers are packed into compact 16-bit or 32-bit Micro-SIDs (`uSID`).
+- **Kernel-Level Multi-Tenancy (VRFs)**: Isolation is enforced at the Linux kernel level via Virtual Routing and Forwarding (`VRF`) tables. Multiple tenants can utilize identical RFC 1918 private subnets (`10.0.0.0/16`) without address collision.
+- **BGP EVPN Control Plane**: Embedded in `galactic-router` is an in-process **GoBGP** server. It automatically originates and distributes EVPN Type-5 IP-Prefix routes across clusters and sites over an underlay fabric managed by **FRR (`fabric-router`)**.
+
+---
+
+### 4.3 High-Performance Ingress: Stateless Maglev DSR
+
+For inbound traffic (e.g., external API consumers querying an AI inference cluster), Datum uses **Stateless Maglev Direct Server Return (DSR)** implemented via native **eBPF/XDP** in `galactic-gateway`.
+
+```
+External Client Datum Edge Gateway Neocloud GPU Backend
+ │ │ │
+ │─── 1. Ingress Request to VIP ──────►│ │
+ │ (Src: Client, Dst: VIP) │ │
+ │ │─── 2. Consistent Hash (Maglev) ────►│
+ │ │ (Outer SRv6 Encap; NO NAT!) │
+ │ │ (Original Client IP Preserved) │
+ │ │
+ │◄── 3. DIRECT SERVER RETURN (DSR) ─────────────────────────────────────────│
+ │ (Worker transmits response directly to Client IP; Gateway bypassed!)
+```
+
+#### Why Maglev DSR Outperforms Traditional Load Balancers:
+1. **Stateless Scalability**: Traditional load balancers maintain a stateful connection tracking table (`conntrack`). When handling millions of concurrent LLM streaming requests, state tables exhaust memory. Maglev uses a deterministic, consistent-hash permutation lookup table: any gateway node receiving a packet independently computes the identical backend target without sharing state.
+2. **Zero Return Bottleneck (DSR)**: In standard reverse proxies, return traffic (which is typically 10x–100x larger than request traffic) must funnel back through the load balancer. Under Datum's DSR design, **the backend replies directly to the client**. The gateway node processes only the lightweight inbound request.
+3. **True Client IP Preservation**: Because the edge gateway performs no SNAT rewriting, backend workloads see the client's genuine IP address, critical for rate limiting, geo-fencing, and audit logging.
+
+---
+
+### 4.4 Public Internet Transit: BGP /48 Allocations & Stateful NAT66 Egress
+
+In addition to private multi-cloud routing, Datum Interconnect provides fully routed **Public Internet Transit**:
+
+#### Per-Site /48 IPv6 BGP Routing
+Datum allocates a dedicated `/48` IPv6 prefix to each edge location (e.g., Ashburn, Frankfurt, San Jose) advertised directly to Tier-1 upstream providers (Netactuate, Equinix, Lumen). This guarantees:
+- **Global Unicast Reachability**: Services like `iroh-relay` have stable, globally routable IPv6 endpoints.
+- **BGP Optimization**: Traffic destined for a specific edge PoP routes across the optimal Tier-1 path rather than bouncing unpredictably across transcontinental anycast paths.
+
+#### Stateful Sharded NAT66 Egress
+For private VPC workloads needing outbound internet access (e.g., pulling weights from HuggingFace, accessing external APIs):
+- Outbound packets matching `::/0` route to the gateway's `egress_sid`.
+- The `galactic-nat66` kernel tier dynamically masquerades private ULA/VPC addresses to a public Global Unicast Address (`GUA`) using an atomic, linear-probe port reservation table.
+- Return traffic is automatically DNAT'd and routed back over the dynamic tunnel to the correct originating worker.
+
+---
+
+## 5. Declarative Kubernetes Control Plane (CRD Model)
+
+Datum Interconnect is managed entirely through Kubernetes Custom Resources defined in the `networking.datumapis.com` API group.
+
+### 5.1 API Resource Relationship Topology
+
+```
+┌─────────────────────────────────────────────────────────────────────────────┐
+│ Kubernetes Control Plane (Datum Cloud) │
+│ │
+│ ┌───────────────────────┐ ┌──────────────────────┐ │
+│ │ Connector │ │ VPC │ │
+│ │ (Client Device / Node)│ │ (Galactic VPC) │ │
+│ └───────────┬───────────┘ └──────────┬───────────┘ │
+│ │ │ │
+│ ▼ ▼ │
+│ ┌───────────────────────┐ ┌──────────────────────┐ │
+│ │ ConnectorAdvertisement│ │ ConnectorAttachment │ │
+│ │ (Exported Subnets/L4) │ │ (Dynamic Binding) │ │
+│ └───────────────────────┘ └──────────┬───────────┘ │
+│ │ │
+│ ▼ │
+│ ┌───────────────────────┐ ┌──────────────────────┐ │
+│ │ NetworkInterfaceClaim │◄───────────────────────┤ NetworkInterface │ │
+│ │ (Compute Workload) │ Bound by Controller │ (NIC Facts & IPAM) │ │
+│ └───────────────────────┘ └──────────────────────┘ │
+└─────────────────────────────────────────────────────────────────────────────┘
+```
+
+### 5.2 Production CRD Specifications
+
+#### 1. Connector Definition (`networking.datumapis.com/v1alpha1`)
+Represents an external client, server, or neocloud host registering into the fabric.
+
+```yaml
+apiVersion: networking.datumapis.com/v1alpha1
+kind: Connector
+metadata:
+ name: coreweave-gpu-cluster-01
+ namespace: tenant-alpha
+ annotations:
+ datum.net/device-name: "neocloud-ash-h100"
+spec:
+ connectorClassName: datum-connect
+ capabilities:
+ - type: MASQUE
+ connectTCP:
+ disabled: false
+ - type: CONNECT-IP
+ - type: CONNECT-UDP
+status:
+ conditions:
+ - type: Ready
+ status: "True"
+ lastTransitionTime: "2026-09-03T18:00:00Z"
+ connectionDetails:
+ type: PublicKey
+ publicKey:
+ id: 2ovpybgj3snjmchns44pfn6dbwmdiu4ogfd66xyu72ghexllv6hq
+ homeRelay: https://relay.ash.datum.net
+ leaseRef:
+ name: connector-lease-coreweave-gpu-cluster-01
+ namespace: tenant-alpha
+```
+
+#### 2. ConnectorAttachment (`networking.datumapis.com/v1alpha1`)
+Attaches the connector to an isolated Galactic VPC with dynamic IP allocation and route authorization.
+
+```yaml
+apiVersion: networking.datumapis.com/v1alpha1
+kind: ConnectorAttachment
+metadata:
+ name: attach-coreweave-to-production-vpc
+ namespace: tenant-alpha
+spec:
+ connectorRef:
+ name: coreweave-gpu-cluster-01
+ vpcRef:
+ name: production-vpc
+ ipAllocation:
+ mode: Dynamic
+ allowedRoutes:
+ - 172.31.0.0/16 # AWS VPC Private Subnets
+ - 10.200.0.0/16 # On-Premises Healthcare Datacenter
+ - ::/0 # Public Internet Egress via NAT66
+status:
+ phase: Connected
+ assignedIP: 10.100.1.50
+```
+
+#### 3. ConnectorAdvertisement (`networking.datumapis.com/v1alpha1`)
+Advertises reachable subnets or Layer 4 endpoints hosted behind the connector.
+
+```yaml
+apiVersion: networking.datumapis.com/v1alpha1
+kind: ConnectorAdvertisement
+metadata:
+ name: advertise-coreweave-vllm
+ namespace: tenant-alpha
+spec:
+ connectorRef:
+ name: coreweave-gpu-cluster-01
+ subnets:
+ - cidr: 10.100.1.0/24
+ layer4:
+ - protocol: TCP
+ service:
+ name: vllm-api
+ port: 8000
+ address: 10.100.1.50
+```
+
+#### 4. NetworkInterfaceClaim & NetworkInterface (`networking.datumapis.com/v1alpha`)
+Decouples compute instances from networking internals, ensuring retained IP identity across pod restarts.
+
+```yaml
+apiVersion: networking.datumapis.com/v1alpha
+kind: NetworkInterfaceClaim
+metadata:
+ name: vllm-worker-nic-claim
+ namespace: tenant-alpha
+spec:
+ networkRef:
+ name: production-vpc
+---
+apiVersion: networking.datumapis.com/v1alpha
+kind: NetworkInterface
+metadata:
+ name: vllm-worker-nic-claim-nic
+ namespace: tenant-alpha
+status:
+ phase: Bound
+ addresses:
+ - ip: 10.100.1.50/24
+ - ip: fd00:datum:tenant1::50/64
+ gateway: 10.100.1.1
+ mtu: 1500
+```
+
+#### 5. NetworkGateway & NetworkRule (`networking.datumapis.com/v1alpha`)
+Configures the edge XDP Maglev DSR load-balancing ingress.
+
+```yaml
+apiVersion: networking.datumapis.com/v1alpha
+kind: NetworkGateway
+metadata:
+ name: global-api-gateway
+ namespace: tenant-alpha
+spec:
+ publicInterface: eth0
+status:
+ anycastVIP: 2607:ed40:cafe::100
+ srv6Address: fc00:datum:ashburn::gateway-01
+---
+apiVersion: networking.datumapis.com/v1alpha
+kind: NetworkRule
+metadata:
+ name: vllm-ingress-rule
+ namespace: tenant-alpha
+spec:
+ gatewayRef:
+ name: global-api-gateway
+ protocol: TCP
+ port: 443
+ targetBackendPort: 8000
+ vpcRef:
+ name: production-vpc
+ backends:
+ - ip: 10.100.1.50
+ weight: 100
+```
+
+---
+
+## 6. Concrete Deployment Blueprint: What It Looks Like in Practice
+
+### 6.1 Real-World Reference Scenario
+
+An AI startup has deployed:
+1. **Neocloud**: CoreWeave cluster running 512x NVIDIA H100 GPUs running distributed vLLM model inference (`10.100.1.0/24`).
+2. **Hyperscaler**: AWS `us-east-1` VPC hosting production PostgreSQL databases (`172.31.42.10`) and Amazon S3 checkpoint buckets.
+3. **Last-Mile Provider**: An on-premises enterprise data center (`10.200.0.0/16`) streaming raw proprietary documents to the GPU cluster for fine-tuning.
+
+### 6.2 Edge Node & Workload Deployment Steps
+
+#### Step 1: Install the Datum Connect CLI & Plugin
+On the Neocloud GPU host / VM:
+
+```bash
+# 1. Install datumctl
+curl -sSL https://get.datum.net | bash
+
+# 2. Install the Datum Connect plugin (downloads Go supervisor + Rust engine)
+datumctl plugin install datum-cloud/connect
+
+# Binaries installed to ~/.datumctl/plugins:
+# - datumctl-connect (Go supervisor)
+# - datum-connect (Rust headless Iroh + MASQUE engine)
+```
+
+#### Step 2: Launch the Dynamic Tunnel Daemon
+
+```bash
+# Run the tunnel supervisor in the background
+datumctl connect tunnel run \
+ --project-id "prj_tenant_alpha" \
+ --name "coreweave-gpu-cluster-01" \
+ --vpc "production-vpc" \
+ --export-subnet "10.100.1.0/24" \
+ --daemon
+```
+
+#### Step 3: Production Systemd Service Unit
+For automated host persistence, `datumctl` generates a standard systemd service:
+
+```ini
+# /etc/systemd/system/datum-connect.service
+[Unit]
+Description=Datum Connect Dynamic Tunnel Daemon
+After=network.target network-online.target
+Wants=network-online.target
+
+[Service]
+Type=simple
+User=datum
+Group=datum
+WorkingDirectory=/var/lib/datum
+ExecStart=/usr/local/bin/datumctl-connect tunnel run \
+ --project-id prj_tenant_alpha \
+ --name coreweave-gpu-cluster-01 \
+ --vpc production-vpc \
+ --log-dir /var/log/datum
+Restart=always
+RestartSec=5s
+LimitNOFILE=65536
+Environment="DATUM_CREDENTIALS_HELPER=/usr/local/bin/datum-token-helper"
+
+[Install]
+WantedBy=multi-user.target
+```
+
+```bash
+systemctl daemon-reload
+systemctl enable --now datum-connect
+```
+
+#### Step 4: Verify Tunnel Health & Kernel VRF Status
+
+```bash
+datumctl connect tunnel list
+```
+
+**Console Output:**
+```text
+ID NAME STATUS MODE LOCAL IP ASSIGNED VIP PEER RELAY
+tun_98a1 coreweave-gpu-cluster-01 READY MASQUE/P2P 198.51.100.22 10.100.1.50/24 relay.ash.datum.net
+```
+
+```bash
+# Check kernel VRF routing table
+ip route show vrf vrf-tenant-alpha
+```
+```text
+default via 10.100.1.1 dev datum0 proto datum
+172.31.0.0/16 via 10.100.1.1 dev datum0 proto datum
+10.200.0.0/16 via 10.100.1.1 dev datum0 proto datum
+```
+
+---
+
+### 6.3 Step-by-Step Packet Traces Across the Interconnect
+
+#### Flow A: Private Cross-Cloud Transit (Neocloud GPU ➔ AWS RDS Database)
+1. **Application Socket**: PyTorch worker on CoreWeave initiates TCP handshake to `172.31.42.10:5432` (AWS RDS).
+2. **VRF Route Match**: Host kernel identifies destination within `172.31.0.0/16`; directs packet to virtual interface `datum0`.
+3. **MASQUE Encapsulation**: `datum-connect` encapsulates packet into an RFC 9484 `CONNECT-IP` capsule frame, transported inside an encrypted QUIC datagram (UDP 443) to Datum Ashburn Edge PoP.
+4. **SRv6 uSID Translation**: The PoP ingress gateway decapsulates the QUIC datagram and prepends an outer IPv6 Segment Routing header:
+ ```text
+ Outer IPv6 Header:
+ Src: fc00:datum:ashburn::gateway-01
+ Dst: fc00:datum:aws::direct-connect-01
+ SRH: [uSID: tenant-alpha-vrf-1001]
+ Inner Packet:
+ Src: 10.100.1.50
+ Dst: 172.31.42.10
+ ```
+5. **Backbone Optical Transit**: Packet traverses Datum's private fiber underlay over eBGP routing fabric (`fabric-router`).
+6. **Delivery to AWS**: Datum's AWS Interconnect Gateway strips the outer SRv6 header and transmits the raw IP packet across the Direct Connect 802.1Q VLAN trunk.
+7. **Database Response**: PostgreSQL receives a clean packet originating directly from `10.100.1.50`. No NAT rewriting occurs.
+
+#### Flow B: Public Internet Egress (Neocloud GPU ➔ HuggingFace Model Hub)
+1. **Outbound Request**: GPU worker queries `2600:9000:20::1` (HuggingFace Hub) over HTTPS port 443.
+2. **Default Route Match**: Packet matches `::/0` default route; routed over the dynamic tunnel to Datum Edge PoP matching `egress_sid`.
+3. **Stateful NAT66 Masquerade**: Datum's `galactic-nat66` kernel engine:
+ - Allocates an ephemeral source port from its LRU connection table.
+ - Translates source IP to the PoP's publicly routable IPv6 address: `2607:ed40:1000::masq:42188`.
+4. **Internet Transit**: Packet leaves Datum's uplink via Netactuate / Equinix Tier-1 IP Transit.
+5. **Return Path**: HuggingFace replies to `2607:ed40:1000::masq:42188`. The edge gateway looks up the LRU table row, restores destination to `10.100.1.50`, encapsulates into SRv6/MASQUE, and routes back to the CoreWeave host.
+
+#### Flow C: Public Ingress via Stateless Maglev DSR (External Consumer ➔ Neocloud API)
+1. **Client Request**: End user connects to Datum Anycast VIP: `2607:ed40:cafe::100:443`.
+2. **Edge Ingress**: Anycast routes packet to the closest Datum Edge PoP (e.g., Ashburn).
+3. **XDP Maglev Hashing**: The native eBPF XDP hook in `galactic-gateway` hashes the packet's 5-tuple into its Maglev lookup table, selecting backend `10.100.1.50`.
+4. **SRv6 Encapsulation (No NAT)**: Gateway pushes an outer SRv6 header addressed to the backend's uSID. **Neither the client IP nor the payload is modified**.
+5. **Direct Server Return (DSR)**: The CoreWeave GPU Pod receives the request and generates the HTTP response. Crucially, **the backend transmits the reply directly back to the client's public IP address** via Datum public transit egress. The gateway is completely bypassed on return, preventing gateway link saturation!
+
+---
+
+## 7. Operational Reliability, Security & Zero-Trust Architecture
+
+### 7.1 Cryptographic Identity & Zero Inbound Ports
+- **Ed25519 Mutual Authentication**: Traditional IPsec preshared keys (PSKs) and static IP ACLs are eliminated. Every node authenticates with asymmetric Ed25519 keypairs.
+- **Fail-Closed Firewall Posture**: Edge nodes require **zero open inbound ports** (`LISTEN`). All tunnels originate outbound over UDP port 443, bypassing stateful enterprise inspection devices.
+
+### 7.2 Liveness & Failure Recovery (LeaseRef)
+- **Kubernetes Lease Renewal**: The Rust tunnel agent runs an asynchronous `HeartbeatAgent` that continuously renews a `coordination.k8s.io/v1 Lease` object recorded in `Connector.status.leaseRef`.
+- **Sub-Second Failover**: If an edge node crashes or loses connectivity, its lease expires. The `ConnectorReconciler` marks the connector `Ready: False`. Galactic BGP withdraws the associated EVPN routes within 500ms, preventing traffic blackholing.
+
+### 7.3 Layer 7 Ingress Protection (OWASP CRS ModSecurity WAF)
+For public-facing ingress endpoints, Datum integrates Envoy Gateway with OWASP Core Rule Set (CRS) protection via `TrafficProtectionPolicy`:
+- **SQL Injection (SQLi) & Remote Code Execution (RCE) Filtering**
+- **Adaptive Rate Limiting & DDoS Shielding**
+- **Automated TLS Certificate Lifecycle** via Let's Encrypt / ACME integration
+
+---
+
+## 8. Architectural Comparison: Datum vs. Legacy Alternatives
+
+| Feature / Dimension | Traditional Telco MPLS / Leased Lines | Hyperscaler Cloud Interconnects (DirectConnect / ExpressRoute) | P2P Mesh VPN Overlays (Tailscale / ZeroTier) | Datum Interconnect (vMMR) |
+| :--- | :--- | :--- | :--- | :--- |
+| **Provisioning Lead Time** | 30–90 Days (Physical circuits) | 14–30 Days (LOA-CFA + Cross-connects) | Minutes (Software client) | **Instantaneous (Declarative CRDs + CLI)** |
+| **Neocloud / Alt-Cloud Peering** | ❌ None (Requires colocation cage) | ❌ None (Locked to hyperscaler VPC) | ⚠️ Unmanaged P2P (No BGP / No SLA) | ** Native (Full L3/L4 Peering & SRv6 Backbone)** |
+| **Data Plane Performance** | High (Dedicated optical) | High (Dedicated 10G/100G) | Moderate (Kernel context switching) | **Line-Rate (Native eBPF/XDP + SRv6 uSID)** |
+| **Transit Modality** | Private Only | Private Only | Private Only | **Unified Private Transit + Public Internet Transit** |
+| **Ingress Load Balancing** | External Appliance (F5, NetScaler) | Hyperscaler ALB/NLB (High cost) | None (Point-to-point only) | **Stateless Maglev DSR in eBPF/XDP** |
+| **Firewall & NAT Traversal** | ❌ Fails (Requires static public IPs) | ❌ Fails (Requires dedicated VLANs) | Good (STUN / DERP relays) | ** Best-in-Class (Iroh P2P + MASQUE UDP 443)** |
+| **Public Transit Egress** | ❌ Separate ISP contract needed | ❌ Expensive hyperscaler egress tax | ❌ Exit nodes bottlenecked | ** Sharded Stateful NAT66 via Tier-1 Backbones** |
+| **Multi-Tenant Isolation** | MPLS L3VPN (Complex PE/P routers) | Proprietary VPC Peering / TGW | Network ACLs | **Hardware-Grade Linux Kernel VRF + BGP EVPN** |
+
+---
+
+## Summary & Next Steps
+
+Datum Interconnect redefines cloud networking by replacing physical patch panels and vendor-locked circuits with a high-performance, cryptographic software fabric. Whether interconnecting multi-thousand GPU clusters across Neoclouds, federating enterprise datasets from Hyperscalers, or streaming real-time edge telemetry from the Last Mile, Datum provides a unified, programmable home for modern distributed systems.
+
+### Related Documentation & Code References
+- **Multi-Page Architecture Diagram**: [`docs/datum-interconnect-architecture.drawio`](./docs/datum-interconnect-architecture.drawio)
+- **Datum Connect Daemon Source**: [`datum-connect-daemon/connect/`](https://github.com/datum-cloud/datum-connect-daemon)
+- **Galactic SRv6 & Gateway Data Plane**: [`galactic/`](https://github.com/datum-cloud/galactic)
+- **Network Services Operator CRDs**: [`network-services-operator/`](https://github.com/datum-cloud/network-services-operator)
+- **Datum Website Product Specification**: [`datum.net-website/src/pages/platform/connect.astro`](https://github.com/datum-cloud/datum.net)
diff --git a/docs/datum-interconnect-architecture.drawio b/docs/datum-interconnect-architecture.drawio
new file mode 100644
index 0000000..42921a3
--- /dev/null
+++ b/docs/datum-interconnect-architecture.drawio
@@ -0,0 +1,398 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/datum-interconnect-offering.md b/docs/datum-interconnect-offering.md
new file mode 100644
index 0000000..5872eaa
--- /dev/null
+++ b/docs/datum-interconnect-offering.md
@@ -0,0 +1,801 @@
+# Datum Interconnect: The Neutral Virtual Meet-Me Room (vMMR) for the AI & Multi-Cloud Era
+
+> **A unified, software-defined interconnection platform connecting Neoclouds, Hyperscalers, and Last-Mile Providers across Dynamic Tunnels—delivering seamless Private VPC Backbones and Public Internet Transit.**
+
+---
+
+## Table of Contents
+
+- [1. Executive Summary & Strategic Vision](#1-executive-summary--strategic-vision)
+- [2. The Strategic Narrative: Solving the Multi-Cloud AI Networking Chasm](#2-the-strategic-narrative-solving-the-multi-cloud-ai-networking-chasm)
+ - [2.1 The Traditional Meet-Me Room (MMR) & Its Failure Modes](#21-the-traditional-meet-me-room-mmr--its-failure-modes)
+ - [2.2 The Three Fractured Worlds](#22-the-three-fractured-worlds)
+ - [2.3 Datum's Value Proposition: "Plaid for Alt-Clouds & Hyperscalers"](#23-datums-value-proposition-plaid-for-alt-clouds--hyperscalers)
+- [3. Visual Architecture & Draw.io Diagram Suite](#3-visual-architecture--drawio-diagram-suite)
+ - [3.1 Accessing the Draw.io Assets](#31-accessing-the-drawio-assets)
+ - [3.2 Diagram 1: Ecosystem Overview — The Virtual Meet-Me Room](#32-diagram-1-ecosystem-overview--the-virtual-meet-me-room)
+ - [3.3 Diagram 2: Layered Technical Architecture & Protocol Stack](#33-diagram-2-layered-technical-architecture--protocol-stack)
+ - [3.4 Diagram 3: Concrete Practical Deployment & Packet Flow Traces](#34-diagram-3-concrete-practical-deployment--packet-flow-traces)
+ - [3.5 Diagram 4: Dynamic Tunnel Architecture & Agent Lifecycle](#35-diagram-4-dynamic-tunnel-architecture--agent-lifecycle)
+- [4. Deep-Dive: Core Interconnect Capabilities](#4-deep-dive-core-interconnect-capabilities)
+ - [4.1 Dynamic Tunnels (Iroh + IETF MASQUE Convergence)](#41-dynamic-tunnels-iroh--ietf-masque-convergence)
+ - [4.2 Private Transit: The Galactic VPC Backbone (SRv6 uSID + VRF)](#42-private-transit-the-galactic-vpc-backbone-srv6-usid--vrf)
+ - [4.3 High-Performance Ingress: Stateless Maglev DSR](#43-high-performance-ingress-stateless-maglev-dsr)
+ - [4.4 Public Internet Transit: BGP /48 Allocations & Stateful NAT66 Egress](#44-public-internet-transit-bgp-48-allocations--stateful-nat66-egress)
+- [5. Declarative Kubernetes Control Plane (CRD Model)](#5-declarative-kubernetes-control-plane-crd-model)
+ - [5.1 API Resource Relationship Topology](#51-api-resource-relationship-topology)
+ - [5.2 Production CRD Specifications](#52-production-crd-specifications)
+- [6. Concrete Deployment Blueprint: What It Looks Like in Practice](#6-concrete-deployment-blueprint-what-it-looks-like-in-practice)
+ - [6.1 Real-World Reference Scenario](#61-real-world-reference-scenario)
+ - [6.2 Edge Node & Workload Deployment Steps](#62-edge-node--workload-deployment-steps)
+ - [6.3 Step-by-Step Packet Traces Across the Interconnect](#63-step-by-step-packet-traces-across-the-interconnect)
+- [7. Operational Reliability, Security & Zero-Trust Architecture](#7-operational-reliability-security--zero-trust-architecture)
+- [8. Architectural Comparison: Datum vs. Legacy Alternatives](#8-architectural-comparison-datum-vs-legacy-alternatives)
+
+---
+
+## 1. Executive Summary & Strategic Vision
+
+Modern infrastructure is undergoing a seismic shift:
+1. **The Rise of the AI-Native Era**: Compute has decentralized into specialized GPU clouds (**Neoclouds** such as CoreWeave, Lambda Labs, Together AI, Nebius, RunPod, and Crusoe).
+2. **Hyperscaler Data Gravity**: Core enterprise records, data lakes, and transactional storage remain anchored inside legacy **Hyperscalers** (AWS, GCP, Azure, OCI).
+3. **The Edge & Last-Mile Frontier**: Real-time sensor telemetry, hospital imaging, factory automation, and local developer workstations operate at the **Last Mile**, behind strict corporate firewalls and NATs.
+
+Connecting these three environments today requires fragile VPN overlays, expensive leased physical circuits (AWS Direct Connect, GCP Cloud Interconnect), or exposing internal microservices to the public internet across fragile CDNs.
+
+**Datum Interconnect** provides a neutral, programmatic **Virtual Meet-Me Room (vMMR)**. Built upon open standards—including **IETF MASQUE (RFC 9484 CONNECT-IP)**, **Iroh P2P QUIC**, **Segment Routing over IPv6 (SRv6 uSID)**, **eBPF/XDP Maglev load balancing**, and **BGP EVPN**—Datum enables any node, cluster, or client to connect across dynamically provisioned, cryptographic tunnels. Workloads gain both **deterministic, isolated Private Transit** and **shielded, high-capacity Public Internet Transit** in a single unified network fabric.
+
+```
+ ┌────────────────────────────────────────────────────────┐
+ │ NEOCLOUDS & AI CLOUDS │
+ │ CoreWeave • Lambda • Nebius • Together AI • Crusoe │
+ └───────────────────────────┬────────────────────────────┘
+ │ Dynamic QUIC / MASQUE Tunnels
+ ▼
+┌──────────────────────────────────────────────────────────────────────────────┐
+│ DATUM INTERCONNECT: VIRTUAL MEET-ME ROOM (vMMR) │
+│ │
+│ ┌───────────────────────────────┐ ┌────────────────────────────────┐ │
+│ │ PRIVATE TRANSIT BACKBONE │ │ PUBLIC TRANSIT ENGINES │ │
+│ │ • Galactic SRv6 uSID Mesh │ │ • Per-Site /48 IPv6 Transit │ │
+│ │ • Multi-Tenant Kernel VRFs │ │ • Stateless Maglev DSR (XDP) │ │
+│ │ • BGP EVPN / L3VPN Overlay │ │ • Stateful Sharded NAT66 │ │
+│ │ • Direct Server Return (DSR)│ │ • OWASP CRS WAF & ACME TLS │ │
+│ └───────────────────────────────┘ └────────────────────────────────┘ │
+│ │
+│ 17+ Global Edge PoPs: Ashburn • Silicon Valley • Dallas • │
+│ Frankfurt • London • Amsterdam • Singapore • Tokyo • Sydney │
+└──────────────┬───────────────────────────────┬───────────────────────────────┘
+ │ │
+ Dynamic QUIC │ │ Cloud Interconnect /
+ / MASQUE ▼ ▼ Direct Connect
+┌───────────────────────────────┐ ┌────────────────────────────────────────┐
+│ LAST-MILE & ENTERPRISE │ │ HYPERSCALER ENTERPRISE V вы │
+│ • Private On-Prem Data Centers│ │ • AWS (S3 Lakes, Aurora, IAM) │
+│ • Healthcare & Financial Edge│ │ • GCP (BigQuery, Vertex AI) │
+│ • Telco 5G MEC & Developers │ │ • Microsoft Azure (Entra ID, O365) │
+└───────────────────────────────┘ └────────────────────────────────────────┘
+```
+
+---
+
+## 2. The Strategic Narrative: Solving the Multi-Cloud AI Networking Chasm
+
+### 2.1 The Traditional Meet-Me Room (MMR) & Its Failure Modes
+
+In telecommunications, an **Internet Exchange (IX)** or **Meet-Me Room (MMR)** (such as Equinix DC2 in Ashburn or Interxion in Frankfurt) is a physical facility where telecommunications carriers, ISPs, and large tech firms physically run fiber optic cross-connects between equipment racks.
+
+While physically sound for static backbones, physical MMRs fail the modern cloud and AI ecosystem:
+- **Lead Times**: Running a cross-connect, obtaining Letters of Authorization (LOA-CFA), and provisioning BGP sessions takes **4 to 12 weeks**.
+- **Prohibitive Capex & Port Costs**: Cross-connect monthly recurring charges (MRCs) plus 100Gbps cross-connect fees create an insurmountable financial barrier for emerging AI infrastructure providers.
+- **Physical Boundary**: Software workloads running on serverless platforms, developer machines, or ephemeral GPU nodes in a neocloud cannot plug a physical patch cable into an MMR patch panel.
+
+### 2.2 The Three Fractured Worlds
+
+| Participant | Primary Workloads & Strengths | Networking Limitations & Pain Points |
+| :--- | :--- | :--- |
+| **Neoclouds / AI Clouds**
*(CoreWeave, Lambda, Nebius, Together AI)* | Ultra-dense GPU clusters (NVIDIA H100, H200, B200), high-throughput RoCEv2/InfiniBand fabrics, agile pricing. | **Siloed Islands**: Lack proprietary global fiber backbones. High egress fees when sending inference results back to clients. No native private peering with customer clouds. |
+| **Hyperscalers**
*(AWS, GCP, Azure, OCI)* | Enterprise data lakes (Amazon S3, Google Cloud Storage), transactional databases (RDS, Spanner), enterprise identity (Entra ID). | **Walled Gardens**: Exorbitant data egress taxation. Proprietary interconnects (AWS Direct Connect, Azure ExpressRoute) require complex virtual interfaces (VIFs) and vendor lock-in. |
+| **Last-Mile Providers & Edge**
*(Enterprise On-Prem, Hospitals, Telco Edge)* | Sensitive data (HIPAA/GDPR medical imaging, proprietary factory telemetry), on-prem GPU inference nodes, developer machines. | **Symmetric NAT & Strict Firewalls**: Block inbound connections entirely. Enterprise security forbids opening port forwards. Dynamic IPs make static BGP routing impossible. |
+
+### 2.3 Datum's Value Proposition: "Plaid for Alt-Clouds & Hyperscalers"
+
+Just as **Plaid** moved banking interactions from batch ACH files and proprietary bank integrations to an elegant, universal developer API, **Datum moves cloud interconnection up into software**:
+
+1. **"Go Anywhere" Software Footprint**: Rather than requiring dedicated physical networking appliances, Datum's data plane runs as lightweight, high-performance software: headless Rust agents (`datum-connect`), Go supervisors (`datumctl-connect`), and kernel eBPF/XDP drivers (`galactic-cni`, `galactic-gateway`, `galactic-router`).
+2. **A Neutral "Sits in the Middle" Network**: Datum operates an open network cloud spanning 17+ major global interconnection hubs. Instead of competing with application clouds or acting as a passive CDN, Datum securely interconnects participants.
+3. **Unified Transit**: One single connection provides:
+ - **Private Transit**: Cryptographically isolated, line-rate L3 interconnects directly into any peer VPC.
+ - **Public Transit**: High-throughput IPv4/IPv6 internet egress and DDoS-shielded ingress.
+
+---
+
+## 3. Visual Architecture & Draw.io Diagram Suite
+
+### 3.1 Accessing the Draw.io Assets
+
+The complete visual specification for Datum Interconnect is stored directly within this repository as an interactive, multi-page Draw.io document:
+
+- **Primary Multi-Page File**: [`datum-interconnect-architecture.drawio`](./datum-interconnect-architecture.drawio)
+- **Individual Diagram Exports**:
+ - Page 1: [`diagrams/1-ecosystem-virtual-meet-me-room.drawio`](./diagrams/1-ecosystem-virtual-meet-me-room.drawio)
+ - Page 2: [`diagrams/2-control-and-data-plane-stack.drawio`](./diagrams/2-control-and-data-plane-stack.drawio)
+ - Page 3: [`diagrams/3-practical-deployment-and-packet-flow.drawio`](./diagrams/3-practical-deployment-and-packet-flow.drawio)
+ - Page 4: [`diagrams/4-dynamic-tunnel-and-agent-lifecycle.drawio`](./diagrams/4-dynamic-tunnel-and-agent-lifecycle.drawio)
+
+> [!TIP]
+> **How to Open and Edit:**
+> 1. **VS Code**: Install the official `Hediet Draw.io Integration` extension and click directly on any `.drawio` file.
+> 2. **Web**: Navigate to [app.diagrams.net](https://app.diagrams.net) and select `File > Open From > Device`.
+> 3. **Desktop**: Use the native Draw.io Desktop application.
+
+---
+
+### 3.2 Diagram 1: Ecosystem Overview — The Virtual Meet-Me Room
+
+This diagram illustrates how diverse participants interface with the Datum Virtual Meet-Me Room across Dynamic Tunnels.
+
+```mermaid
+flowchart TB
+ subgraph Neoclouds["1. NEOCLOUDS & AI CLOUDS (Lambda, CoreWeave, Nebius)"]
+ N_GPU["H100/B200 GPU Workloads
(vLLM, PyTorch Training)"]
+ N_AGT["datum-connect Agent
(Iroh P2P + MASQUE CONNECT-IP)"]
+ N_GPU --> N_AGT
+ end
+
+ subgraph Hyperscalers["2. HYPERSCALERS & ENTERPRISE (AWS, GCP, Azure)"]
+ H_DATA["Enterprise S3 Lake / BigQuery
Aurora PostgreSQL / Entra ID"]
+ H_GW["Direct Connect / Partner Gateway
(BGP Peering / 802.1Q VLANs)"]
+ H_DATA <--> H_GW
+ end
+
+ subgraph LastMile["3. LAST-MILE & ENTERPRISE EDGE"]
+ LM_HOST["On-Prem Hospital PACS / Local DB
Developer Laptops (datumctl)"]
+ LM_NAT["Enterprise Symmetric NAT & Firewall
(Strict Outbound UDP 443 Only)"]
+ LM_AGT["datum-connect Client
(STUN Hole Punch / Relay Fallback)"]
+ LM_HOST --> LM_NAT --> LM_AGT
+ end
+
+ subgraph PublicNet["4. PUBLIC INTERNET & CLIENTS"]
+ P_USER["External Web & Mobile Apps
Inference API Consumers"]
+ P_TIER1["Tier-1 IP Transit
(Netactuate, Equinix, Telia, Cogent)"]
+ P_USER <--> P_TIER1
+ end
+
+ subgraph DatumVMMR["DATUM GLOBAL INTERCONNECT: VIRTUAL MEET-ME ROOM (vMMR)"]
+ direction TB
+ subgraph TunnelTier["Dynamic Tunnel Termination Tier"]
+ DT_P2P["Iroh P2P Engine
(ed25519 NodeId, 0-RTT)"]
+ DT_RELAY["Global Iroh Relays
(Stateless UDP 443 Fallback)"]
+ DT_MASQUE["MASQUE Gateways
(RFC 9484 CONNECT-IP)"]
+ end
+
+ subgraph PrivateBackbone["Galactic VPC Private Transit Backbone"]
+ PB_SRV6["SRv6 Micro-SID (uSID) Data Plane
(TC-eBPF Linux Kernel Decap/Encap)"]
+ PB_VRF["Linux Kernel Multi-Tenant VRFs
(Routing Table & Namespace Isolation)"]
+ PB_BGP["Multi-Cluster BGP EVPN
(Embedded GoBGP + FRR Fabric)"]
+ end
+
+ subgraph EdgeTransit["Edge Ingress & Public Transit Engines"]
+ ET_MAGLEV["Stateless Maglev DSR (XDP)
(Line-Rate L4 Load Balancing)"]
+ ET_NAT66["Stateful Sharded NAT66
(Masquerade Egress PAT Engine)"]
+ ET_WAF["Envoy Gateway + OWASP CRS WAF
(Layer 7 Ingress & ACME TLS)"]
+ end
+ end
+
+ %% Interconnections
+ N_AGT == "Dynamic QUIC / MASQUE" ==> TunnelTier
+ LM_AGT == "Iroh Hole Punch / MASQUE" ==> TunnelTier
+ TunnelTier == "VRF Injection / SRv6 Encap" ==> PrivateBackbone
+ PrivateBackbone == "Private Transit (SRv6 / 802.1Q)" ==> H_GW
+ PrivateBackbone == "Default Route (egress_sid)" ==> EdgeTransit
+ EdgeTransit == "Per-Site /48 & Anycast BGP" ==> P_TIER1
+
+ style DatumVMMR fill:#0B192C,stroke:#0284C7,stroke-width:3px,color:#38BDF8
+ style PrivateBackbone fill:#1E1B4B,stroke:#6366F1,stroke-width:2px,color:#EEF2FF
+ style TunnelTier fill:#172554,stroke:#3B82F6,stroke-width:2px,color:#DBEAFE
+ style EdgeTransit fill:#422006,stroke:#EAB308,stroke-width:2px,color:#FEF08A
+ style Neoclouds fill:#2E1065,stroke:#8B5CF6,stroke-width:2px,color:#EDE9FE
+ style Hyperscalers fill:#451A03,stroke:#F59E0B,stroke-width:2px,color:#FEF3C7
+ style LastMile fill:#064E3B,stroke:#10B981,stroke-width:2px,color:#ECFDF5
+ style PublicNet fill:#4C0519,stroke:#F43F5E,stroke-width:2px,color:#FFF1F2
+```
+
+---
+
+### 3.3 Diagram 2: Layered Technical Architecture & Protocol Stack
+
+This diagram breaks down the software stack from user-facing Kubernetes CRDs down to bare-metal hardware and optical interconnects.
+
+```mermaid
+graph TD
+ subgraph L1["Layer 1: Workloads & User Intent"]
+ W_NEO["Neocloud AI Compute Node
(PyTorch, vLLM Worker)"]
+ W_NIC["NetworkInterfaceClaim
(Decoupled Compute NIC Request)"]
+ W_HYPER["Hyperscaler App
(AWS RDS Postgres, S3 Lake)"]
+ W_EDGE["Edge / Local Developer
(datumctl connect tunnel)"]
+ end
+
+ subgraph L2["Layer 2: Declarative Control Plane (Kubernetes CRDs)"]
+ CRD_CONN["Connector & ConnectorClass
(Liveness, Keys, Capabilities)"]
+ CRD_AD["ConnectorAdvertisement
(Exported Subnets & L4 Ports)"]
+ CRD_ATTACH["ConnectorAttachment & VPC
(VRF Binding & IPAM Allocation)"]
+ CRD_GW["NetworkGateway & NetworkRule
(VIP & Maglev DSR Rules)"]
+ CRD_WAF["TrafficProtectionPolicy
(OWASP CRS Paranoia Levels)"]
+ end
+
+ subgraph L3["Layer 3: Dynamic Tunnel & Connectivity (Iroh + MASQUE)"]
+ T_AGENT["datum-connect Agent
(Rust lib + Go supervisor)"]
+ T_RELAY["Global Iroh Relay Mesh
(Port 443 Fallback)"]
+ T_MASQUE["IETF MASQUE Suite
(RFC 9484 CONNECT-IP)"]
+ T_IPAM["Dynamic IP & Route Injection
(Capsule Frame Updates)"]
+ end
+
+ subgraph L4["Layer 4: High-Performance Overlay (Kernel & eBPF)"]
+ K_SRV6["SRv6 Micro-SID (uSID) Engine
(TC-BPF Encap/Decap in Kernel)"]
+ K_VRF["Linux Kernel VRFs
(Per-Tenant Cryptographic Partition)"]
+ K_XDP["Stateless Maglev DSR (XDP)
(Native Driver Hook, Zero-Copy LB)"]
+ K_NAT["Sharded Stateful NAT66 Egress
(Atomic Linear-Probe PAT)"]
+ end
+
+ subgraph L5["Layer 5: Underlay Fabric & Physical Transit"]
+ U_FRR["fabric-router (FRR eBGP)
(Physical Inter-Node Loopbacks)"]
+ U_EVPN["GoBGP EVPN L3VPN Mesh
(Fleet-Wide Route Propagation)"]
+ U_BGP48["Per-Site /48 BGP Routing
(Unicast IPv6 Identity per PoP)"]
+ U_PHY["Physical Peering & Colocation
(Equinix, Netactuate 100G/400G Links)"]
+ end
+
+ L1 --> L2
+ L2 --> L3
+ L3 --> L4
+ L4 --> L5
+
+ style L1 fill:#1E293B,stroke:#475569,stroke-width:2px,color:#F8FAFC
+ style L2 fill:#0F172A,stroke:#0284C7,stroke-width:2px,color:#F0F9FF
+ style L3 fill:#172554,stroke:#2563EB,stroke-width:2px,color:#EFF6FF
+ style L4 fill:#311042,stroke:#A855F7,stroke-width:2px,color:#FAF5FF
+ style L5 fill:#1C1917,stroke:#78716C,stroke-width:2px,color:#F5F5F4
+```
+
+---
+
+### 3.4 Diagram 3: Concrete Practical Deployment & Packet Flow Traces
+
+This diagram depicts an end-to-end practical scenario: a CoreWeave GPU cluster communicating with an AWS private PostgreSQL database and HuggingFace over public transit.
+
+```mermaid
+sequenceDiagram
+ autonumber
+ participant GPU as CoreWeave GPU Pod
(10.100.1.50)
+ participant CoreNode as CoreWeave Node
(datum-connect)
+ participant DatumPoP as Datum Ashburn Edge PoP
(fc00:datum:ashburn::)
+ participant AWS as AWS Direct Connect / VPC
(172.31.42.10)
+ participant Web as Public Internet / HuggingFace
(2600:9000:20::1)
+
+ Note over GPU, AWS: FLOW 1: PRIVATE CROSS-CLOUD TRANSIT (Neocloud GPU -> AWS RDS Database)
+ GPU->>CoreNode: TCP SYN to 172.31.42.10:5432 (Postgres)
+ CoreNode->>CoreNode: VRF 1001 route match -> datum0 TUN interface
+ CoreNode->>DatumPoP: MASQUE CONNECT-IP capsule over QUIC (UDP 443)
+ DatumPoP->>DatumPoP: Decap QUIC -> Translate to SRv6 uSID [fc00:datum:aws::1]
+ DatumPoP->>AWS: Forward across Private Interconnect (VLAN 400)
+ AWS->>AWS: Direct Connect Gateway delivers private packet to RDS
+ Note right of AWS: RDS receives packet from 10.100.1.50 without NAT rewriting!
+
+ Note over GPU, Web: FLOW 2: PUBLIC TRANSIT EGRESS WITH STATEFUL NAT66 (Neocloud GPU -> Internet)
+ GPU->>CoreNode: HTTPS GET to HuggingFace (2600:9000:20::1:443)
+ CoreNode->>DatumPoP: Forward across dynamic tunnel via default route (egress_sid)
+ DatumPoP->>DatumPoP: galactic-nat66 allocates PAT port: 2607:ed40:1000::masq:42188
+ DatumPoP->>Web: Transmit plain IPv6 over Tier-1 Transit (Netactuate)
+ Web-->>DatumPoP: Reply packet to 2607:ed40:1000::masq:42188
+ DatumPoP->>DatumPoP: LRU Hash match -> DNAT back to 10.100.1.50 -> Wrap in SRv6
+ DatumPoP-->>CoreNode: Tunnel return capsule over QUIC
+ CoreNode-->>GPU: Deliver payload to GPU Pod
+
+ Note over Web, GPU: FLOW 3: PUBLIC INGRESS VIA STATELESS MAGLEV DSR (Client -> Anycast VIP)
+ Web->>DatumPoP: Client HTTP request to Anycast VIP (2607:ed40:cafe::100)
+ DatumPoP->>DatumPoP: XDP Maglev hash ring selects backend: 10.100.1.50
+ DatumPoP->>CoreNode: Push outer SRv6 header -> Forward (Zero packet payload rewrite)
+ CoreNode->>GPU: Deliver original client packet unmodified
+ GPU-->>Web: Direct Server Return (DSR): GPU Pod responds directly to client IP!
+ Note over GPU, Web: Bypasses the gateway on return — eliminates bandwidth bottlenecks!
+```
+
+---
+
+### 3.5 Diagram 4: Dynamic Tunnel Architecture & Agent Lifecycle
+
+This diagram illustrates how the `datum-connect` agent initializes, traverses enterprise NATs, negotiates MASQUE tunnels, and handles seamless failover.
+
+```mermaid
+stateDiagram-v2
+ [*] --> Phase1_Init: datumctl connect tunnel run
+
+ state Phase1_Init {
+ SupervisorSpawn: Go Supervisor spawns Rust datum-connect child
+ KeyGen: Generate/Load Ed25519 Keypair (~/.local/share/datumctl)
+ OAuth: Resolve Token via DATUM_CREDENTIALS_HELPER
+ CRDBind: Reconcile Connector CRD with PublicKey details
+ SupervisorSpawn --> KeyGen --> OAuth --> CRDBind
+ }
+
+ Phase1_Init --> Phase2_Traversal: Credentials & Identity Ready
+
+ state Phase2_Traversal {
+ STUNProbe: Probe local interfaces & Contact Datum Home Relay
+ HolePunch: Execute Simultaneous UDP Hole Punch with Peer
+ PathDecision: Evaluate Path Candidates
+ DirectP2P: Upgrade to Direct 0-RTT P2P QUIC Link
+ RelayFallback: Fallback to Stateless Iroh Relay on UDP 443
+ STUNProbe --> HolePunch --> PathDecision
+ PathDecision --> DirectP2P: Hole Punch Succeeded
+ PathDecision --> RelayFallback: Symmetric / Enterprise NAT
+ }
+
+ Phase2_Traversal --> Phase3_MASQUE: QUIC Transport Established
+
+ state Phase3_MASQUE {
+ ConnectIP: Issue HTTP/3 Extended CONNECT-IP (RFC 9484)
+ CapCheck: Validate Connector.spec.capabilities (CONNECT-IP, TCP)
+ CapsuleAssign: Gateway returns ADDRESS_ASSIGN & ROUTE_ADVERTISEMENT
+ TunAlloc: Create Virtual TUN interface (datum0) & Bind to Kernel VRF
+ ConnectIP --> CapCheck --> CapsuleAssign --> TunAlloc
+ }
+
+ Phase3_MASQUE --> Phase4_Runtime: Tunnel Active & Routes Live
+
+ state Phase4_Runtime {
+ Heartbeat: Async HeartbeatAgent renews k8s coordination Lease (LeaseRef)
+ TrafficForward: Forward L3 IP capsules across QUIC datagrams
+ ConnMigration: Wi-Fi to Cellular handoff via QUIC Connection ID
+ Heartbeat --> TrafficForward
+ TrafficForward --> ConnMigration
+ }
+
+ Phase4_Runtime --> Phase2_Traversal: Path Degraded (Auto-Reconnect)
+ Phase4_Runtime --> [*]: SIGTERM / Graceful Shutdown (Clean GC)
+```
+
+---
+
+## 4. Deep-Dive: Core Interconnect Capabilities
+
+### 4.1 Dynamic Tunnels (Iroh + IETF MASQUE Convergence)
+
+Datum's dynamic tunneling layer combines the P2P NAT traversal capabilities of **Iroh** with the IETF standardization of **MASQUE (Multiplexed Application Substrate over QUIC Encryption)**.
+
+```
+┌─────────────────────────────────────────────────────────────────────────┐
+│ Current vs Future State │
+│ │
+│ Iroh Native Layer IETF MASQUE Standard Layer │
+│ ├─ Best-in-class NAT hole punch ├─ RFC 9484 CONNECT-IP (L3 VPN) │
+│ ├─ Ed25519 Cryptographic NodeID ├─ RFC 9298 CONNECT-UDP (Relaying) │
+│ ├─ Global Relay Fallback ├─ HTTP CONNECT-TCP (L4 Proxying) │
+│ └─ Custom QUIC Framing └─ Native Browser / WebTransport Ready │
+│ │
+│ Convergence Advantage: Iroh provides the connectivity engine; │
+│ MASQUE provides the standards-based wire protocol. │
+└─────────────────────────────────────────────────────────────────────────┘
+```
+
+#### Key Technical Attributes:
+1. **Zero-Configuration NAT Traversal**: Enterprise edge nodes and local developer laptops rarely possess public IP addresses. Iroh's STUN discovery probes local and reflective WAN candidates, executing bidirectional hole punching.
+2. **Symmetric Firewall Resilience**: When connecting through strict enterprise firewalls (which assign randomized port mappings), the agent falls back to Datum's global relay mesh over standard **UDP port 443**.
+3. **Cryptographic Identity**: Tunnels are not bound to fleeting IP addresses. Every endpoint is identified by an **Ed25519 Public Key**. Mutual TLS 1.3 ensures zero man-in-the-middle attacks or BGP hijacking exposure.
+4. **QUIC Connection Migration**: When an edge node shifts network interfaces (e.g., from fixed broadband to cellular backup), QUIC connection IDs ensure that **in-flight TCP/IP sessions across the MASQUE tunnel do not drop**.
+
+---
+
+### 4.2 Private Transit: The Galactic VPC Backbone (SRv6 uSID + VRF)
+
+Once traffic enters a Datum Edge PoP, it is bridged into **Galactic VPC**, Datum's software-defined multi-tenant backbone.
+
+```
+Client IP Packet (Inner) Galactic SRv6 uSID Packet (Outer)
+┌────────────────────────┐ ┌──────────────────────────────────────────────┐
+│ Src: 10.100.1.50 │ SRv6 │ Outer IPv6: fc00:datum:ashburn:: │
+│ Dst: 172.31.42.10 │ ──────► │ ➔ fc00:datum:aws::1 │
+│ Payload (TCP 5432) │ Bridge │ SRH: [uSID: tenant-alpha-vrf:egress] │
+└────────────────────────┘ │ Inner Payload: [Original Client IP Packet] │
+ └──────────────────────────────────────────────┘
+```
+
+#### Architectural Pillars:
+- **Segment Routing over IPv6 (SRv6 Micro-SID / uSID)**: Galactic replaces bloated encapsulation protocols (Geneve, VXLAN) with native IPv6 extension headers. Routing paths, service functions, and tenant identifiers are packed into compact 16-bit or 32-bit Micro-SIDs (`uSID`).
+- **Kernel-Level Multi-Tenancy (VRFs)**: Isolation is enforced at the Linux kernel level via Virtual Routing and Forwarding (`VRF`) tables. Multiple tenants can utilize identical RFC 1918 private subnets (`10.0.0.0/16`) without address collision.
+- **BGP EVPN Control Plane**: Embedded in `galactic-router` is an in-process **GoBGP** server. It automatically originates and distributes EVPN Type-5 IP-Prefix routes across clusters and sites over an underlay fabric managed by **FRR (`fabric-router`)**.
+
+---
+
+### 4.3 High-Performance Ingress: Stateless Maglev DSR
+
+For inbound traffic (e.g., external API consumers querying an AI inference cluster), Datum uses **Stateless Maglev Direct Server Return (DSR)** implemented via native **eBPF/XDP** in `galactic-gateway`.
+
+```
+External Client Datum Edge Gateway Neocloud GPU Backend
+ │ │ │
+ │─── 1. Ingress Request to VIP ──────►│ │
+ │ (Src: Client, Dst: VIP) │ │
+ │ │─── 2. Consistent Hash (Maglev) ────►│
+ │ │ (Outer SRv6 Encap; NO NAT!) │
+ │ │ (Original Client IP Preserved) │
+ │ │
+ │◄── 3. DIRECT SERVER RETURN (DSR) ─────────────────────────────────────────│
+ │ (Worker transmits response directly to Client IP; Gateway bypassed!)
+```
+
+#### Why Maglev DSR Outperforms Traditional Load Balancers:
+1. **Stateless Scalability**: Traditional load balancers maintain a stateful connection tracking table (`conntrack`). When handling millions of concurrent LLM streaming requests, state tables exhaust memory. Maglev uses a deterministic, consistent-hash permutation lookup table: any gateway node receiving a packet independently computes the identical backend target without sharing state.
+2. **Zero Return Bottleneck (DSR)**: In standard reverse proxies, return traffic (which is typically 10x–100x larger than request traffic) must funnel back through the load balancer. Under Datum's DSR design, **the backend replies directly to the client**. The gateway node processes only the lightweight inbound request.
+3. **True Client IP Preservation**: Because the edge gateway performs no SNAT rewriting, backend workloads see the client's genuine IP address, critical for rate limiting, geo-fencing, and audit logging.
+
+---
+
+### 4.4 Public Internet Transit: BGP /48 Allocations & Stateful NAT66 Egress
+
+In addition to private multi-cloud routing, Datum Interconnect provides fully routed **Public Internet Transit**:
+
+#### Per-Site /48 IPv6 BGP Routing
+Datum allocates a dedicated `/48` IPv6 prefix to each edge location (e.g., Ashburn, Frankfurt, San Jose) advertised directly to Tier-1 upstream providers (Netactuate, Equinix, Lumen). This guarantees:
+- **Global Unicast Reachability**: Services like `iroh-relay` have stable, globally routable IPv6 endpoints.
+- **BGP Optimization**: Traffic destined for a specific edge PoP routes across the optimal Tier-1 path rather than bouncing unpredictably across transcontinental anycast paths.
+
+#### Stateful Sharded NAT66 Egress
+For private VPC workloads needing outbound internet access (e.g., pulling weights from HuggingFace, accessing external APIs):
+- Outbound packets matching `::/0` route to the gateway's `egress_sid`.
+- The `galactic-nat66` kernel tier dynamically masquerades private ULA/VPC addresses to a public Global Unicast Address (`GUA`) using an atomic, linear-probe port reservation table.
+- Return traffic is automatically DNAT'd and routed back over the dynamic tunnel to the correct originating worker.
+
+---
+
+## 5. Declarative Kubernetes Control Plane (CRD Model)
+
+Datum Interconnect is managed entirely through Kubernetes Custom Resources defined in the `networking.datumapis.com` API group.
+
+### 5.1 API Resource Relationship Topology
+
+```
+┌─────────────────────────────────────────────────────────────────────────────┐
+│ Kubernetes Control Plane (Datum Cloud) │
+│ │
+│ ┌───────────────────────┐ ┌──────────────────────┐ │
+│ │ Connector │ │ VPC │ │
+│ │ (Client Device / Node)│ │ (Galactic VPC) │ │
+│ └───────────┬───────────┘ └──────────┬───────────┘ │
+│ │ │ │
+│ ▼ ▼ │
+│ ┌───────────────────────┐ ┌──────────────────────┐ │
+│ │ ConnectorAdvertisement│ │ ConnectorAttachment │ │
+│ │ (Exported Subnets/L4) │ │ (Dynamic Binding) │ │
+│ └───────────────────────┘ └──────────┬───────────┘ │
+│ │ │
+│ ▼ │
+│ ┌───────────────────────┐ ┌──────────────────────┐ │
+│ │ NetworkInterfaceClaim │◄───────────────────────┤ NetworkInterface │ │
+│ │ (Compute Workload) │ Bound by Controller │ (NIC Facts & IPAM) │ │
+│ └───────────────────────┘ └──────────────────────┘ │
+└─────────────────────────────────────────────────────────────────────────────┘
+```
+
+### 5.2 Production CRD Specifications
+
+#### 1. Connector Definition (`networking.datumapis.com/v1alpha1`)
+Represents an external client, server, or neocloud host registering into the fabric.
+
+```yaml
+apiVersion: networking.datumapis.com/v1alpha1
+kind: Connector
+metadata:
+ name: coreweave-gpu-cluster-01
+ namespace: tenant-alpha
+ annotations:
+ datum.net/device-name: "neocloud-ash-h100"
+spec:
+ connectorClassName: datum-connect
+ capabilities:
+ - type: MASQUE
+ connectTCP:
+ disabled: false
+ - type: CONNECT-IP
+ - type: CONNECT-UDP
+status:
+ conditions:
+ - type: Ready
+ status: "True"
+ lastTransitionTime: "2026-09-03T18:00:00Z"
+ connectionDetails:
+ type: PublicKey
+ publicKey:
+ id: 2ovpybgj3snjmchns44pfn6dbwmdiu4ogfd66xyu72ghexllv6hq
+ homeRelay: https://relay.ash.datum.net
+ leaseRef:
+ name: connector-lease-coreweave-gpu-cluster-01
+ namespace: tenant-alpha
+```
+
+#### 2. ConnectorAttachment (`networking.datumapis.com/v1alpha1`)
+Attaches the connector to an isolated Galactic VPC with dynamic IP allocation and route authorization.
+
+```yaml
+apiVersion: networking.datumapis.com/v1alpha1
+kind: ConnectorAttachment
+metadata:
+ name: attach-coreweave-to-production-vpc
+ namespace: tenant-alpha
+spec:
+ connectorRef:
+ name: coreweave-gpu-cluster-01
+ vpcRef:
+ name: production-vpc
+ ipAllocation:
+ mode: Dynamic
+ allowedRoutes:
+ - 172.31.0.0/16 # AWS VPC Private Subnets
+ - 10.200.0.0/16 # On-Premises Healthcare Datacenter
+ - ::/0 # Public Internet Egress via NAT66
+status:
+ phase: Connected
+ assignedIP: 10.100.1.50
+```
+
+#### 3. ConnectorAdvertisement (`networking.datumapis.com/v1alpha1`)
+Advertises reachable subnets or Layer 4 endpoints hosted behind the connector.
+
+```yaml
+apiVersion: networking.datumapis.com/v1alpha1
+kind: ConnectorAdvertisement
+metadata:
+ name: advertise-coreweave-vllm
+ namespace: tenant-alpha
+spec:
+ connectorRef:
+ name: coreweave-gpu-cluster-01
+ subnets:
+ - cidr: 10.100.1.0/24
+ layer4:
+ - protocol: TCP
+ service:
+ name: vllm-api
+ port: 8000
+ address: 10.100.1.50
+```
+
+#### 4. NetworkInterfaceClaim & NetworkInterface (`networking.datumapis.com/v1alpha`)
+Decouples compute instances from networking internals, ensuring retained IP identity across pod restarts.
+
+```yaml
+apiVersion: networking.datumapis.com/v1alpha
+kind: NetworkInterfaceClaim
+metadata:
+ name: vllm-worker-nic-claim
+ namespace: tenant-alpha
+spec:
+ networkRef:
+ name: production-vpc
+---
+apiVersion: networking.datumapis.com/v1alpha
+kind: NetworkInterface
+metadata:
+ name: vllm-worker-nic-claim-nic
+ namespace: tenant-alpha
+status:
+ phase: Bound
+ addresses:
+ - ip: 10.100.1.50/24
+ - ip: fd00:datum:tenant1::50/64
+ gateway: 10.100.1.1
+ mtu: 1500
+```
+
+#### 5. NetworkGateway & NetworkRule (`networking.datumapis.com/v1alpha`)
+Configures the edge XDP Maglev DSR load-balancing ingress.
+
+```yaml
+apiVersion: networking.datumapis.com/v1alpha
+kind: NetworkGateway
+metadata:
+ name: global-api-gateway
+ namespace: tenant-alpha
+spec:
+ publicInterface: eth0
+status:
+ anycastVIP: 2607:ed40:cafe::100
+ srv6Address: fc00:datum:ashburn::gateway-01
+---
+apiVersion: networking.datumapis.com/v1alpha
+kind: NetworkRule
+metadata:
+ name: vllm-ingress-rule
+ namespace: tenant-alpha
+spec:
+ gatewayRef:
+ name: global-api-gateway
+ protocol: TCP
+ port: 443
+ targetBackendPort: 8000
+ vpcRef:
+ name: production-vpc
+ backends:
+ - ip: 10.100.1.50
+ weight: 100
+```
+
+---
+
+## 6. Concrete Deployment Blueprint: What It Looks Like in Practice
+
+### 6.1 Real-World Reference Scenario
+
+An AI startup has deployed:
+1. **Neocloud**: CoreWeave cluster running 512x NVIDIA H100 GPUs running distributed vLLM model inference (`10.100.1.0/24`).
+2. **Hyperscaler**: AWS `us-east-1` VPC hosting production PostgreSQL databases (`172.31.42.10`) and Amazon S3 checkpoint buckets.
+3. **Last-Mile Provider**: An on-premises enterprise data center (`10.200.0.0/16`) streaming raw proprietary documents to the GPU cluster for fine-tuning.
+
+### 6.2 Edge Node & Workload Deployment Steps
+
+#### Step 1: Install the Datum Connect CLI & Plugin
+On the Neocloud GPU host / VM:
+
+```bash
+# 1. Install datumctl
+curl -sSL https://get.datum.net | bash
+
+# 2. Install the Datum Connect plugin (downloads Go supervisor + Rust engine)
+datumctl plugin install datum-cloud/connect
+
+# Binaries installed to ~/.datumctl/plugins:
+# - datumctl-connect (Go supervisor)
+# - datum-connect (Rust headless Iroh + MASQUE engine)
+```
+
+#### Step 2: Launch the Dynamic Tunnel Daemon
+
+```bash
+# Run the tunnel supervisor in the background
+datumctl connect tunnel run \
+ --project-id "prj_tenant_alpha" \
+ --name "coreweave-gpu-cluster-01" \
+ --vpc "production-vpc" \
+ --export-subnet "10.100.1.0/24" \
+ --daemon
+```
+
+#### Step 3: Production Systemd Service Unit
+For automated host persistence, `datumctl` generates a standard systemd service:
+
+```ini
+# /etc/systemd/system/datum-connect.service
+[Unit]
+Description=Datum Connect Dynamic Tunnel Daemon
+After=network.target network-online.target
+Wants=network-online.target
+
+[Service]
+Type=simple
+User=datum
+Group=datum
+WorkingDirectory=/var/lib/datum
+ExecStart=/usr/local/bin/datumctl-connect tunnel run \
+ --project-id prj_tenant_alpha \
+ --name coreweave-gpu-cluster-01 \
+ --vpc production-vpc \
+ --log-dir /var/log/datum
+Restart=always
+RestartSec=5s
+LimitNOFILE=65536
+Environment="DATUM_CREDENTIALS_HELPER=/usr/local/bin/datum-token-helper"
+
+[Install]
+WantedBy=multi-user.target
+```
+
+```bash
+systemctl daemon-reload
+systemctl enable --now datum-connect
+```
+
+#### Step 4: Verify Tunnel Health & Kernel VRF Status
+
+```bash
+datumctl connect tunnel list
+```
+
+**Console Output:**
+```text
+ID NAME STATUS MODE LOCAL IP ASSIGNED VIP PEER RELAY
+tun_98a1 coreweave-gpu-cluster-01 READY MASQUE/P2P 198.51.100.22 10.100.1.50/24 relay.ash.datum.net
+```
+
+```bash
+# Check kernel VRF routing table
+ip route show vrf vrf-tenant-alpha
+```
+```text
+default via 10.100.1.1 dev datum0 proto datum
+172.31.0.0/16 via 10.100.1.1 dev datum0 proto datum
+10.200.0.0/16 via 10.100.1.1 dev datum0 proto datum
+```
+
+---
+
+### 6.3 Step-by-Step Packet Traces Across the Interconnect
+
+#### Flow A: Private Cross-Cloud Transit (Neocloud GPU ➔ AWS RDS Database)
+1. **Application Socket**: PyTorch worker on CoreWeave initiates TCP handshake to `172.31.42.10:5432` (AWS RDS).
+2. **VRF Route Match**: Host kernel identifies destination within `172.31.0.0/16`; directs packet to virtual interface `datum0`.
+3. **MASQUE Encapsulation**: `datum-connect` encapsulates packet into an RFC 9484 `CONNECT-IP` capsule frame, transported inside an encrypted QUIC datagram (UDP 443) to Datum Ashburn Edge PoP.
+4. **SRv6 uSID Translation**: The PoP ingress gateway decapsulates the QUIC datagram and prepends an outer IPv6 Segment Routing header:
+ ```text
+ Outer IPv6 Header:
+ Src: fc00:datum:ashburn::gateway-01
+ Dst: fc00:datum:aws::direct-connect-01
+ SRH: [uSID: tenant-alpha-vrf-1001]
+ Inner Packet:
+ Src: 10.100.1.50
+ Dst: 172.31.42.10
+ ```
+5. **Backbone Optical Transit**: Packet traverses Datum's private fiber underlay over eBGP routing fabric (`fabric-router`).
+6. **Delivery to AWS**: Datum's AWS Interconnect Gateway strips the outer SRv6 header and transmits the raw IP packet across the Direct Connect 802.1Q VLAN trunk.
+7. **Database Response**: PostgreSQL receives a clean packet originating directly from `10.100.1.50`. No NAT rewriting occurs.
+
+#### Flow B: Public Internet Egress (Neocloud GPU ➔ HuggingFace Model Hub)
+1. **Outbound Request**: GPU worker queries `2600:9000:20::1` (HuggingFace Hub) over HTTPS port 443.
+2. **Default Route Match**: Packet matches `::/0` default route; routed over the dynamic tunnel to Datum Edge PoP matching `egress_sid`.
+3. **Stateful NAT66 Masquerade**: Datum's `galactic-nat66` kernel engine:
+ - Allocates an ephemeral source port from its LRU connection table.
+ - Translates source IP to the PoP's publicly routable IPv6 address: `2607:ed40:1000::masq:42188`.
+4. **Internet Transit**: Packet leaves Datum's uplink via Netactuate / Equinix Tier-1 IP Transit.
+5. **Return Path**: HuggingFace replies to `2607:ed40:1000::masq:42188`. The edge gateway looks up the LRU table row, restores destination to `10.100.1.50`, encapsulates into SRv6/MASQUE, and routes back to the CoreWeave host.
+
+#### Flow C: Public Ingress via Stateless Maglev DSR (External Consumer ➔ Neocloud API)
+1. **Client Request**: End user connects to Datum Anycast VIP: `2607:ed40:cafe::100:443`.
+2. **Edge Ingress**: Anycast routes packet to the closest Datum Edge PoP (e.g., Ashburn).
+3. **XDP Maglev Hashing**: The native eBPF XDP hook in `galactic-gateway` hashes the packet's 5-tuple into its Maglev lookup table, selecting backend `10.100.1.50`.
+4. **SRv6 Encapsulation (No NAT)**: Gateway pushes an outer SRv6 header addressed to the backend's uSID. **Neither the client IP nor the payload is modified**.
+5. **Direct Server Return (DSR)**: The CoreWeave GPU Pod receives the request and generates the HTTP response. Crucially, **the backend transmits the reply directly back to the client's public IP address** via Datum public transit egress. The gateway is completely bypassed on return, preventing gateway link saturation!
+
+---
+
+## 7. Operational Reliability, Security & Zero-Trust Architecture
+
+### 7.1 Cryptographic Identity & Zero Inbound Ports
+- **Ed25519 Mutual Authentication**: Traditional IPsec preshared keys (PSKs) and static IP ACLs are eliminated. Every node authenticates with asymmetric Ed25519 keypairs.
+- **Fail-Closed Firewall Posture**: Edge nodes require **zero open inbound ports** (`LISTEN`). All tunnels originate outbound over UDP port 443, bypassing stateful enterprise inspection devices.
+
+### 7.2 Liveness & Failure Recovery (LeaseRef)
+- **Kubernetes Lease Renewal**: The Rust tunnel agent runs an asynchronous `HeartbeatAgent` that continuously renews a `coordination.k8s.io/v1 Lease` object recorded in `Connector.status.leaseRef`.
+- **Sub-Second Failover**: If an edge node crashes or loses connectivity, its lease expires. The `ConnectorReconciler` marks the connector `Ready: False`. Galactic BGP withdraws the associated EVPN routes within 500ms, preventing traffic blackholing.
+
+### 7.3 Layer 7 Ingress Protection (OWASP CRS ModSecurity WAF)
+For public-facing ingress endpoints, Datum integrates Envoy Gateway with OWASP Core Rule Set (CRS) protection via `TrafficProtectionPolicy`:
+- **SQL Injection (SQLi) & Remote Code Execution (RCE) Filtering**
+- **Adaptive Rate Limiting & DDoS Shielding**
+- **Automated TLS Certificate Lifecycle** via Let's Encrypt / ACME integration
+
+---
+
+## 8. Architectural Comparison: Datum vs. Legacy Alternatives
+
+| Feature / Dimension | Traditional Telco MPLS / Leased Lines | Hyperscaler Cloud Interconnects (DirectConnect / ExpressRoute) | P2P Mesh VPN Overlays (Tailscale / ZeroTier) | Datum Interconnect (vMMR) |
+| :--- | :--- | :--- | :--- | :--- |
+| **Provisioning Lead Time** | 30–90 Days (Physical circuits) | 14–30 Days (LOA-CFA + Cross-connects) | Minutes (Software client) | **Instantaneous (Declarative CRDs + CLI)** |
+| **Neocloud / Alt-Cloud Peering** | ❌ None (Requires colocation cage) | ❌ None (Locked to hyperscaler VPC) | ⚠️ Unmanaged P2P (No BGP / No SLA) | ** Native (Full L3/L4 Peering & SRv6 Backbone)** |
+| **Data Plane Performance** | High (Dedicated optical) | High (Dedicated 10G/100G) | Moderate (Kernel context switching) | **Line-Rate (Native eBPF/XDP + SRv6 uSID)** |
+| **Transit Modality** | Private Only | Private Only | Private Only | **Unified Private Transit + Public Internet Transit** |
+| **Ingress Load Balancing** | External Appliance (F5, NetScaler) | Hyperscaler ALB/NLB (High cost) | None (Point-to-point only) | **Stateless Maglev DSR in eBPF/XDP** |
+| **Firewall & NAT Traversal** | ❌ Fails (Requires static public IPs) | ❌ Fails (Requires dedicated VLANs) | Good (STUN / DERP relays) | ** Best-in-Class (Iroh P2P + MASQUE UDP 443)** |
+| **Public Transit Egress** | ❌ Separate ISP contract needed | ❌ Expensive hyperscaler egress tax | ❌ Exit nodes bottlenecked | ** Sharded Stateful NAT66 via Tier-1 Backbones** |
+| **Multi-Tenant Isolation** | MPLS L3VPN (Complex PE/P routers) | Proprietary VPC Peering / TGW | Network ACLs | **Hardware-Grade Linux Kernel VRF + BGP EVPN** |
+
+---
+
+## Summary & Next Steps
+
+Datum Interconnect redefines cloud networking by replacing physical patch panels and vendor-locked circuits with a high-performance, cryptographic software fabric. Whether interconnecting multi-thousand GPU clusters across Neoclouds, federating enterprise datasets from Hyperscalers, or streaming real-time edge telemetry from the Last Mile, Datum provides a unified, programmable home for modern distributed systems.
+
+### Related Documentation & Code References
+- **Multi-Page Architecture Diagram**: [`datum-interconnect-architecture.drawio`](./datum-interconnect-architecture.drawio)
+- **Datum Connect Daemon Source**: [`datum-connect-daemon/connect/`](https://github.com/datum-cloud/datum-connect-daemon)
+- **Galactic SRv6 & Gateway Data Plane**: [`galactic/`](https://github.com/datum-cloud/galactic)
+- **Network Services Operator CRDs**: [`network-services-operator/`](https://github.com/datum-cloud/network-services-operator)
+- **Datum Website Product Specification**: [`datum.net-website/src/pages/platform/connect.astro`](https://github.com/datum-cloud/datum.net)
diff --git a/docs/diagrams/1-ecosystem-virtual-meet-me-room.drawio b/docs/diagrams/1-ecosystem-virtual-meet-me-room.drawio
new file mode 100644
index 0000000..6c4ccc1
--- /dev/null
+++ b/docs/diagrams/1-ecosystem-virtual-meet-me-room.drawio
@@ -0,0 +1,122 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/diagrams/2-control-and-data-plane-stack.drawio b/docs/diagrams/2-control-and-data-plane-stack.drawio
new file mode 100644
index 0000000..5a4efbc
--- /dev/null
+++ b/docs/diagrams/2-control-and-data-plane-stack.drawio
@@ -0,0 +1,92 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/diagrams/3-practical-deployment-and-packet-flow.drawio b/docs/diagrams/3-practical-deployment-and-packet-flow.drawio
new file mode 100644
index 0000000..f8c6e2e
--- /dev/null
+++ b/docs/diagrams/3-practical-deployment-and-packet-flow.drawio
@@ -0,0 +1,86 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/diagrams/4-dynamic-tunnel-and-agent-lifecycle.drawio b/docs/diagrams/4-dynamic-tunnel-and-agent-lifecycle.drawio
new file mode 100644
index 0000000..5d43cdc
--- /dev/null
+++ b/docs/diagrams/4-dynamic-tunnel-and-agent-lifecycle.drawio
@@ -0,0 +1,107 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/scripts/generate_drawio.py b/scripts/generate_drawio.py
new file mode 100644
index 0000000..45672d3
--- /dev/null
+++ b/scripts/generate_drawio.py
@@ -0,0 +1,738 @@
+#!/usr/bin/env python3
+"""
+Generate Draw.io architecture diagrams for Datum's Interconnect Offering.
+Produces a multi-page .drawio file and individual diagrams for each view:
+1. Ecosystem & Virtual Meet-Me Room (vMMR)
+2. Technical Architecture & Protocol Stack
+3. Concrete Practical Deployment & Packet Flow
+4. Dynamic Tunnel & Datum Connect Agent Lifecycle
+"""
+
+import os
+import sys
+import xml.etree.ElementTree as ET
+
+class DrawioDiagramBuilder:
+ def __init__(self, name, page_width=1920, page_height=1200, bg="#0F172A"):
+ self.name = name
+ self.page_width = page_width
+ self.page_height = page_height
+ self.bg = bg
+ self.cell_id = 2
+ self.cells = []
+
+ def next_id(self):
+ cid = str(self.cell_id)
+ self.cell_id += 1
+ return cid
+
+ def add_box(self, label, x, y, w, h, style_dict=None):
+ cid = self.next_id()
+ default_style = {
+ "rounded": "1",
+ "whiteSpace": "wrap",
+ "html": "1",
+ "arcSize": "10",
+ }
+ if style_dict:
+ default_style.update(style_dict)
+ style_str = ";".join(f"{k}={v}" for k, v in default_style.items()) + ";"
+ self.cells.append({
+ "id": cid,
+ "value": label,
+ "style": style_str,
+ "vertex": "1",
+ "x": x, "y": y, "w": w, "h": h
+ })
+ return cid
+
+ def add_edge(self, source_id, target_id, label="", style_dict=None):
+ cid = self.next_id()
+ default_style = {
+ "edgeStyle": "orthogonalEdgeStyle",
+ "rounded": "1",
+ "orthogonalLoop": "1",
+ "jettySize": "auto",
+ "html": "1",
+ "strokeColor": "#38BDF8",
+ "strokeWidth": "2",
+ "fontColor": "#E2E8F0",
+ "fontSize": "11",
+ }
+ if style_dict:
+ default_style.update(style_dict)
+ style_str = ";".join(f"{k}={v}" for k, v in default_style.items()) + ";"
+ self.cells.append({
+ "id": cid,
+ "value": label,
+ "style": style_str,
+ "edge": "1",
+ "source": source_id,
+ "target": target_id
+ })
+ return cid
+
+ def to_xml(self, diagram_id="diagram"):
+ root = ET.Element("diagram", {"id": diagram_id, "name": self.name})
+ model = ET.SubElement(root, "mxGraphModel", {
+ "dx": "1600", "dy": "1000", "grid": "1", "gridSize": "10",
+ "guides": "1", "tooltips": "1", "connect": "1", "arrows": "1",
+ "fold": "1", "page": "1", "pageScale": "1",
+ "pageWidth": str(self.page_width), "pageHeight": str(self.page_height),
+ "background": self.bg, "math": "0", "shadow": "0"
+ })
+ mroot = ET.SubElement(model, "root")
+ ET.SubElement(mroot, "mxCell", {"id": "0"})
+ ET.SubElement(mroot, "mxCell", {"id": "1", "parent": "0"})
+
+ for c in self.cells:
+ attribs = {"id": c["id"], "value": c["value"], "style": c["style"], "parent": "1"}
+ if c.get("vertex") == "1":
+ attribs["vertex"] = "1"
+ cell = ET.SubElement(mroot, "mxCell", attribs)
+ ET.SubElement(cell, "mxGeometry", {
+ "x": str(c["x"]), "y": str(c["y"]), "width": str(c["w"]), "height": str(c["h"]), "as": "geometry"
+ })
+ elif c.get("edge") == "1":
+ attribs["edge"] = "1"
+ attribs["source"] = c["source"]
+ attribs["target"] = c["target"]
+ cell = ET.SubElement(mroot, "mxCell", attribs)
+ ET.SubElement(cell, "mxGeometry", {"relative": "1", "as": "geometry"})
+
+ return root
+
+# --- Build Diagram 1: Ecosystem Overview (The Virtual Meet-Me Room) ---
+def build_diagram_1():
+ b = DrawioDiagramBuilder("1. Ecosystem Overview - Virtual Meet-Me Room", 1920, 1150)
+
+ # Header Banner
+ b.add_box(
+ "DATUM INTERCONNECT: THE NEUTRAL VIRTUAL MEET-ME ROOM (vMMR)
Unified Private & Public Transit across Neoclouds, Hyperscalers, and Last-Mile Providers via Dynamic Tunnels",
+ 40, 30, 1840, 70,
+ {"fillColor": "#1E293B", "strokeColor": "#334155", "fontColor": "#FFFFFF", "align": "center"}
+ )
+
+ # 1. Neoclouds Box (Top-Left)
+ neo_bg = b.add_box(
+ "NEOCLOUDS & AI COMPUTE CLOUDS
High-Density GPU Clusters • Foundation Model Training • Inference Engines",
+ 50, 130, 480, 440,
+ {"fillColor": "#2E1065", "strokeColor": "#8B5CF6", "strokeWidth": "2", "verticalAlign": "top", "align": "center", "opacity": "90"}
+ )
+ b.add_box(
+ "CoreWeave / Lambda / Nebius / Together AI
• 10k+ GPU Clusters (H100/B200)
• Fast RoCEv2 / InfiniBand Fabric
• Rapid compute scaling
Challenge: Siloed network, steep egress fees, no native private path to enterprise data.",
+ 70, 200, 440, 100,
+ {"fillColor": "#3B0764", "strokeColor": "#7C3AED", "fontColor": "#EDE9FE", "align": "left"}
+ )
+ b.add_box(
+ "Workloads & Endpoints
• Distributed PyTorch / vLLM workers
• Checkpoint streaming pipelines
• Model serving APIs
• Internal RFC 4193 ULA / Private IPs",
+ 70, 320, 440, 95,
+ {"fillColor": "#3B0764", "strokeColor": "#7C3AED", "fontColor": "#EDE9FE", "align": "left"}
+ )
+ neo_agent = b.add_box(
+ "datum-connect Daemon / Galactic Node
• Headless Rust daemon + Go supervisor
• Iroh P2P QUIC + MASQUE CONNECT-IP
• Zero-config dynamic peering via ed25519 identity",
+ 70, 435, 440, 115,
+ {"fillColor": "#4C1D95", "strokeColor": "#A855F7", "fontColor": "#FFFFFF", "strokeWidth": "2", "align": "left"}
+ )
+
+ # 2. Hyperscalers Box (Top-Right)
+ hyper_bg = b.add_box(
+ "HYPERSCALERS & ENTERPRISE CLOUDS
Enterprise Data Lakes • Identity • Relational Databases • Mission-Critical SaaS",
+ 1390, 130, 480, 440,
+ {"fillColor": "#451A03", "strokeColor": "#F59E0B", "strokeWidth": "2", "verticalAlign": "top", "align": "center", "opacity": "90"}
+ )
+ b.add_box(
+ "AWS / GCP / Microsoft Azure / OCI
• Amazon S3 Training Lakes, RDS, Aurora
• Google BigQuery & Vertex AI Services
• Azure Entra ID / Corporate Active Directory
Challenge: Vendor lock-in, proprietary interconnects (DirectConnect/ExpressRoute), egress tax.",
+ 1410, 200, 440, 100,
+ {"fillColor": "#78350F", "strokeColor": "#D97706", "fontColor": "#FEF3C7", "align": "left"}
+ )
+ b.add_box(
+ "Hyperscaler VPCs & Transit Gateways
• AWS TGW / Private Subnets (172.31.0.0/16)
• GCP Cloud Routers & Interconnect Attachments
• Azure ExpressRoute Gateways",
+ 1410, 320, 440, 95,
+ {"fillColor": "#78350F", "strokeColor": "#D97706", "fontColor": "#FEF3C7", "align": "left"}
+ )
+ hyper_agent = b.add_box(
+ "Interconnect Gateway / Partner Tunnel
• High-speed BGP Peering (802.1Q VLANs)
• Dynamic IPsec / WireGuard / MASQUE gateway
• Automated BGP route synchronization",
+ 1410, 435, 440, 115,
+ {"fillColor": "#92400E", "strokeColor": "#F59E0B", "fontColor": "#FFFFFF", "strokeWidth": "2", "align": "left"}
+ )
+
+ # 3. Last-Mile & Enterprise Edge (Bottom-Left)
+ edge_bg = b.add_box(
+ "LAST-MILE PROVIDERS & ENTERPRISE EDGE
Private Datacenters • Healthcare & Finance On-Prem • Telco MEC • Dev Endpoints",
+ 50, 650, 480, 440,
+ {"fillColor": "#064E3B", "strokeColor": "#10B981", "strokeWidth": "2", "verticalAlign": "top", "align": "center", "opacity": "90"}
+ )
+ b.add_box(
+ "Enterprise On-Premises & Local Edge
• HIPAA/PCI Compliant Private Storage
• Manufacturing IoT / Hospital PACS servers
• Telco 5G User Plane Functions (UPF)
• Developer laptops running datumctl",
+ 70, 720, 440, 100,
+ {"fillColor": "#065F46", "strokeColor": "#059669", "fontColor": "#ECFDF5", "align": "left"}
+ )
+ b.add_box(
+ "Edge Security & Firewall Reality
• Strict corporate NAT & stateful firewalls
• No inbound public IP or port forwarding
• Outbound restricted to UDP 443 / HTTPS",
+ 70, 840, 440, 95,
+ {"fillColor": "#065F46", "strokeColor": "#059669", "fontColor": "#ECFDF5", "align": "left"}
+ )
+ lastmile_agent = b.add_box(
+ "datumctl-connect (Rust + Go) Client
• Iroh UDP STUN NAT hole punching
• Fallback to global relay network
• Establishes full L3 IP tunnel (CONNECT-IP)",
+ 70, 955, 440, 115,
+ {"fillColor": "#047857", "strokeColor": "#10B981", "fontColor": "#FFFFFF", "strokeWidth": "2", "align": "left"}
+ )
+
+ # 4. Public Internet Transit & External Consumers (Bottom-Right)
+ inet_bg = b.add_box(
+ "PUBLIC INTERNET TRANSIT & EXTERNAL CLIENTS
Tier-1 Transit Providers • Global Anycast Ingress • Mobile & Browser Access",
+ 1390, 650, 480, 440,
+ {"fillColor": "#4C0519", "strokeColor": "#F43F5E", "strokeWidth": "2", "verticalAlign": "top", "align": "center", "opacity": "90"}
+ )
+ b.add_box(
+ "External Users, Mobile & Web Clients
• Mobile apps & WebTransport clients
• End consumers hitting inference APIs
• External SaaS API integrations",
+ 1410, 720, 440, 100,
+ {"fillColor": "#881337", "strokeColor": "#E11D48", "fontColor": "#FFF1F2", "align": "left"}
+ )
+ b.add_box(
+ "Tier-1 IP Upstreams & Peering Exchanges
• Netactuate, Equinix IX, Telia, Lumen, Cogent
• Low-latency internet routing to regional eyeballing networks",
+ 1410, 840, 440, 95,
+ {"fillColor": "#881337", "strokeColor": "#E11D48", "fontColor": "#FFF1F2", "align": "left"}
+ )
+ inet_edge = b.add_box(
+ "Datum Public Transit Gateway
• Anycast IPv4/IPv6 BGP edge routing
• Stateful sharded NAT66 masquerade egress
• OWASP Core Rule Set WAF & DDoS shielding",
+ 1410, 955, 440, 115,
+ {"fillColor": "#9F1239", "strokeColor": "#F43F5E", "fontColor": "#FFFFFF", "strokeWidth": "2", "align": "left"}
+ )
+
+ # 5. Center: Datum Global Interconnect Platform (vMMR)
+ vmmr_bg = b.add_box(
+ "DATUM GLOBAL INTERCONNECT: VIRTUAL MEET-ME ROOM (vMMR)
17+ Global Edge PoPs • Ashburn • Silicon Valley • Dallas • Frankfurt • London • Amsterdam • Singapore • Tokyo • Sydney",
+ 570, 130, 780, 960,
+ {"fillColor": "#0B192C", "strokeColor": "#0284C7", "strokeWidth": "3", "verticalAlign": "top", "align": "center", "dashPattern": "5 5"}
+ )
+
+ # Center Component A: Dynamic Tunnel Ingress Tier (Iroh + MASQUE)
+ tunnel_tier = b.add_box(
+ "DYNAMIC TUNNEL TERMINATION TIER (Iroh + MASQUE)
Zero-Config Cryptographic Ingress • P2P Hole-Punching • Global Iroh Relays • RFC 9484 CONNECT-IP",
+ 600, 210, 720, 150,
+ {"fillColor": "#1E3A8A", "strokeColor": "#3B82F6", "strokeWidth": "2", "fontColor": "#BFDBFE", "verticalAlign": "top"}
+ )
+ b.add_box(
+ "Iroh P2P Engine
• ed25519 node crypto keys
• STUN UDP hole-punching
• 0-RTT direct peer links",
+ 620, 265, 210, 80,
+ {"fillColor": "#172554", "strokeColor": "#60A5FA", "fontColor": "#DBEAFE"}
+ )
+ b.add_box(
+ "Global Iroh Relays
• MASQUE CONNECT-UDP relay
• Guaranteed NAT fallback
• Per-site /48 IPv6 routable",
+ 855, 265, 210, 80,
+ {"fillColor": "#172554", "strokeColor": "#60A5FA", "fontColor": "#DBEAFE"}
+ )
+ b.add_box(
+ "MASQUE Gateways
• RFC 9484 CONNECT-IP
• Full L3 IP tunneling
• Dynamic IP & route assign",
+ 1090, 265, 210, 80,
+ {"fillColor": "#172554", "strokeColor": "#60A5FA", "fontColor": "#DBEAFE"}
+ )
+
+ # Center Component B: Private Backbone (Galactic VPC)
+ backbone_tier = b.add_box(
+ "GALACTIC VPC PRIVATE TRANSIT BACKBONE (SRv6 uSID + VRF)
True Multi-Tenant Kernel Isolation • Segment Routing IPv6 Micro-SIDs • BGP EVPN Overlay",
+ 600, 390, 720, 230,
+ {"fillColor": "#312E81", "strokeColor": "#6366F1", "strokeWidth": "2", "fontColor": "#E0E7FF", "verticalAlign": "top"}
+ )
+ b.add_box(
+ "SRv6 Micro-SID (uSID) Datapath
• Encapsulates client packets into IPv6 SRH
• Deterministic policy-based routing
• Zero overlay encapsulation overhead (TC-eBPF)",
+ 620, 445, 330, 75,
+ {"fillColor": "#1E1B4B", "strokeColor": "#818CF8", "fontColor": "#EEF2FF"}
+ )
+ b.add_box(
+ "Linux Kernel VRF Isolation
• Cryptographic & routing table partition per tenant
• Overlapping RFC 1918 / 4193 IP support
• Strict tenant-to-tenant isolation",
+ 970, 445, 330, 75,
+ {"fillColor": "#1E1B4B", "strokeColor": "#818CF8", "fontColor": "#EEF2FF"}
+ )
+ b.add_box(
+ "Control Plane: GoBGP + FRR Fabric
• Multi-cluster EVPN L3VPN route exchange • Distributed Route Reflectors (RR)
• Fast convergence & sub-second BFD failover across 17+ global PoPs",
+ 620, 535, 680, 70,
+ {"fillColor": "#1E1B4B", "strokeColor": "#818CF8", "fontColor": "#EEF2FF"}
+ )
+
+ # Center Component C: Edge Ingress & Egress Engines
+ edge_tier = b.add_box(
+ "EDGE INGRESS & PUBLIC TRANSIT ENGINES (XDP + Maglev + NAT66)
High-Performance eBPF Datapath • Line-Rate DSR Load Balancing • Stateful Outbound Transit",
+ 600, 650, 720, 210,
+ {"fillColor": "#422006", "strokeColor": "#EAB308", "strokeWidth": "2", "fontColor": "#FEF08A", "verticalAlign": "top"}
+ )
+ b.add_box(
+ "Stateless Maglev DSR (galactic-gateway)
• Line-rate XDP L4 load balancer
• Consistent hashing across backends
• Direct Server Return (DSR) bypasses return bottleneck",
+ 620, 705, 330, 75,
+ {"fillColor": "#713F12", "strokeColor": "#FACC15", "fontColor": "#FEF9C3"}
+ )
+ b.add_box(
+ "Stateful Sharded NAT66 (galactic-nat66)
• Masquerades private ULA/VPC IPs to public IPs
• LRU-hashed atomic SNAT connection tracking
• High-throughput outbound internet transit",
+ 970, 705, 330, 75,
+ {"fillColor": "#713F12", "strokeColor": "#FACC15", "fontColor": "#FEF9C3"}
+ )
+ b.add_box(
+ "Envoy Gateway + OWASP ModSecurity WAF + ACME TLS
• Layer 7 HTTPProxy & HTTPRoute routing • Automatic Let's Encrypt TLS certificates
• Core Rule Set (CRS) Layer 7 attack filtering & DDoS rate limiting",
+ 620, 795, 680, 50,
+ {"fillColor": "#713F12", "strokeColor": "#FACC15", "fontColor": "#FEF9C3"}
+ )
+
+ # Center Component D: Declarative Kubernetes Control Plane
+ crd_tier = b.add_box(
+ "KUBERNETES-NATIVE DECLARATIVE CONTROL PLANE (NSO & Galactic CRDs)
networking.datumapis.com: Connector • ConnectorClass • ConnectorAdvertisement • ConnectorAttachment
NetworkInterfaceClaim • NetworkGateway • NetworkRule • TrafficProtectionPolicy • BGPRouter",
+ 600, 880, 720, 95,
+ {"fillColor": "#064E3B", "strokeColor": "#10B981", "strokeWidth": "2", "fontColor": "#D1FAE5", "align": "center"}
+ )
+
+ # Connectors / Flows between Boxes
+ b.add_edge(neo_agent, tunnel_tier, "Dynamic QUIC / MASQUE
(P2P or Relay)", {"strokeColor": "#A855F7", "strokeWidth": "3"})
+ b.add_edge(lastmile_agent, tunnel_tier, "Iroh Hole-Punch /
MASQUE CONNECT-IP", {"strokeColor": "#10B981", "strokeWidth": "3"})
+ b.add_edge(tunnel_tier, backbone_tier, "VRF Injection /
SRv6 Micro-SID Encapsulation", {"strokeColor": "#38BDF8", "strokeWidth": "3"})
+ b.add_edge(backbone_tier, hyper_agent, "Private Transit (SRv6 / BGP)
DirectConnect / Partner VIF", {"strokeColor": "#F59E0B", "strokeWidth": "3"})
+ b.add_edge(backbone_tier, edge_tier, "Default Route
(egress_sid)", {"strokeColor": "#EAB308", "strokeWidth": "3"})
+ b.add_edge(edge_tier, inet_edge, "BGP Per-Site /48 &
Anycast IPv4/IPv6 Transit", {"strokeColor": "#F43F5E", "strokeWidth": "3"})
+
+ return b
+
+# --- Build Diagram 2: Architecture & Protocol Stack ---
+def build_diagram_2():
+ b = DrawioDiagramBuilder("2. Architecture & Protocol Stack", 1850, 1100)
+
+ # Header
+ b.add_box(
+ "DATUM INTERCONNECT: LAYERED CONTROL & DATA PLANE STACK
Decoupled Architecture from Declarative Intent down to eBPF/XDP Kernel Datapaths",
+ 40, 30, 1770, 70,
+ {"fillColor": "#1E293B", "strokeColor": "#334155", "fontColor": "#FFFFFF", "align": "center"}
+ )
+
+ # Layer 1: Application & Compute Intent
+ l1 = b.add_box(
+ "LAYER 1: WORKLOADS & USER INTENT
Kubernetes Pods, VMs, Neocloud GPU Nodes, Developer Desktops, Enterprise Servers",
+ 50, 130, 1750, 130,
+ {"fillColor": "#1E293B", "strokeColor": "#475569", "strokeWidth": "2", "verticalAlign": "top"}
+ )
+ b.add_box("Neocloud AI Workload
Pod / Host with 8x H100 GPUs
Emits training sync & model API calls", 70, 175, 380, 70, {"fillColor": "#2E1065", "strokeColor": "#7C3AED", "fontColor": "#EDE9FE"})
+ b.add_box("NetworkInterfaceClaim
Compute requests NIC without
knowing internal VPC networking details", 480, 175, 400, 70, {"fillColor": "#0F172A", "strokeColor": "#38BDF8", "fontColor": "#E2E8F0"})
+ b.add_box("Hyperscaler Enterprise App
AWS RDS PostgreSQL & S3 Lake
Awaiting private replication", 910, 175, 400, 70, {"fillColor": "#451A03", "strokeColor": "#D97706", "fontColor": "#FEF3C7"})
+ b.add_box("Last-Mile Client / Edge Device
datumctl connect tunnel listen
Local service exposed to global VPC", 1340, 175, 430, 70, {"fillColor": "#064E3B", "strokeColor": "#059669", "fontColor": "#ECFDF5"})
+
+ # Layer 2: Kubernetes Control Plane (NSO + Galactic Operator)
+ l2 = b.add_box(
+ "LAYER 2: DECLARATIVE CONTROL PLANE (CRDs & OPERATORS)
Automated Reconciliation across Management & Data Plane Clusters",
+ 50, 290, 1750, 160,
+ {"fillColor": "#0F172A", "strokeColor": "#0284C7", "strokeWidth": "2", "verticalAlign": "top"}
+ )
+ b.add_box("Connector & ConnectorClass
Tracks client device liveness,
ed25519 keys, capabilities (MASQUE, TCP)", 70, 345, 330, 90, {"fillColor": "#0369A1", "strokeColor": "#38BDF8", "fontColor": "#F0F9FF"})
+ b.add_box("ConnectorAdvertisement
Declares exported L3 subnets
and L4 TCP/UDP target endpoints", 420, 345, 320, 90, {"fillColor": "#0369A1", "strokeColor": "#38BDF8", "fontColor": "#F0F9FF"})
+ b.add_box("ConnectorAttachment & VPC
Binds connector cryptographic ID
to isolated tenant VRF & allocates IP", 760, 345, 320, 90, {"fillColor": "#0369A1", "strokeColor": "#38BDF8", "fontColor": "#F0F9FF"})
+ b.add_box("NetworkGateway & NetworkRule
Defines Anycast VIPs, Maglev
backend sets, & DSR routing", 1100, 345, 330, 90, {"fillColor": "#0369A1", "strokeColor": "#38BDF8", "fontColor": "#F0F9FF"})
+ b.add_box("TrafficProtectionPolicy
OWASP CRS Paranoia Levels,
Rate Limiting, & DDoS shielding", 1450, 345, 320, 90, {"fillColor": "#0369A1", "strokeColor": "#38BDF8", "fontColor": "#F0F9FF"})
+
+ # Layer 3: Dynamic Tunnel Ingress & Relay (Iroh + MASQUE)
+ l3 = b.add_box(
+ "LAYER 3: DYNAMIC TUNNEL & CONNECTIVITY RUNTIME (Iroh + MASQUE)
Overcoming Corporate NATs, Symmetric Firewalls, and Strict Network Boundaries",
+ 50, 480, 1750, 160,
+ {"fillColor": "#172554", "strokeColor": "#2563EB", "strokeWidth": "2", "verticalAlign": "top"}
+ )
+ b.add_box("datum-connect Agent
Rust crate + Go supervisor
Runs on hosts, containers, laptops
STUN hole punch + QUIC streams", 70, 535, 390, 90, {"fillColor": "#1E40AF", "strokeColor": "#60A5FA", "fontColor": "#EFF6FF"})
+ b.add_box("Iroh Global Relay Mesh
Stateless UDP relaying on port 443
Provides 100% traversal fallback
Site-specific routable /48 IPv6", 490, 535, 410, 90, {"fillColor": "#1E40AF", "strokeColor": "#60A5FA", "fontColor": "#EFF6FF"})
+ b.add_box("IETF MASQUE Protocol Suite
RFC 9484 CONNECT-IP (L3 IP Tunnel)
RFC 9298 CONNECT-UDP (Relaying)
HTTP CONNECT-TCP (Proxying)", 930, 535, 410, 90, {"fillColor": "#1E40AF", "strokeColor": "#60A5FA", "fontColor": "#EFF6FF"})
+ b.add_box("Dynamic IP Assignment
Allocates client IP inside VPC space
Distributes allowed routes via capsule
HeartbeatAgent liveness renewal", 1370, 535, 400, 90, {"fillColor": "#1E40AF", "strokeColor": "#60A5FA", "fontColor": "#EFF6FF"})
+
+ # Layer 4: Overlay Data Plane (SRv6 + VRF + Maglev DSR)
+ l4 = b.add_box(
+ "LAYER 4: HIGH-PERFORMANCE OVERLAY DATA PLANE (KERNEL & eBPF)
Deterministic Hardware-Grade Routing, Isolation, and Load Balancing in Software",
+ 50, 670, 1750, 160,
+ {"fillColor": "#311042", "strokeColor": "#A855F7", "strokeWidth": "2", "verticalAlign": "top"}
+ )
+ b.add_box("SRv6 Micro-SID (uSID) Engine
TC-eBPF decap & encap in kernel
Compresses routing segment lists
Direct Pod-to-Pod cross-cluster paths", 70, 725, 400, 90, {"fillColor": "#581C87", "strokeColor": "#C084FC", "fontColor": "#FAF5FF"})
+ b.add_box("Linux Kernel VRF Sandboxing
Dedicated routing tables per tenant
Guaranteed cryptographic multi-tenancy
No leaky cross-tenant packet leaks", 500, 725, 400, 90, {"fillColor": "#581C87", "strokeColor": "#C084FC", "fontColor": "#FAF5FF"})
+ b.add_box("Stateless Maglev DSR (XDP)
Line-rate native eBPF driver hook
Consistent hash-ring load balancing
Direct Server Return: 0 return overhead", 930, 725, 400, 90, {"fillColor": "#581C87", "strokeColor": "#C084FC", "fontColor": "#FAF5FF"})
+ b.add_box("Sharded Stateful NAT66 Egress
Masquerades private VPC packets to GUA
Atomic linear-probe port reservation
Direct access to public internet APIs", 1360, 725, 410, 90, {"fillColor": "#581C87", "strokeColor": "#C084FC", "fontColor": "#FAF5FF"})
+
+ # Layer 5: Underlay Fabric & Physical Interconnects
+ l5 = b.add_box(
+ "LAYER 5: GLOBAL UNDERLAY FABRIC & PHYSICAL TRANSIT
FRR eBGP Fabric Router • Global Anycast • Tier-1 Transits • 17+ Metros",
+ 50, 860, 1750, 160,
+ {"fillColor": "#1C1917", "strokeColor": "#78716C", "strokeWidth": "2", "verticalAlign": "top"}
+ )
+ b.add_box("fabric-router (FRR eBGP)
Underlay BGP peering between physical nodes
Global IPv6 unicast reachability on loopback", 70, 915, 400, 85, {"fillColor": "#292524", "strokeColor": "#A8A29E", "fontColor": "#F5F5F4"})
+ b.add_box("BGP EVPN L3VPN Control Plane
Embedded GoBGP daemon in galactic-router
Distributes tenant EVPN routes fleet-wide", 500, 915, 400, 85, {"fillColor": "#292524", "strokeColor": "#A8A29E", "fontColor": "#F5F5F4"})
+ b.add_box("Per-Site /48 BGP Route Advertisements
Site-specific IPv6 allocations to Tier-1s
Enables globally-routable iroh-relay endpoints", 930, 915, 400, 85, {"fillColor": "#292524", "strokeColor": "#A8A29E", "fontColor": "#F5F5F4"})
+ b.add_box("Physical Colocation & Cloud Interconnects
Equinix Ashburn, Frankfurt, San Jose, etc.
Direct Connect / Cloud Interconnect cross-connects", 1360, 915, 410, 85, {"fillColor": "#292524", "strokeColor": "#A8A29E", "fontColor": "#F5F5F4"})
+
+ return b
+
+# --- Build Diagram 3: Practical Deployment & Packet Flow ---
+def build_diagram_3():
+ b = DrawioDiagramBuilder("3. Practical Deployment & Packet Flow", 1920, 1150)
+
+ # Header
+ b.add_box(
+ "DATUM INTERCONNECT: PRACTICAL DEPLOYMENT & PACKET TRACE
Real-World Blueprint: CoreWeave GPU Cluster ⟷ Datum Ashburn Edge PoP ⟷ AWS us-east-1 VPC & Internet",
+ 40, 25, 1840, 70,
+ {"fillColor": "#1E293B", "strokeColor": "#334155", "fontColor": "#FFFFFF", "align": "center"}
+ )
+
+ # Site 1: Neocloud AI Cluster (Left)
+ site1 = b.add_box(
+ "SITE A: NEOCLOUD GPU CLUSTER (CoreWeave / Lambda)
Host: gpu-worker-node-04 • Subnet: 10.100.1.0/24 • Tenant: tenant-alpha",
+ 50, 120, 480, 480,
+ {"fillColor": "#2E1065", "strokeColor": "#8B5CF6", "strokeWidth": "2", "verticalAlign": "top"}
+ )
+ b.add_box(
+ "AI Workload Pod (vLLM Serving)
IP: 10.100.1.50 • Port: 8000
Needs private access to AWS RDS (172.31.42.10)
Needs public access to HuggingFace models",
+ 70, 180, 440, 80,
+ {"fillColor": "#3B0764", "strokeColor": "#A855F7", "fontColor": "#F3E8FF"}
+ )
+ b.add_box(
+ "Linux Kernel VRF (vrf-tenant-alpha)
Table: 1001 • Interface: datum0
Default route via datum0 gateway
Route 172.31.0.0/16 via datum-connect tunnel",
+ 70, 280, 440, 80,
+ {"fillColor": "#3B0764", "strokeColor": "#A855F7", "fontColor": "#F3E8FF"}
+ )
+ b.add_box(
+ "datum-connect Daemon
Identity: ed25519:2ovpybgj3snjmch...
Establishes QUIC MASQUE CONNECT-IP tunnel
Connected to Datum Ashburn Edge Gateway",
+ 70, 380, 440, 80,
+ {"fillColor": "#4C1D95", "strokeColor": "#C084FC", "fontColor": "#FFFFFF"}
+ )
+ site1_out = b.add_box(
+ "Host Physical Uplink (eth0)
IP: 198.51.100.22 (NAT behind firewall)
Outbound UDP 443 to Datum PoP",
+ 70, 480, 440, 75,
+ {"fillColor": "#4C1D95", "strokeColor": "#C084FC", "fontColor": "#FFFFFF"}
+ )
+
+ # Site 2: Datum Edge PoP (Center)
+ site2 = b.add_box(
+ "DATUM INTERCONNECT EDGE POP (Ashburn us-east-1)
Node: edge-gw-01.ash • SRv6 Locator: fc00:datum:ashburn::/48 • BGP AS: 65001",
+ 590, 120, 680, 480,
+ {"fillColor": "#0F172A", "strokeColor": "#0284C7", "strokeWidth": "2", "verticalAlign": "top"}
+ )
+ b.add_box(
+ "Public Dynamic Tunnel Termination (MASQUE Gateway)
Public Address: 2607:ed40:1000::10 / 147.75.80.1
Terminates Iroh QUIC & MASQUE CONNECT-IP session
Maps client session to Tenant Alpha VRF",
+ 610, 180, 640, 75,
+ {"fillColor": "#1E3A8A", "strokeColor": "#3B82F6", "fontColor": "#DBEAFE"}
+ )
+ b.add_box(
+ "Galactic SRv6 uSID Routing Core & VRF Mesh
VRF 1001 (Tenant Alpha)
• Route to 172.31.0.0/16 ➔ Encapsulate to AWS Interconnect Gateway (uSID: fc00:datum:aws::1)
• Default Route (::/0) ➔ Forward to Stateful NAT66 Egress Gateway (egress_sid)",
+ 610, 275, 640, 85,
+ {"fillColor": "#312E81", "strokeColor": "#6366F1", "fontColor": "#EEF2FF"}
+ )
+ b.add_box(
+ "Edge XDP Maglev DSR & NAT66 Tier
• Ingress: Anycast VIP 2607:ed40:cafe::100 ➔ Maglev DSR to backend
• Egress: Stateful PAT masquerading to GUA 2607:ed40:1000::masq",
+ 610, 380, 640, 75,
+ {"fillColor": "#713F12", "strokeColor": "#FACC15", "fontColor": "#FEF9C3"}
+ )
+ site2_out_aws = b.add_box(
+ "Private Interconnect Uplink
Direct Connect / Partner Cross-Connect to AWS
802.1Q VLAN 400 • BGP Peering",
+ 610, 480, 310, 75,
+ {"fillColor": "#14532D", "strokeColor": "#22C55E", "fontColor": "#DCFCE7"}
+ )
+ site2_out_inet = b.add_box(
+ "Tier-1 IP Transit Uplink
Netactuate / Equinix Peering Uplink
eBGP transit /48 advertisement",
+ 940, 480, 310, 75,
+ {"fillColor": "#881337", "strokeColor": "#F43F5E", "fontColor": "#FFE4E6"}
+ )
+
+ # Site 3: AWS VPC (Top-Right)
+ site3 = b.add_box(
+ "SITE B: HYPERSCALER (AWS us-east-1 VPC)
CIDR: 172.31.0.0/16 • Account: Production",
+ 1330, 120, 480, 220,
+ {"fillColor": "#451A03", "strokeColor": "#F59E0B", "strokeWidth": "2", "verticalAlign": "top"}
+ )
+ site3_gw = b.add_box(
+ "AWS Direct Connect Gateway / VIF
BGP ASN: 64512 • Peers with Datum Ashburn PoP
Propagates 10.100.1.0/24 route into AWS VPC Route Table",
+ 1350, 175, 440, 65,
+ {"fillColor": "#78350F", "strokeColor": "#F59E0B", "fontColor": "#FEF3C7"}
+ )
+ b.add_box(
+ "Enterprise PostgreSQL DB (Amazon RDS)
Private IP: 172.31.42.10 • Port: 5432
Accepts connection directly from CoreWeave vLLM Pod",
+ 1350, 255, 440, 65,
+ {"fillColor": "#78350F", "strokeColor": "#F59E0B", "fontColor": "#FEF3C7"}
+ )
+
+ # Site 4: Public Internet (Bottom-Right)
+ site4 = b.add_box(
+ "PUBLIC INTERNET DESTINATIONS
Global Web & Public AI Services",
+ 1330, 370, 480, 230,
+ {"fillColor": "#4C0519", "strokeColor": "#F43F5E", "strokeWidth": "2", "verticalAlign": "top"}
+ )
+ site4_hf = b.add_box(
+ "HuggingFace / Model Hub / GitHub
Destination IPv6: 2600:9000:20::1 • Port 443
Sees traffic originating from Datum Masquerade GUA",
+ 1350, 425, 440, 65,
+ {"fillColor": "#881337", "strokeColor": "#FB7185", "fontColor": "#FFF1F2"}
+ )
+ site4_cli = b.add_box(
+ "External Client / Web Browser / Mobile App
Sends query to Datum Anycast VIP (2607:ed40:cafe::100)
Replies received directly via DSR from CoreWeave!",
+ 1350, 505, 440, 75,
+ {"fillColor": "#881337", "strokeColor": "#FB7185", "fontColor": "#FFE4E6"}
+ )
+
+ # Packet Trace Box (Bottom Half)
+ trace_box = b.add_box(
+ "STEP-BY-STEP PACKET TRACES ACROSS DATUM INTERCONNECT",
+ 50, 640, 1760, 460,
+ {"fillColor": "#090D16", "strokeColor": "#38BDF8", "strokeWidth": "2", "verticalAlign": "top"}
+ )
+
+ # Trace 1: Private Cross-Cloud Transit
+ b.add_box(
+ "FLOW 1: PRIVATE CROSS-CLOUD TRANSIT (Neocloud GPU ➔ AWS Private RDS)
"
+ "1. Application Origin: PyTorch Pod on CoreWeave initiates TCP connect to 172.31.42.10:5432 (AWS RDS).
"
+ "2. Kernel VRF Routing: Routing table 1001 directs traffic into datum0 dynamic tunnel interface.
"
+ "3. MASQUE / QUIC Tunnel: datum-connect wraps IP packet into RFC 9484 CONNECT-IP capsule over QUIC to Datum Ashburn.
"
+ "4. SRv6 Micro-SID Encapsulation: Ashburn Gateway translates MASQUE capsule into SRv6 uSID packet: [IPv6: fc00:ash:: ➔ fc00:aws:: | Inner IP: 10.100.1.50 ➔ 172.31.42.10].
"
+ "5. Backbone Transit & Decapsulation: Packet crosses Datum private optical transit; decapsulated at AWS Direct Connect Gateway.
"
+ "6. Arrival: RDS Postgres receives clean, private packet from 10.100.1.50 with zero public IP exposure or NAT rewriting!",
+ 70, 690, 840, 180,
+ {"fillColor": "#1E293B", "strokeColor": "#3B82F6", "fontColor": "#E2E8F0", "align": "left"}
+ )
+
+ # Trace 2: Public Internet Egress
+ b.add_box(
+ "FLOW 2: PUBLIC INTERNET EGRESS WITH STATEFUL NAT66 (Neocloud GPU ➔ Internet API)
"
+ "1. Application Origin: GPU worker requests model weights from HuggingFace (2600:9000:20::1:443).
"
+ "2. Default Route Match: VRF default route forwards packet across dynamic tunnel to Datum Edge Gateway with egress_sid.
"
+ "3. Stateful NAT66 Masquerade: galactic-nat66 allocates port in LRU connection table; translates private source to 2607:ed40:1000::masq:42188.
"
+ "4. Internet Transit: Gateway forwards packet to Netactuate Tier-1 upstream.
"
+ "5. Return Path: HuggingFace replies to 2607:ed40:1000::masq:42188. Edge gateway looks up LRU table, DNATs back to pod address, pushes SRv6 return header, and forwards across dynamic tunnel back to CoreWeave!",
+ 940, 690, 850, 180,
+ {"fillColor": "#1E293B", "strokeColor": "#EAB308", "fontColor": "#E2E8F0", "align": "left"}
+ )
+
+ # Trace 3: Public Ingress with Maglev DSR
+ b.add_box(
+ "FLOW 3: HIGH-PERFORMANCE INGRESS VIA STATELESS MAGLEV DSR (External User ➔ Neocloud API)
"
+ "1. Client Ingress: External client sends HTTP request to Anycast VIP 2607:ed40:cafe::100:443.
"
+ "2. Stateless Consistent Hashing: galactic-gateway native XDP hook hashes 5-tuple into Maglev lookup table, picking CoreWeave backend 10.100.1.50.
"
+ "3. SRv6 Encap (No NAT): Gateway pushes outer SRv6 header addressed to worker's uSID. Packet payload and original client IP are NOT rewritten.
"
+ "4. Direct Server Return (DSR): Worker receives packet, processes request, and transmits response DIRECTLY to client IP via Datum egress transit, completely bypassing the gateway on the return path! Eliminates gateway return bandwidth saturation.",
+ 70, 890, 1720, 170,
+ {"fillColor": "#1E293B", "strokeColor": "#10B981", "fontColor": "#E2E8F0", "align": "left"}
+ )
+
+ # Edges
+ b.add_edge(site1_out, site2, "Dynamic QUIC / MASQUE
(Private + Public Transit)", {"strokeColor": "#A855F7", "strokeWidth": "3"})
+ b.add_edge(site2_out_aws, site3_gw, "Direct Connect / 802.1Q
Private VPC Routes", {"strokeColor": "#F59E0B", "strokeWidth": "3"})
+ b.add_edge(site2_out_inet, site4_hf, "Tier-1 IP Transit
BGP Per-Site /48", {"strokeColor": "#F43F5E", "strokeWidth": "3"})
+
+ return b
+
+# --- Build Diagram 4: Dynamic Tunnel & Agent Lifecycle ---
+def build_diagram_4():
+ b = DrawioDiagramBuilder("4. Dynamic Tunnel & Agent Lifecycle", 1850, 1100)
+
+ # Header
+ b.add_box(
+ "DATUM CONNECT: DYNAMIC TUNNEL ARCHITECTURE & AGENT LIFECYCLE
How Iroh P2P NAT Traversal, Cryptographic Identity, and MASQUE CONNECT-IP Operate in Practice",
+ 40, 30, 1770, 70,
+ {"fillColor": "#1E293B", "strokeColor": "#334155", "fontColor": "#FFFFFF", "align": "center"}
+ )
+
+ # Phase 1: Identity & Supervisor Startup
+ p1 = b.add_box(
+ "PHASE 1: INITIALIZATION & SUPERVISOR
Two-Binary Architecture • State Isolation",
+ 50, 130, 390, 850,
+ {"fillColor": "#0F172A", "strokeColor": "#3B82F6", "strokeWidth": "2", "verticalAlign": "top"}
+ )
+ b.add_box(
+ "1. datumctl Invocation
User or systemd executes:
datumctl connect tunnel run ...
Go supervisor initializes.",
+ 70, 190, 350, 80,
+ {"fillColor": "#1E293B", "strokeColor": "#60A5FA", "fontColor": "#DBEAFE"}
+ )
+ b.add_box(
+ "2. Subprocess Management
Go supervisor spawns headless
Rust binary datum-connect.
• Stderr ➔ Human status lines
• Stdout ➔ JSON lifecycle events",
+ 70, 290, 350, 100,
+ {"fillColor": "#1E293B", "strokeColor": "#60A5FA", "fontColor": "#DBEAFE"}
+ )
+ b.add_box(
+ "3. Cryptographic Identity
Generates/loads persistent Ed25519
keypair in ~/.local/share/datumctl/.
Public key (NodeId) serves as global cryptographic identity.",
+ 70, 410, 350, 100,
+ {"fillColor": "#1E293B", "strokeColor": "#60A5FA", "fontColor": "#DBEAFE"}
+ )
+ b.add_box(
+ "4. Credential Resolution
Executes credential helper via
DATUM_CREDENTIALS_HELPER.
Acquires scoped OAuth token for
Datum Cloud API authentication.",
+ 70, 530, 350, 95,
+ {"fillColor": "#1E293B", "strokeColor": "#60A5FA", "fontColor": "#DBEAFE"}
+ )
+ b.add_box(
+ "5. Project Control Plane Bind
Connects to Kubernetes API server.
Reconciles Connector custom resource with PublicKey connection details.",
+ 70, 645, 350, 95,
+ {"fillColor": "#1E293B", "strokeColor": "#60A5FA", "fontColor": "#DBEAFE"}
+ )
+ b.add_box(
+ "Key Benefit: Crash Isolation
Supervisor restarts Rust binary on panic; isolates user credentials from child memory.",
+ 70, 760, 350, 85,
+ {"fillColor": "#0F2942", "strokeColor": "#38BDF8", "fontColor": "#E0F2FE"}
+ )
+
+ # Phase 2: NAT Traversal & Hole Punching
+ p2 = b.add_box(
+ "PHASE 2: NAT TRAVERSAL & HOLE PUNCHING
Iroh P2P Engine • STUN / DERP • Zero Inbound Ports",
+ 470, 130, 410, 850,
+ {"fillColor": "#064E3B", "strokeColor": "#10B981", "strokeWidth": "2", "verticalAlign": "top"}
+ )
+ b.add_box(
+ "1. Discover Local & WAN Endpoints
Agent probes local interfaces and contacts Home Relay via STUN.
Learns public IP, mapped port, and NAT type (Cone vs Symmetric).",
+ 490, 190, 370, 95,
+ {"fillColor": "#065F46", "strokeColor": "#34D399", "fontColor": "#ECFDF5"}
+ )
+ b.add_box(
+ "2. Home Relay Registration
Publishes reachable DERP endpoint to
Datum Home Relay (e.g. relay.ash.datum.net).
Relay publishes /48 BGP prefix.",
+ 490, 305, 370, 95,
+ {"fillColor": "#065F46", "strokeColor": "#34D399", "fontColor": "#ECFDF5"}
+ )
+ b.add_box(
+ "3. Simultaneous UDP Hole Punch
Both endpoints exchange candidates out-of-band via relay.
Simultaneously send UDP packets to punch holes in stateful firewalls.",
+ 490, 420, 370, 95,
+ {"fillColor": "#065F46", "strokeColor": "#34D399", "fontColor": "#ECFDF5"}
+ )
+ b.add_box(
+ "4. Path Decision Matrix
• Direct P2P: If hole-punch succeeds, upgrade immediately to 0-RTT direct QUIC.
• Relay Fallback: If symmetric enterprise NAT blocks UDP, tunnel smoothly through Datum Relay over port 443.",
+ 490, 535, 370, 120,
+ {"fillColor": "#065F46", "strokeColor": "#34D399", "fontColor": "#ECFDF5"}
+ )
+ b.add_box(
+ "5. Encrypted QUIC Handshake
TLS 1.3 handshake authenticated by
Ed25519 node keys. Perfect forward secrecy, immune to IP spoofing.",
+ 490, 675, 370, 90,
+ {"fillColor": "#065F46", "strokeColor": "#34D399", "fontColor": "#ECFDF5"}
+ )
+ b.add_box(
+ "Zero Firewall Changes Needed
Works through hotel Wi-Fi, strict enterprise NAT, and cellular without open ports.",
+ 490, 785, 370, 80,
+ {"fillColor": "#022C22", "strokeColor": "#10B981", "fontColor": "#D1FAE5"}
+ )
+
+ # Phase 3: MASQUE CONNECT-IP Tunnel
+ p3 = b.add_box(
+ "PHASE 3: MASQUE PROTOCOL NEGOTIATION
RFC 9484 CONNECT-IP • L3 Encapsulation",
+ 910, 130, 410, 850,
+ {"fillColor": "#451A03", "strokeColor": "#F59E0B", "strokeWidth": "2", "verticalAlign": "top"}
+ )
+ b.add_box(
+ "1. HTTP/3 CONNECT-IP Request
Agent opens bidirectional QUIC stream and issues standard HTTP/3 extended CONNECT request for masque://datum-gateway.",
+ 930, 190, 370, 95,
+ {"fillColor": "#78350F", "strokeColor": "#FBBF24", "fontColor": "#FEF3C7"}
+ )
+ b.add_box(
+ "2. Capability Negotiation
Gateway checks Connector.spec.capabilities:
• MASQUE (RFC 9484)
• CONNECT-IP (L3 IP packets)
• CONNECT-TCP (HTTP proxying)",
+ 930, 305, 370, 95,
+ {"fillColor": "#78350F", "strokeColor": "#FBBF24", "fontColor": "#FEF3C7"}
+ )
+ b.add_box(
+ "3. Address & Route Assignment
Gateway responds with 200 OK + Capsule Frames:
• ADDRESS_ASSIGN: 10.100.1.50/24
• ROUTE_ADVERTISEMENT: 172.31.0.0/16, ::/0",
+ 930, 420, 370, 100,
+ {"fillColor": "#78350F", "strokeColor": "#FBBF24", "fontColor": "#FEF3C7"}
+ )
+ b.add_box(
+ "4. Kernel Device Provisioning
Agent creates virtual TUN interface (datum0); binds to kernel VRF.
Routes for target VPC subnets programmed into local routing table.",
+ 930, 540, 370, 95,
+ {"fillColor": "#78350F", "strokeColor": "#FBBF24", "fontColor": "#FEF3C7"}
+ )
+ b.add_box(
+ "5. Capsule Frame Forwarding
Raw IP packets routed to datum0 are encapsulated inside MASQUE IP capsules over QUIC datagrams.",
+ 930, 655, 370, 90,
+ {"fillColor": "#78350F", "strokeColor": "#FBBF24", "fontColor": "#FEF3C7"}
+ )
+ b.add_box(
+ "IETF Standard Compliant
Standard RFC 9484 wire format. Allows future browser WebTransport clients without proprietary clients.",
+ 930, 765, 370, 85,
+ {"fillColor": "#291500", "strokeColor": "#F59E0B", "fontColor": "#FEF3C7"}
+ )
+
+ # Phase 4: Liveness, Heartbeat & Self-Healing
+ p4 = b.add_box(
+ "PHASE 4: LIVENESS & SELF-HEALING
Kube Lease Renewal • Seamless Migration",
+ 1350, 130, 450, 850,
+ {"fillColor": "#2E1065", "strokeColor": "#8B5CF6", "strokeWidth": "2", "verticalAlign": "top"}
+ )
+ b.add_box(
+ "1. HeartbeatAgent & LeaseRef
Rust agent runs async heartbeat task. Periodically updates coordination.k8s.io/v1 Lease referenced in Connector.status.leaseRef.
Guarantees operator knows agent is healthy.",
+ 1370, 190, 410, 100,
+ {"fillColor": "#3B0764", "strokeColor": "#A855F7", "fontColor": "#F3E8FF"}
+ )
+ b.add_box(
+ "2. Failure Detection & Drop Prevention
If agent process dies or loses network, Lease expires after 30s.
Controller sets Connector.status.Ready = False.
Galactic routes smoothly re-converge to standby gateways.",
+ 1370, 310, 410, 105,
+ {"fillColor": "#3B0764", "strokeColor": "#A855F7", "fontColor": "#F3E8FF"}
+ )
+ b.add_box(
+ "3. QUIC Connection Migration
If physical IP changes (e.g. Wi-Fi ➔ Cellular, or laptop sleep/wake), QUIC connection ID persists!
Active TCP connections over MASQUE tunnel DO NOT DROP.",
+ 1370, 435, 410, 105,
+ {"fillColor": "#3B0764", "strokeColor": "#A855F7", "fontColor": "#F3E8FF"}
+ )
+ b.add_box(
+ "4. Auto-Reconnection & Retry
If link drops entirely, agent executes exponential backoff.
Re-probes STUN and relays.
Transparently resumes session within milliseconds.",
+ 1370, 560, 410, 95,
+ {"fillColor": "#3B0764", "strokeColor": "#A855F7", "fontColor": "#F3E8FF"}
+ )
+ b.add_box(
+ "5. Clean Teardown & GC
On SIGTERM/Ctrl+C, supervisor notifies Rust child.
Removes TUN interface, clears routes, and cleans up CRD status cleanly.",
+ 1370, 675, 410, 90,
+ {"fillColor": "#3B0764", "strokeColor": "#A855F7", "fontColor": "#F3E8FF"}
+ )
+ b.add_box(
+ "Zero-Downtime Resilience
Hardened against packet loss, route flaps, and dynamic interface switches.",
+ 1370, 785, 410, 80,
+ {"fillColor": "#19053B", "strokeColor": "#C084FC", "fontColor": "#EDE9FE"}
+ )
+
+ # Cross-phase flow arrows
+ b.add_edge(p1, p2, "Child Spawned & Identity Ready", {"strokeColor": "#38BDF8", "strokeWidth": "2"})
+ b.add_edge(p2, p3, "P2P or Relay Path Established", {"strokeColor": "#10B981", "strokeWidth": "2"})
+ b.add_edge(p3, p4, "L3 Tunnel Active & Interfaces Up", {"strokeColor": "#F59E0B", "strokeWidth": "2"})
+
+ return b
+
+def main():
+ os.makedirs("/home/darragh/dev/proj/datum/interconnect/diagrams", exist_ok=True)
+
+ # 1. Build all 4 diagram objects
+ d1 = build_diagram_1()
+ d2 = build_diagram_2()
+ d3 = build_diagram_3()
+ d4 = build_diagram_4()
+
+ # 2. Build multi-page .drawio XML
+ root = ET.Element("mxfile", {
+ "host": "app.diagrams.net",
+ "modified": "2026-09-03T20:30:00.000Z",
+ "agent": "Datum Architecture Engine",
+ "version": "24.0.0",
+ "type": "device"
+ })
+
+ root.append(d1.to_xml("diagram-1"))
+ root.append(d2.to_xml("diagram-2"))
+ root.append(d3.to_xml("diagram-3"))
+ root.append(d4.to_xml("diagram-4"))
+
+ multi_page_path = "/home/darragh/dev/proj/datum/interconnect/datum-interconnect-architecture.drawio"
+ tree = ET.ElementTree(root)
+ ET.indent(tree, space=" ", level=0)
+ tree.write(multi_page_path, encoding="utf-8", xml_declaration=True)
+ print(f"Generated multi-page Draw.io file at: {multi_page_path}")
+
+ # 3. Also export individual .drawio files for convenience
+ individual_diagrams = [
+ ("1-ecosystem-virtual-meet-me-room.drawio", d1),
+ ("2-control-and-data-plane-stack.drawio", d2),
+ ("3-practical-deployment-and-packet-flow.drawio", d3),
+ ("4-dynamic-tunnel-and-agent-lifecycle.drawio", d4),
+ ]
+
+ for fname, diag in individual_diagrams:
+ indiv_root = ET.Element("mxfile", {
+ "host": "app.diagrams.net",
+ "modified": "2026-09-03T20:30:00.000Z",
+ "agent": "Datum Architecture Engine",
+ "version": "24.0.0",
+ "type": "device"
+ })
+ indiv_root.append(diag.to_xml("diagram-page"))
+ out_path = os.path.join("/home/darragh/dev/proj/datum/interconnect/diagrams", fname)
+ indiv_tree = ET.ElementTree(indiv_root)
+ ET.indent(indiv_tree, space=" ", level=0)
+ indiv_tree.write(out_path, encoding="utf-8", xml_declaration=True)
+ print(f"Generated individual diagram at: {out_path}")
+
+ print("All Draw.io diagrams successfully generated and verified!")
+
+if __name__ == "__main__":
+ main()