yanet2

module
v0.0.0-...-56261ca Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2026 License: Apache-2.0

README ΒΆ

YANET

Note: This project is currently in active development.

YANET is a high-performance modular software router built on DPDK (Data Plane Development Kit) that provides exceptional packet processing capabilities. It's designed to be a versatile network solution that functions as a router, decapsulator, firewall, L3 load balancer, and NAT device, all in one platform.

🌐 Key Features

πŸš€ High Performance
  • DPDK-accelerated packet processing bypasses the kernel networking stack for maximum throughput.
  • Achieves near-hardware performance with the flexibility of software.
  • NUMA-aware resource management for optimal multi-socket performance.
  • Optimized memory management with huge pages support.
🧩 Modular Architecture
  • Module system allows enabling only required networking functions.
  • Clean separation between control plane and data plane components.
  • Flexible pipeline configuration for customized packet processing flows.
  • Add or remove functionality without affecting the entire system.
πŸ›‘οΈ Safe Initialization Process
  • Controlled system initialization with failsafe mechanisms.
  • BGP route announcement control based on system health.

πŸ—οΈ Architecture

YANET follows a modular architecture with clear separation between control and data planes:

Data Plane (C & DPDK)
  • Implements fast-path packet processing.
  • Uses DPDK for direct hardware access and kernel bypass.
  • Applies routing decisions, filtering, and packet transformations.
  • Achieves high packet throughput with minimal latency.
Control Plane (Go)
  • Exposes management API.
  • Handles configuration and management functions.
  • Manages routing tables and policy.
  • ACL compilation (TDB).

πŸ› οΈ Technologies

YANET employs a multi-language approach to leverage the strengths of different programming languages:

  • C - Data plane and performance-critical components.
  • Go - Control plane and orchestration components.
  • Rust - CLI tools.
  • DPDK - Kernel-bypass networking for high-performance packet processing.
  • gRPC - Communication framework for inter-component messaging.
  • Protocol Buffers - Efficient binary serialization format. Protobuf API compatibility policy: see docs/proto-compatibility.md.
  • Meson - Build system for core components.

πŸ”§ Building & Requirements

System Requirements
  • Linux-based operating system (Ubuntu 22.04+ or equivalent recommended).
  • Hardware supporting DPDK (Mellanox NICs recommended).
  • At least 64GB RAM recommended for production.
Dependencies
  • Go 1.21+.
  • Rust 1.88+.
  • Protobuf compiler 3.0+.
  • Meson 0.61+.
  • Ninja build system.
  • CMake 3.5+.
  • GCC/Clang.
Build Instructions
  1. Clone the repository:

    git clone https://github.com/yanet-platform/yanet2.git
    cd yanet2
    git submodule update --init
    
  2. Configure and build with Meson:

    meson setup build
    meson compile -C build
    
  3. Build CLI tools:

    cargo build --release
    
  4. Install:

    meson install -C build
    
Testing
meson test -C build
Running in a Virtual Environment

For repeatable local experiments, use the reusable QEMU lab:

make -C tests/functional prepare-vm
just lab doctor
just lab up
just lab scenario run forward-route
just lab down

Run make all in a Linux build environment before just lab doctor; the Linux guest requires x86_64 ELF dataplane, control-plane, operator, and CLI artifacts. Prepare the functional-test image with make -C tests/functional prepare-vm. On macOS, native Mach-O outputs are not usable lab artifacts. The doctor command also checks the QEMU image and all artifacts required by the lab baseline. Running just lab without a subcommand only prints help.

See the YANET2 Lab guide for manifests, packet probes, troubleshooting, and the built-in forward/route, decap, and NAT64 scenarios.

πŸ“„ License

YANET2 is licensed under the Apache License, Version 2.0.

πŸ”— Additional Resources

Directories ΒΆ

