RustBond
A Rust implementation of the MetalBond route distribution protocol.
MetalBond distributes virtual network routes across hypervisors over TCP/IPv6.
Features
- Async client/server with Tokio
- Automatic reconnection
- VNI-based subscriptions
- Multi-server HA with ECMP support
- Standard, NAT, and LoadBalancer route types
- Interoperable with Go MetalBond
Quick Start
Server
use ;
let server = start.await?;
// ... server.shutdown().await?;
Client
use ;
;
let client = connect;
client.wait_established.await?;
client.subscribe.await?;
Multi-Server (HA)
For high availability, connect to multiple servers simultaneously:
let client = connect;
client.wait_any_established.await?;
// Routes are deduplicated across servers; ECMP supported
Examples
# Run server
# Connect client to VNI 100
# Announce a route
# Multi-server HA
Route Types
Announcement format: prefix#nexthop[#type][#fromPort#toPort]
# Standard route (default)
# NAT route with port range
# Load balancer target
Testing