NetSim

The open source network simulator

A deterministic simulation engine written in Rust and compiled to WebAssembly. It runs entirely in your browser.

Source on GitHub Quick start

Community Edition v1.1.0 ยท AGPL-3.0

01 / Overview

What NetSim is.

NetSim Community Edition is the open-source core engine of NetSim. It is a network simulation environment that runs on the client side, in your browser, without heavy virtual machines or backend servers.

Since v1.1.0 the core simulation logic is written in Rust and compiled to WebAssembly, moved over from TypeScript for speed and deterministic protocol behaviour.

The NetSim interface: a device list with routers, switches and endpoints on the left, three connected switches in the centre, a node inspector, and a device console with a guided spanning tree lab on the right.
NetSim Community Edition. Screenshot from the repository.

02 / Features

What is in v1.1.0.

The key features of the WebAssembly core, as listed in the repository.

  1. 01

    Rust-powered engine

    The core handles packet switching and routing logic, written in Rust with memory safety.

  2. 02

    100% client-side

    It runs entirely in your browser using WebAssembly.

  3. 03

    Multi-vendor CLI

    Support for the Cisco (IOS) and Huawei (VRP) command syntaxes.

  4. 04

    Privacy first

    Your topologies and configurations never leave your machine.

  5. 05

    Built-in labs

    Ready-to-use scenarios to practise STP, OSPF and VLANs.

  6. 06

    Modern stack

    Built with React 18, Rust and React Flow.

A NetSim lab session: two switches linked by a cable between ports GE0/0/5 and GE0/0/11, the node inspector with port status, and a Huawei VRP console with command completion.
Cabling two switches and configuring one from its console. Screenshot from the repository.

03 / Quick start

Run it on your machine.

You need Node.js 18 or later, the Rust toolchain and wasm-pack.

$ git clone https://github.com/anghabar/netsim.git
$ cd netsim
$ npm install
$ npm run dev

The README has the details.

04 / Architecture

How it is built.

A Rust core manages the network state and is exposed to a React frontend through a typed WebAssembly bridge.

Core engine
Rust + WASM
Logic for OSPF, BGP, STP and CLI parsing.
State management
Zustand
Syncs the WASM state with the UI components.
Visualization
React Flow
Interactive node-based topology editor.
Interface
Tailwind CSS
Responsive, dark-themed UI.

05 / Licence

Open source, open to contributions.

NetSim is distributed under the GNU Affero General Public License v3.0 (AGPL-3.0). The source code is on GitHub.

Contributions are welcome. Read the Code of Conduct, fork the repository and create your feature branch, make sure your Rust modules pass cargo test, and open a pull request.

Bugs and feature requests: github.com/anghabar/netsim/issues.