Skip to content
system-confPublic

About

Open-source network lab in your browser: build, configure (GUI + IOS-style CLI) and simulate networks packet by packet. English & Turkish.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Octetlab — a network lab in your browser

Live demo

CI MIT English | Türkçe TypeScript React 19 Tests MCP server for ChatGPT and Claude

English · Türkçe

Octetlab is an open-source network lab that runs entirely in the browser: build a network, cable it, configure it from a GUI or an IOS-style command line, and watch every packet move in simulation mode. No installation, no account, works on desktop and tablet. Available in English and Turkish, ready for more languages.

A ping in simulation mode: ARP and ICMP packets travel from PC1 through the switch to the router, with the event list below

Screenshots

A sample lab with its lesson panel
Sample labs — a working network plus a short lesson and steps that check themselves
Simulation mode with the event list and the PDU inspector
Simulation mode — step through every packet, look inside it layer by layer
IOS-style CLI on a router
Device CLI — IOS-style console with abbreviations, ? help, Tab completion and paging
The workspace in dark mode
Dark mode — light, dark or follow the system
The sample lab library
Sample library — 29 lessons, from addressing to ACLs, NAT and firewalls
Design tasks
Design tasks — a customer brief, a budget and a live checklist
packet-tracer on a firewall explains why a web request from outside reaches the DMZ server
Firewall — security levels, object NAT and a packet tracer that explains each verdict
The link preview picture of a shared lab: title, topology, Octetlab and the author's name
Share as a page — the preview picture LinkedIn shows for a shared lab

What you can do

  • Build networks — drag routers, firewalls, switches (L2 / L3, PoE), hubs, access points, wireless routers, modems, servers, PCs, laptops, phones, printers, cameras, NVRs and more onto the map (39 device models), connect them with the right cable and see link lights come up.
  • Configure — ports, VLANs, trunks, SVIs, router-on-a-stick, static and floating routes, DHCP (pools, exclusions, relay), DNS, Wi-Fi SSIDs; from the settings panel or from the device CLI (enable, conf t, interface, switchport, ip address, show vlan brief, show ip route, show running-config, ? help, Tab completion, --More-- paging).
  • Secure — standard and extended access lists (numbered and named) on interfaces and VTY lines, NAT / PAT (static, pool, overload) with show ip nat translations, SSH and Telnet logins with local users.
  • Firewall — a stateful firewall appliance: interface names and security levels, a connection table (replies pass, outside-started traffic is dropped unless an access list allows it), object NAT to publish a DMZ server, show conn, show xlate and a packet-tracer that explains the verdict step by step.
  • Test — a Windows-style terminal on end devices (ping, ipconfig, nslookup, tracert, arp -a).
  • Simulation mode — a deterministic packet-level simulator: step through ARP, DHCP, DNS, ICMP and VLAN tagging event by event, inspect each PDU layer by layer, filter by protocol, and export the capture as a .pcap file for Wireshark.
  • Sample labs — 29 short lessons (basics, DHCP, DNS, switching, routing, packet view, ACL / NAT / SSH, firewall), each a ready lab with "try this" steps that are checked automatically and "break it" ideas.
  • Troubleshooting exercises — 10 real-world faults in small business networks (a restaurant, an office, a shop, a clinic): find the wrong setting, fix it, verify; a report explains what happened and how to answer it in a job interview.
  • Design tasks — a customer brief (small office, restaurant, school, factory, hotel) with requirements, a budget and a live checklist; submit for a review and get a handover pack (topology, IP plan, VLAN table, port list).
  • Your files — labs autosave in the browser, export / import as .agl.json, share as a link, export every device's configuration as text.
  • Share as a page — publish a lab as a public page (/p/…) with its topology, device / IP / VLAN tables, your name and LinkedIn profile, and a link preview picture made for LinkedIn; visitors open their own copy in one click, and only your browser can delete the page.
  • Preferences — light / dark / system theme, map labels, grid and snap, animation speed, terminal and CLI options.

Octetlab is a learning lab, not a game: no points, no lives, just networks that behave like real ones. The roadmap (dynamic routing, STP, zone-based firewall, IPv6, wireless security, WAN, servers and more) is in docs/PLAN_V2.md and docs/PARITY.md.

Use with ChatGPT or Claude (MCP)

Octetlab also runs as an MCP server, so a chat assistant can work in the lab for you — on the desktop or on your phone. Ask in plain words and it builds a lab (from scratch or from a sample), adds and cables devices, configures hosts, routers and switches, runs ping, tracert and show commands, and replies with a live link: open it in Octetlab and watch the lab change while the assistant works.

Server URL: https://octetlabmcp.slovveis.workers.dev/mcp (no sign-in needed)

How to add it (the exact menu names may differ between versions and plans):

  • ChatGPT: Settings → Apps / Connectors → add a custom MCP server (developer mode may need to be turned on first). Paste the URL above and choose no authentication.
  • Claude: Settings → Connectors → add a custom connector and paste the URL above.

Things to ask:

  • "Build a lab with a router, a switch and three PCs on 192.168.10.0/24, then ping PC3 from PC1."
  • "Open the inter-VLAN routing sample and show me show ip route on the router."
  • "Set up DHCP on the router for VLAN 20 and check that the laptop gets an address."
  • "Here is my share link: why can't PC2 reach the server?"

Limits: labs are kept for 7 days; the server stores no personal data, only the labs themselves; 60 requests per minute per IP address; tool output is in English (the assistant still answers in your language). Tool list and design: docs/MCP_SERVER.md.

Run it locally

Requires Node.js 22 or newer.

npm install
npm run dev        # development server
npm test           # unit tests (Vitest)
npm run lint       # ESLint
npm run build      # type-check and production build
npm run deploy     # build and deploy to Cloudflare Workers (static assets)

Testing

  • Unit tests: npm test (Vitest, src/**/*.test.ts), including golden CLI transcripts and an oracle that compares the simulator with the rule engine on generated labs.
  • End-to-end tests: npm run test:e2e (Playwright, e2e/). It builds the app and serves it with vite preview on port 4199, then runs a smoke suite in Chromium (desktop) and at a 360 × 740 phone size (tests tagged @mobile). First time: npx playwright install chromium. npm run test:e2e:ui opens Playwright's UI mode. Variables: E2E_SKIP_BUILD=1 serves the existing dist/; E2E_BASE_URL=<url> tests a running app instead (e.g. a preview deploy). Selectors use English accessible names (?lang=en); renaming a label in src/locales/en may need the same change in e2e/.
  • CI (.github/workflows/ci.yml, every push and pull request): lint, e2e type-check, unit tests, build, Playwright; the Playwright report is uploaded as an artifact when a step fails.
  • Preview deploys (.github/workflows/preview.yml, optional): every pushed branch is uploaded as a Cloudflare Workers preview version; production is not changed. It runs only if the repository has the CLOUDFLARE_API_TOKEN (Workers Scripts: Edit) and CLOUDFLARE_ACCOUNT_ID Actions secrets, and is skipped otherwise.

Add a language

  1. Copy src/locales/en/ to src/locales/<code>/ and translate every value (keep the keys and {{placeholders}} unchanged).
  2. Add one line to src/i18n/languages.ts: { code, nativeName, dir }.

That is all; npm test checks that every key and placeholder matches English. Details and the rules for UI code are in docs/I18N.md. Device output (Windows ping, IOS show commands, …) stays in English in every language, as on real equipment.

Documentation

Screenshots are generated from the live site with node scripts/readmeScreenshots.mjs (Playwright).

Document Contents
docs/PLAN_V2.md Roadmap, phases and code rules
docs/PARITY.md Feature checklist against desktop network simulators
docs/MODEL_V2.md Lab model: devices, ports, cables, locks
docs/SIMULATION.md Packet-level simulator design
docs/CLI.md Device command line
docs/SAMPLE_LABS.md Sample lab library
docs/DESIGN_EXERCISES.md Design tasks
docs/PREFERENCES.md Preferences and theme tokens
docs/I18N.md Translations
docs/MCP_SERVER.md MCP server for ChatGPT and Claude
docs/LIVE_LABS.md Live labs the assistant and the browser share
docs/SECURITY_PACK.md ACL, NAT, SSH / Telnet
docs/FIREWALL_PACK.md Stateful firewall appliance
docs/SHARE_PAGES.md Public share pages and link previews

Trademarks

Cisco, IOS and Packet Tracer are trademarks of Cisco Systems, Inc. Octetlab is an independent project, not affiliated with or endorsed by Cisco. The command line follows the widely taught IOS syntax for learning purposes; all icons, artwork and lab content are original.

License

MIT — see LICENSE.

About

Open-source network lab in your browser: build, configure (GUI + IOS-style CLI) and simulate networks packet by packet. English & Turkish.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages