DOCS local mesh simulation
Support# Tutorial: Local Mesh Simulation In this tutorial, you will use the Bauxite CLI to simulate a complete Bauxite Mesh network on your local machine using containerized sandboxing and view live performance metrics inside a terminal dashboard. This is the best way to test network topologies, eBPF data planes, and routing before deploying to physical hardware. --- ## Prerequisites - A Linux-based host or workstation. - Docker or Podman installed. - Bauxite Agent CLI installed. --- ## 1. Start the Simulation (`sandbox start`) Instead of manual namespace creation or complex Docker Compose management, the `sandbox` command orchestrates an ephemeral containerized multi-node topology with a single command. To spawn a simulation with a local Control Plane (Hub) and 3 simulated edge robot nodes: ```bash bauxite sandbox start --nodes 3 ``` This command automatically: 1. Provisions an isolated bridge network `bauxite-sandbox-net`. 2. Starts the Bauxite Control Plane dispatch service (`bauxite-sandbox-dispatch`). 3. Boots 3 simulated robot nodes (`bauxite-sandbox-robot-1`, `bauxite-sandbox-robot-2`, and `bauxite-sandbox-robot-3`) configured with eBPF capability and virtual TUN devices. --- ## 2. Verify Container Execution Verify that all Bauxite simulation containers are active: ```bash docker ps --filter "name=bauxite-sandbox-" ``` You should see all 4 containers (`dispatch` + 3 robots) running and connected to the bridge network. --- ## 3. Monitor Telemetry in Real-Time (`dashboard`) Bauxite provides a live terminal dashboard to monitor the status of the virtual mesh network, including bypass latencies and slot allocations. Launch the fabric monitor dashboard in your terminal: ```bash bauxite dashboard ``` The TUI displays: - **Stack Bypass Latencies**: The standard loopback latency vs. the zero-copy eBPF bypass path. - **Shared Memory utilization**: Real-time bucket slots consumption. - **Core Telemetry counters**: Packet and drop rates on `XDP` and `sk_msg` offload targets. *Press `q` or `Ctrl+C` to close the dashboard.* --- ## 4. Test Peer-to-Peer Connectivity Since the simulated robots are active in the same virtual mesh, you can ping them from the perspective of another simulated node: ```bash # Ping robot-2 from the perspective of robot-1 docker exec -it bauxite-sandbox-robot-1 ping 10.42.0.2 ``` --- ## 5. Cleanup the Simulation (`sandbox stop`) When you are finished testing, clean up the environment. The `sandbox stop` command shuts down all containers and deletes virtual networks, ensuring no residual namespaces or network interfaces are left behind: ```bash bauxite sandbox stop ``` --- ## Next Steps Now that you've simulated a local mesh, try [Configuring Network Policies](../how-to/configure-network-policies.md) to restrict traffic between your simulated robots.