Skip to content

About

No description, website, or topics provided.

Resources

Stars

6 stars

Watchers

0 watching

Forks

Repository files navigation

NetVisualizer

NetVisualizer is a modern, interactive network simulator designed for beginners to explore and understand the fundamentals of the TCP/IP protocol suite. Through a high-fidelity visual interface, users can build virtual networks and observe real-time packet flow, protocol handshakes, and network services.

Sample 9: an L3 switch routing between VLAN 10 and VLAN 20, with the SVI addresses and the port VLAN settings

🌟 Key Features

📡 Visual Network Building

  • Interactive Canvas: Drag and drop network nodes (PCs, Servers, Switches, L3 Switches, Routers, Hubs, and DNS/DHCP servers).

  • Beginner-Friendly Feedback: "Request timed out" explanations, input checks for IP/mask/gateway, and automatic saving in your browser.

  • Pan, Zoom & Fit: Drag the canvas to move, zoom around the pointer, and fit every device into view with one button.

  • Dynamic Linking: Connect nodes with virtual Ethernet cables and manage multiple interfaces.

  • Multi-NIC PCs: Up to 4 NICs per PC/server, with a documented sending-NIC rule (longest prefix, then Metric, then listed order) and Route lines in the log.

  • Node Configuration: Manually configure IP addresses, subnet masks, and default gateways, or use automated services.

  • English / Japanese UI: Switch the screen language at any time (follows your browser by default).

  • Light / Dark Theme: Follows your system setting by default, with a manual switch.

  • Sample Topologies: Load nine ready-made networks from the sidebar (basic LAN, routing, IGMP Snooping, a switch loop, multi-NIC PC, firewall, NAT, VLANs with a trunk, and an L3 switch routing between VLANs) and start experimenting right away.

🔬 Real-time Protocol Simulation

  • Consistent Protocol Colors: One soft color per protocol across packets, logs, tables and a built-in legend.
  • Playback Controls: Pause, step to the next packet arrival, and slow down or speed up (0.25x–4x) to follow each protocol exchange.
  • Router Firewall: Allow or deny traffic by protocol, address and port, with an optional implicit deny. Denied packets are dropped silently, as on real equipment.
  • VLANs and Trunks: Split a switch into VLANs, join switches with a trunk, and watch frames get tagged. MAC tables and IGMP state are kept per VLAN.
  • L3 Switch (SVI): Give each VLAN an address (SVI) on an L3 switch and watch it route between the VLANs, with the TTL going down by one at each hop.
  • Router NAT: Share one outside address among many inside devices (NAPT). Watch the translation table, and see why unsolicited traffic from outside is dropped.
  • ICMP (Ping): Visualize reachability checks and observe ARP requests for next-hop resolution.
  • L4 Messaging (TCP/UDP):
    • TCP: Experience the 3-way handshake (SYN, SYN-ACK, ACK) and connection lifecycle.
    • UDP: Send datagrams and observe silent drops or ICMP Port Unreachable errors based on RFC standards.
  • Network Services:
    • DHCP: Watch the DORA process (Discover, Offer, Request, Ack) in action.
    • DNS: Resolve hostnames and observe the DNS cache in real-time.

🔊 Advanced Multicast Support

  • IGMP Snooping: Observe how switches intelligently forward multicast traffic only to registered ports. Unknown multicast groups are strictly dropped (RFC 4541 Approach B), making the role of the Querier immediately visible.
  • Configurable Aging Time: Set the snooping entry lifetime (5–300 sec) per switch and watch port entries count down and expire in real time.
  • IGMP Querier: Enable a switch as an IGMP Querier to periodically send General Queries, keeping snooping entries alive. Supports automatic Querier Election — the switch with the lowest management IP becomes the Active Querier; others enter Standby.
  • Switch Management IP: Assign a management IP (VLAN 1) to a switch independently of the host subnet, demonstrating the separation of control plane and data plane.
  • Router Port (mrouter) Learning: Switches automatically learn which port leads to a multicast router or querier, enabling correct cross-switch multicast forwarding.
  • Explicit Join/Leave: Manually join multicast groups and see the node's membership status.
  • mDNS Responder: Enable mDNS on any node to resolve local hostnames without a central DNS server.

📚 Pedagogical Insights

  • Live Tables: View ARP tables, MAC tables, IGMP snooping tables (with per-port countdown timers and mrouter port), and DNS caches as they update dynamically.
  • RFC Compliance: Simulation logic is strictly aligned with networking standards (RFC 1112, 1122, 2131, 2236, 4541, 6762, etc.).
  • Detailed Packet Logs: Inspect every event with color-coded logs for successful delivery, errors, and silent drops.

🚀 Getting Started

Prerequisites

Installation

  1. Clone the repository:
    git clone https://github.com/Mono-Gen/NetVisualizer.git
    cd NetVisualizer
  2. Install dependencies:
    npm install

Running the App

  • Development Mode:
    npm run dev
    Then open http://localhost:5173 in your browser.
  • Desktop (Electron) Mode:
    npm run electron:dev

Building for Production

  • Web Build:
    npm run build
  • Portable Desktop App (Windows):
    npm run electron:build
    The portable .exe will be generated in the dist_electron directory.

🛠 Tech Stack

  • Frontend: React, TypeScript, Vite
  • Styling: Vanilla CSS (Modern aesthetic with Dark Mode)
  • Desktop: Electron
  • Bundler: Vite, Electron-Builder

📜 License

This project is licensed under the MIT License - see the LICENSE file for details.


Created for network students and curious learners to demystify the invisible layers of the internet.

About

No description, website, or topics provided.

Resources

Stars

6 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages