Skip to content

Add codelaboratory_bng kind#3076

Open
mgazza wants to merge 3 commits intosrl-labs:mainfrom
mgazza:add-codelaboratory-bng-kind
Open

Add codelaboratory_bng kind#3076
mgazza wants to merge 3 commits intosrl-labs:mainfrom
mgazza:add-codelaboratory-bng-kind

Conversation

@mgazza
Copy link

@mgazza mgazza commented Feb 23, 2026

Summary

  • Add codelaboratory_bng as a new containerlab kind for Code Laboratory's eBPF/XDP-based Broadband Network Gateway
  • Only requires NET_ADMIN + BPF capabilities (much lighter than VPP/DPDK-based BNGs which need SYS_ADMIN, IPC_LOCK, SYS_NICE, SYS_RAWIO)
  • Include a 3-node lab example (BNG + BNG Blaster subscriber simulator + FRR core router) for IPoE/DHCPv4 testing
  • Add kind reference docs and lab example guide

What is Code Laboratory BNG?

An eBPF/XDP-based BNG designed for ISP edge deployment on OLT hardware. It uses a two-tier DHCP architecture:

  • Fast path (eBPF/XDP, kernel space): <100μs P99 latency for cached subscribers
  • Slow path (Go userspace): <10ms P99 for new allocations

Image: ghcr.io/codelaboratoryltd/bng:latest

Files

Category Files
Node implementation nodes/codelaboratory_bng/codelaboratory_bng.go
Registration core/register.go (+2 lines)
Lab example lab-examples/bng01/ (topology + configs)
Documentation docs/manual/kinds/codelaboratory_bng.md, docs/lab-examples/bng01.md
Nav/index mkdocs.yml, docs/manual/kinds/index.md

Test plan

  • Build containerlab with the new kind: make build
  • Deploy the lab: sudo clab deploy -t lab-examples/bng01/bng01.clab.yml
  • Verify BNG boots: docker logs clab-bng01-bng1
  • Verify FRR adjacency: docker exec clab-bng01-corerouter1 vtysh -c "show ip route"
  • Run BNG Blaster: docker exec clab-bng01-subscribers bngblaster -C /config/config.json -b
  • Confirm DHCP sessions establish (10/10 DHCP DORA cycles completed)
  • Cleanup: sudo clab destroy -t lab-examples/bng01/bng01.clab.yml

Tested end-to-end on Ubuntu 24.04 arm64 (Lima VM) with BNG Blaster 0.9.31 built from source. Also verified via CI workflow in bng-edge-infra.

🤖 Generated with Claude Code

@mgazza mgazza force-pushed the add-codelaboratory-bng-kind branch 2 times, most recently from 681f511 to bbcdd05 Compare February 26, 2026 09:39
mgazza and others added 3 commits February 26, 2026 19:18
eBPF/XDP-based BNG that requires only NET_ADMIN and BPF capabilities.
Uses if-wait.sh (shared with fdio_vpp) to wait for veth interfaces
before starting the BNG binary.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Three-node topology: BNG Blaster (subscriber simulator) → BNG → FRR
(core router). Includes both untagged (config.json) and QinQ 802.1ad
(qinq.json) subscriber configs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mgazza mgazza force-pushed the add-codelaboratory-bng-kind branch from bbcdd05 to 4958d59 Compare February 26, 2026 19:18
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.

1 participant