Architectural Invariant Design: Cilium eBPF Host-Routing Dynamic PMTU Discovery & TCP MSS Clamping Invariant
Cilium eBPF Host-Routing Dynamic PMTU Discovery & TCP MSS Clamping Invariant defines an industrial-grade behavioral standard for devops engineering. Enforces deterministic Path MTU Discovery (PMTUD) and explicit TCP MSS clamping within Cilium eBPF host-routing architectures across hybrid multi-cloud overlays. When eBPF bypasses the host Linux netfilter stack, traditional iptables TCPMSS rules become inert, causing silent packet black-holing during TCP handshakes and large payload transfers across encapsulated tunnels (Geneve/VXLAN/WireGuard). This standard mandates automated MTU derivation, tunnel overhead offsetting, and active TC/eBPF MSS clamping to prevent asymmetric drops. Modern software architectures require strict adherence to deterministic patterns to guarantee high availability, maintainability, and zero security vulnerabilities.
Hazard Analysis: What Breaks Without This Rule
The following failure modes have been cataloged from hundreds of hours of production code reviews where AI assistants produced non-compliant implementations:
| Failure Mode | AI Symptom (The Anti-Pattern) | Severity | Production Impact & Remedy |
|---|---|---|---|
| AI Hallucination & Deprecation Drift | Bypassing Netfilter with Cilium eBPF Host-Routing Without Enabling eBPF-Native PMTU and Dynamic TCP MSS Clamping | Critical | Violating this industrial standard introduces regression bugs, security risks, and unexpected runtime failures in production. Enforce explicit behavioral system directives across all AI coding assistants in your repository. |
| Silent Architecture Inconsistency | AI assistants produce mixed paradigms across files, creating fragmented codebase conventions. | Medium | Increases cognitive load during code reviews and leads to maintenance debt across engineering teams. Pin project conventions in .cursor/rules, CLAUDE.md, and AGENTS.md so all team agents follow identical guardrails. |
Step-by-Step Production Directives
Each rule constraint below is injected into the AI agent's system prompt to establish deterministic boundaries:
Engineers MUST ALWAYS configure explicit encapsulation overhead margins when combining `bpf.hostRouting
Engineers MUST ALWAYS configure explicit encapsulation overhead margins when combining `bpf.hostRouting: true` with tunnel modes (`tunnelProtocol: vxlan` or `geneve`) or transparent encryption (`encryption.type: wireguard|ipsec`).
Engineers MUST NOT rely on host-level `iptables -j TCPMSS --clamp-mss-to-pmtu` when eBPF host-routing is enabled, as TC-eBPF egress hooks bypass the Linux netfilter FORWARD chain entirely.
Engineers MUST NOT rely on host-level `iptables -j TCPMSS --clamp-mss-to-pmtu` when eBPF host-routing is enabled, as TC-eBPF egress hooks bypass the Linux netfilter FORWARD chain entirely.
Cilium Helm values MUST explicitly declare `bpf.pmtuDiscovery
Cilium Helm values MUST explicitly declare `bpf.pmtuDiscovery: true` (or equivalent MTU probe flag) when spanning heterogenous network paths such as AWS DirectConnect, GCP Cloud Interconnect, or multi-region Azure ExpressRoute.
Configurations MUST calculate Pod network MTU as `Underlay Interface MTU minus Protocol Overlays` (e.g., 1500 - 50 bytes Geneve - 60 bytes WireGuard = MTU 1390) and specify this explicitly via `mtu
Configurations MUST calculate Pod network MTU as `Underlay Interface MTU minus Protocol Overlays` (e.g., 1500 - 50 bytes Geneve - 60 bytes WireGuard = MTU 1390) and specify this explicitly via `mtu: <calculated_value>` in `values.yaml` if dynamic discovery is constrained.
Engineers MUST ensure ICMP Type 3 Code 4 ('Fragmentation Needed / DF set') packets are never dropped by perimeter ingress network security groups (NSGs) or CiliumNetworkPolicies across cross-cluster egress CIDRs.
Engineers MUST ensure ICMP Type 3 Code 4 ('Fragmentation Needed / DF set') packets are never dropped by perimeter ingress network security groups (NSGs) or CiliumNetworkPolicies across cross-cluster egress CIDRs.
Clusters utilizing Cilium ClusterMesh MUST synchronize MTU values symmetrically across all participating clusters to prevent inter-cluster pod-to-pod TCP window collapse and silent drop hangs.
Clusters utilizing Cilium ClusterMesh MUST synchronize MTU values symmetrically across all participating clusters to prevent inter-cluster pod-to-pod TCP window collapse and silent drop hangs.
Frequently Asked Technical Questions
Common questions developers face when configuring AI coding assistants for this stack:
Q:Why is Cilium eBPF Host-Routing Dynamic PMTU Discovery & TCP MSS Clamping Invariant critical for AI coding assistants?
Enforces deterministic Path MTU Discovery (PMTUD) and explicit TCP MSS clamping within Cilium eBPF host-routing architectures across hybrid multi-cloud overlays. When eBPF bypasses the host Linux netfilter stack, traditional iptables TCPMSS rules become inert, causing silent packet black-holing during TCP handshakes and large payload transfers across encapsulated tunnels (Geneve/VXLAN/WireGuard). This standard mandates automated MTU derivation, tunnel overhead offsetting, and active TC/eBPF MSS clamping to prevent asymmetric drops. Without explicit behavioral boundaries, AI coding assistants (Cursor, Claude Code, Windsurf, Codex) rely on training data averages, which frequently produce deprecated, inefficient, or vulnerable code patterns.
Q:How does adopting this rule prevent AI hallucinations?
This rule explicitly declares what the AI must avoid (Bypassing Netfilter with Cilium eBPF Host-Routing Without Enabling eBPF-Native PMTU and Dynamic TCP MSS Clamping) and prescribes verified positive examples. Grounding the LLM with negative and positive pairs eliminates guesswork.
Q:Which AI coding environments are supported?
This specification is multi-platform compatible: Cursor (.cursor/rules/*.mdc & .cursorrules), Anthropic Claude Code (CLAUDE.md), Windsurf (.windsurfrules), Codex / Cline (AGENTS.md), and GitHub Copilot (.github/copilot-instructions.md).
Q:Can I combine this rule with other technology stacks?
Yes. Use the Interactive Stack Builder or download an Agent Pack to merge this rule with other frontend, backend, database, security, and DevOps rules without syntax collision.