Path Synopsis
bindings
go/cerrors
Package cerrors provides Go bindings for the C yanet_error type defined in lib/errors.
Package cerrors provides Go bindings for the C yanet_error type defined in lib/errors.
go/filterpbconv/v1
Package filterpbconv translates protobuf filter messages into cgo-bound filter values.
Package filterpbconv translates protobuf filter messages into cgo-bound filter values.
cmd
yanet-lab command
common
go/grpcmetrics
Package grpcmetrics provides opt-in gRPC unary and stream server interceptors that record per-call metrics and render them to commonpb.Metric.
Package grpcmetrics provides opt-in gRPC unary and stream server interceptors that record per-call metrics and render them to commonpb.Metric.
go/logging/clog
Package clog routes lib/logging's C LOG() output through a zap.Logger and pushes zap's configured level into the C library's cheap level gate.
Package clog routes lib/logging's C LOG() output through a zap.Logger and pushes zap's configured level into the C library's cheap level gate.
go/metrics
Package metrics provides thread-safe metric primitives for collecting application telemetry data including counters, gauges, and histograms.
Package metrics provides thread-safe metric primitives for collecting application telemetry data including counters, gauges, and histograms.
go/testutils/tlscert
Package tlscert issues throwaway certificates for tests that need a TLS server or client behind a private CA.
Package tlscert issues throwaway certificates for tests that need a TLS server or client behind a private CA.
go/xgrpc
Package xgrpc provides generic gRPC helpers shared across the gateway, operators, and modules.
Package xgrpc provides generic gRPC helpers shared across the gateway, operators, and modules.
go/xproto
Package xproto holds protobuf helpers shared by the Go control plane.
Package xproto holds protobuf helpers shared by the Go control plane.
controlplane module
ffi
devices
trafgen/bindings/go/ctrafgen
Package ctrafgen is the Go binding for the trafgen device.
Package ctrafgen is the Go binding for the trafgen device.
trafgen/controlplane
Package trafgen implements the control plane of the traffic generator device.
Package trafgen implements the control plane of the traffic generator device.
lab
lib
lint
internal/gosrc
Package gosrc walks the Go source tree, skipping directories that no linter in this repository should ever descend into.
Package gosrc walks the Go source tree, skipping directories that no linter in this repository should ever descend into.
internal/ledger
Package ledger tracks a debt allowlist mapping violation keys to mandatory reasons, and reports malformed, reasonless, duplicate, and stale rows.
Package ledger tracks a debt allowlist mapping violation keys to mandatory reasons, and reports malformed, reasonless, duplicate, and stale rows.
style/cmd/stylelint command
Command stylelint enforces this repository's Go micro-conventions from CLAUDE.md in a single pass over the source tree.
Command stylelint enforces this repository's Go micro-conventions from CLAUDE.md in a single pass over the source tree.
modules
acl/tests/functional/fwtable
Package fwtable provides test helpers for seeding firewall state directly into a fwstate-map object's fwtable, standing in for the sync-receive path that populates tables in production.
Package fwtable provides test helpers for seeding firewall state directly into a fwstate-map object's fwtable, standing in for the sync-receive path that populates tables in production.
balancer2/bindings/go/cbalancer2
Package cbalancer2 wraps the balancer2 controlplane C API in idiomatic Go.
Package cbalancer2 wraps the balancer2 controlplane C API in idiomatic Go.
blackhole/bindings/go/cblackhole
Package cblackhole is Go binding for the blackhole module
Package cblackhole is Go binding for the blackhole module
blackhole/controlplane
Package blackhole implements Blackhole module.
Package blackhole implements Blackhole module.
l3b/bindings/go/cl3b
Package cl3b is Go binding for the l3b module
Package cl3b is Go binding for the l3b module
l3b/controlplane
Package l3b implements L3b module.
Package l3b implements L3b module.
pdump/controlplane
Package pdump implements the control plane service for packet dumping.
Package pdump implements the control plane service for packet dumping.
route/controlplane/hwroute
Package hwroute holds the route module's Layer 2 forwarding identity.
Package hwroute holds the route module's Layer 2 forwarding identity.
objects
l3b/bindings/go/cl3bobject
Package cl3bobject is the Go binding for the l3b virtual service object.
Package cl3bobject is the Go binding for the l3b virtual service object.
operators
generic/operator
Package operator implements the generic operator: an instance pushes the module configs and functions its YAML config spells to every gateway.
Package operator implements the generic operator: an instance pushes the module configs and functions its YAML config spells to every gateway.
tests

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL