Skip to content

Implementation Plan: Linux Bridge + eBPF Integration#2715

Open
yueguobin wants to merge 14 commits into
GNS3:3.1from
yueguobin:rfc/linux-bridge-integration
Open

Implementation Plan: Linux Bridge + eBPF Integration#2715
yueguobin wants to merge 14 commits into
GNS3:3.1from
yueguobin:rfc/linux-bridge-integration

Conversation

@yueguobin

@yueguobin yueguobin commented May 7, 2026

Copy link
Copy Markdown
Contributor

Overview

Implementation plan for migrating GNS3 from ubridge-based networking to a hybrid Linux bridge + eBPF architecture.

Status: Revised after full codebase audit — all line references, architecture claims, and node-type adaptation details validated against actual code.

Key Changes from RFC v1.1

Based on codebase audit, the plan has been corrected to reflect reality:

Fixed Inaccuracies

  • docker_vm.py:1112 → corrected to 1132 (TAP creation, not container deletion)
  • controller/link.py:69 → corrected to 70 (class Link offset)
  • Removed assumption that "same compute detection" exists — it doesn't. Must be built from scratch.
  • Added Docker's unique ubridge commands (docker set_mac_addr, docker move_to_ns) that have no Linux bridge equivalent
  • Added IOU's different adapter_add_nio_binding(adapter_number, port_number, nio) signature

Added Missing Details

  • Current architecture baseline document (how ubridge actually works today)
  • Cleanup/teardown considerations (orphaned TAP interfaces, _bridges set leakage)
  • Node type connection pattern groups (Direct TAP vs Local UDP Tunnel vs Direct Ethernet vs IOL Bridge)
  • BANNED_PORTS, suspend filter override, capture side selection logic
  • TAP naming convention (tap-gns3-e{index}, 0-4095 scan)

Scope Reduction

  • Containerlab integration removed — out of scope for this plan

Phase Plan

Phase Scope Exit Gate
1 Foundation + Docker POC (validation gate) Docker benchmark pass
2 Full Linux Bridge (all node types, cleanup, namespace handling) All node types work
3 eBPF Integration (build pipeline, loader, filter parity, monitoring) ubridge filter parity

View full document

yueguobin and others added 5 commits May 7, 2026 15:29
Add comprehensive roadmap for migrating GNS3 from ubridge-based networking
to a hybrid Linux bridge + eBPF + Containerlab architecture.

Key objectives:
- 5-10x performance improvement for local connections
- Access to containerlab's rich network device ecosystem
- Kernel-space packet processing with eBPF
- Enhanced CI/CD capabilities

The roadmap includes:
- Network backend abstraction layer design
- Hybrid Linux Bridge + Ubridge UDP architecture for multi-compute scenarios
- eBPF integration for high-performance packet filtering
- Containerlab interoperability
- Performance expectations and success metrics

This proposal serves as a technical guide for future network architecture
evolution in GNS3 3.0+.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add comprehensive technical details addressing production deployment concerns:

1. eBPF Hot-Loading Design
   - Implement eBPF Maps-based dynamic parameter control
   - Enable real-time GUI adjustments (<1ms response time)
   - Eliminate program reload overhead

2. Linux Bridge MTU Optimization
   - Calculate optimal MTU for UDP tunnel encapsulation
   - Prevent fragmentation with automatic MTU adjustment (1450 bytes)
   - Performance comparison: 1.2 Gbps → 2.0 Gbps

3. Containerlab Bridge Synchronization
   - Compare veth pair vs Open vSwitch approaches
   - Recommend OVS for unified network fabric
   - Simplify management with centralized configuration

4. eBPF Security and Isolation
   - Implement privileged proxy architecture
   - Restrict capabilities to CAP_BPF only
   - Add seccomp filtering and namespace isolation

5. Real-Time Performance Monitoring
   - Leverage eBPF for zero-overhead traffic statistics
   - Enable sub-100ms GUI updates
   - Provide bandwidth, packet rate, and drop rate visualization

These considerations address critical production requirements including
performance optimization, security hardening, and operational excellence.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Create Chinese translation (linux-bridge-ebpf-containerlab-integration_zh.md)
- Add Creative Commons BY-SA 4.0 license to both versions
- Include proper attribution and licensing terms
- Provide bilingual documentation for broader accessibility

The Chinese version maintains all technical diagrams, tables, and
architecture descriptions while translating content for Chinese-speaking
developers and contributors.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Remove redundant Creative Commons website links
- Keep only the link to ../LICENSE for full terms
- Maintain consistency between English and Chinese versions
- Reduce duplication as LICENSE file already contains complete CC BY-SA 4.0 text

This makes the documents cleaner and avoids maintaining duplicate
license information across multiple files.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@yueguobin yueguobin closed this May 7, 2026
@grossmj

grossmj commented May 7, 2026

Copy link
Copy Markdown
Member

Also, some ideas in #2498

@yueguobin yueguobin reopened this May 19, 2026
yueguobin and others added 2 commits May 19, 2026 08:45
…tion details

Add node type adaptation strategy, controller refactoring requirements,
network namespace handling, eBPF build pipeline, and containerlab
lifecycle management. Reframe performance claims as design targets.
Expand risk assessment with codebase-specific risks. Update dependencies.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@yueguobin yueguobin changed the title RFC: Linux Bridge + eBPF + Containerlab Integration Roadmap RFC: Linux Bridge + eBPF + Containerlab Integration Roadmap (revised) May 19, 2026
@yueguobin yueguobin changed the title RFC: Linux Bridge + eBPF + Containerlab Integration Roadmap (revised) RFC: Linux Bridge + eBPF Integration Roadmap (revised) Jun 2, 2026
@yueguobin yueguobin changed the title RFC: Linux Bridge + eBPF Integration Roadmap (revised) Implementation Plan: Linux Bridge + eBPF Integration Jun 2, 2026
- Convert from RFC proposal to implementation plan
- Fix docker_vm.py:1112 -> 1132 (TAP creation line reference)
- Fix controller/link.py:69 -> 70 (class Link offset)
- Add 'current architecture' baseline section
- Document Docker's unique ubridge commands (set_mac_addr, move_to_ns)
- Add cleanup/teardown considerations (TAP leakage, _bridges set)
- Add node type connection pattern groups (TAP vs UDP tunnel vs Ethernet)
- Add IOU's different adapter_add_nio_binding signature
- Add BANNED_PORTS, suspend override, capture side selection details
- Remove Containerlab integration (out of scope)
- Reduce from 4 phases to 3 phases
- Version 1.1, status: Implementation Plan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants