An educational virtual computer network simulator for lecturers and students learning the basics of computer networks.
NET-Simulator lets students build virtual networks in a virtual environment. It supports four kinds of virtual devices — router, desktop computer, switch, and hub — wired together with universal cables and controlled through a command-line interface that mimics real network gear. The simulator implements layers 1–3 of the ISO/OSI model.
Network protocols
- Restricted IPv4 implementation (RFC 791)
- ARP service with broadcast requests to resolve IP-to-MAC bindings
- Restricted ICMP (RFC 792) supporting
pingand traceroute - Ethernet-like layer-2 protocol with 6-byte MAC addressing, auto-assigned by the simulator kernel
Virtual devices
- Router — layer-3 commutator with 8 IPv4 interfaces; forwards packets per a static routing table
- Desktop — a router with a single interface
- Switch — layer-2 commutator with 8 ports; uses MAC-learning like a real Ethernet switch
- Hub — 8-port broadcast device with no forwarding logic
- Cables — universal links with no physical characteristics and infinite bandwidth; they blink when transmitting
GUI
- Drag-and-drop devices on the virtual desktop
- Per-device context menus; double-click a device to open its virtual console
- Command history (Up/Down),
Ctrl+Lto refresh,Ctrl+Cto abort - Export the current network to an HTML report with a PNG diagram via a user-customizable XSLT template (
cfg/tohtml.xsl)
Project files are XML, validated against src/main/resources/dtd/netsimulator.dtd.
- Java 21 (JRE to run; JDK to build from source)
- Apache Maven 3.x to build from source
Avoid installing into a path that contains non-ASCII characters — the JVM may fail to read configuration files. See
public_html/en/install.shtmlfor details.
mvn packageThis produces a shaded fat JAR at target/netsimulator.jar plus a distribution archive under target/ (built via the Maven Assembly plugin).
On Linux/macOS:
./run.shOn Windows:
run.batBoth scripts launch netsimulator.jar with cfg/logging.properties as the logging config. On first launch the app opens xml/test.xml — a sample network with 4 desktops, 1 router, and 1 switch.
- Run
./run.sh(orrun.bat). The bundledxml/test.xmlopens. - Double-click any computer to open its virtual terminal.
- Try
ifconfigto see the configured interfaces, thenping 12.0.0.11from Desktop 1 to send ICMP across the router to Desktop 5. - Type
helpfor the full command list.
| Command | Synopsis | Description |
|---|---|---|
help |
help [-h] |
Display the reference guide. |
ifconfig |
ifconfig [-h] [-a] [<interface>] [<address>] [-broadcast <address>] [-netmask <address>] [-up|-down] |
Configure a network interface, or show interface info. |
route |
route [-h] [{-add|-del} <target> [-netmask <address>] [-gw <address>] [-metric <M>] [-dev <If>]] |
Manipulate the IPv4 routing table; without options, prints it. |
ping |
ping [-h] [-i <interval>] [-t <ttl>] <destination> |
Send ICMP echo to check accessibility of an interface. Ctrl+C aborts. |
arp |
arp [-h] [-r <IP-address> <interface>] |
Show the ARP table; -r resolves a MAC for a given IP via a request. |
mactable |
mactable [-h] |
Show the MAC-address table (switch-specific). |
Pass -h to any command for its full help. Shell shortcuts: Up/Down navigate history, Ctrl+L refreshes the screen, Ctrl+C aborts the running command.
src/main/java/org/netsimulator/
├── Netsimulator.java entry point (main)
├── gui/ Swing UI: MainFrame, NetworkPanel, device shapes, dialogs
├── net/ simulation core: devices, packets, routing, ARP, ICMP, addresses
├── term/ virtual terminal and CLI command implementations
└── util/ misc utilities (ID generator, etc.)
Runtime resources live under cfg/ (logging, XSLT export template, default config) and xml/ (sample projects).
NET-Simulator is licensed under the GNU General Public License v2 — see COPYING for the full text.
- Upstream repository: https://github.com/checkpoint20/net-simulator
- Issue tracker: https://github.com/checkpoint20/net-simulator/issues
