Skip to content

A Python script simulating network topologies and protocols like CSMA/CD, ARQ, with switch functionality for educational purposes.

Notifications You must be signed in to change notification settings

tusharv01/network-simulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Network Simulation

This Python script simulates a network with end devices, hubs, and switches. Demonstrates CSMA/CD, Go-Back-N, Selective Repeat, and Stop-and-Wait ARQ.


Usage

  1. Clone the Repository
    git clone https://github.com/yourusername/network-simulator.git
    

Navigate to the Directory

cd network-simulator

Run the Script

python network_simulator.py

Test Cases

  1. Dedicated Connection Establishes a dedicated connection between two end devices.

    • Input: Message from Device 1 to Device 2.
  2. Star Topology Simulates a star topology with five end devices connected to a hub.

    • Input: Message from a randomly selected device.
  3. Switch Network Demonstrates a switch network with CSMA/CD, Go-Back-N, and Selective Repeat ARQ.

    • Input: Sender, receiver, message, and protocol choice.
  4. Interconnected Star Topologies Simulates two star topologies connected by a switch.

    • Input: Message between randomly selected devices.

Additional Features

  • CSMA/CD: Detects collisions in shared media.
  • Go-Back-N ARQ: Retransmits a window of frames.
  • Selective Repeat ARQ: Retransmits only lost frames.
  • Stop-and-Wait ARQ: Waits for acknowledgment before sending next frame.

Author: Tushar Verma

About

A Python script simulating network topologies and protocols like CSMA/CD, ARQ, with switch functionality for educational purposes.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages