Network Report 2
Network Report 2
BY:
Haneen Khaled Ebrahim
231027213
Youssef Adel
231027101
Prepared for:
Dr. Mahmoud Safwat
Dr. Ramy Saeed
INTRODUCTION
In the modern era, computer networking has become an integral part of almost every industry.
Professionals, students, and researchers alike need tools that help them understand and simulate
networking concepts effec vely. A network simulator provides an interac ve and cost-efficient
environment to visualize and experiment with network topologies, device configura ons, and
connec vity scenarios. However, most exis ng simulators are either too complex, not customizable, or
lack intui ve user interfaces for beginners.
This report presents a Network Simulator designed to meet these needs. It aims to assist learners and
networking professionals in understanding fundamental networking concepts, such as device
management, IP addressing, subne ng, and connec on handling, all within an intui ve graphical
environment.
LITERATURE SURVEY
The field of network simula on has been well-explored in various research studies and prac cal
applica ons. Several network simula on tools have been developed to meet different needs. Commonly
used simulators include:
1. Cisco Packet Tracer: It provides a graphical interface to create and simulate network topologies
but is o en complex for beginners and restricted to Cisco devices.
3. NS3 (Network Simulator 3): It is used for research and academic purposes.
While these tools are well-established, they o en suffer from usability issues for beginners or
lack the flexibility to simulate simpler network environments interac vely. Our proposed
simulator seeks to fill this gap by offering a user-friendly, flexible solu on for visualizing and
managing basic network topologies.
• Network Connec ons: Users can establish connec ons between devices by selec ng two devices and
drawing a connec on between them, simula ng network links.
• Graphical Interface: A canvas displays network devices as images, with draggable devices and editable
se ngs.
• Message Simula on: The tool supports simula ng messages between connected PCs, with logic that
checks if the devices are in the same network and connected appropriately.
SOURCE CODE:
1. Imports:
• tkinter (aliased as tk): For the GUI frame
• Sets up the main window (self.root), canvas for drawing network devices, and bu ons for user
interac on.
• Ini alizes a dic onary self.devices to store devices with their details (ID, type, posi on,
se ngs, connec ons).
• Ini alizes a list self.connec ons to store network connec ons between devices. • Loads device
images (router, switch, PC) for display on the canvas.
DEVICE MANAGEMENT:
• add_router(), add_switch(), add_pc(): Functions that allow adding specific types of devices
(routers, switches, PCs) to the simulation.
• add_device():A helper function that adds any device (router, switch, or PC) by generating a
random position for it on the canvas and assigning a unique device ID.
draw_device():Draws a device on the canvas at a given position, using an icon to represent
the device.
DEVICE INTERACTION:
start_connec on(): Ac vates connec on mode, allowing users to click two devices to form a network
connec on.
on_double_click(): Opens the settings window for configuring the selected device.
on_drag(): Moves a device across the canvas as the user drags it.
create_connection(): Creates a network connection (draws a line) between two devices on the
canvas.
move_device(): Moves a device to a new location on the canvas and updates its network
connections.
MESSAGE SENDING:
open_message_window: This will open a new window to simulate sending a message
between two devices by entering the sender and receiver's IP addresses.
send_message_action: This will check if both devices are on the same network or connected
through the same gateway. If they are, the message will be sent successfully; otherwise, an error
message will be displayed.
MAIN PROGRAM:
creates a Tkinter root window and runs the event loop, enabling user interaction. It allows device
selection, configuration, and message sending simulation. The program uses NetworkX for
network management and displays devices on a canvas in the GUI.
REQUIRED LIBRARIES:
• tkinter Official Documenta on
NETWORK TOPOLOGY:
The network environment simulates simple topologies, where the user can: 1. Add devices (Router,
Switch, PC) to the canvas.
• Add Devices: Users can add routers, switches, and PCs to the network with basic configura on se ngs
such as IP addresses.
• Make Connec ons: Users can connect devices and visualize the network topology in real- me.
• Move Devices: Devices can be dragged around on the canvas, and the connec ons are updated
automa cally. • Simulate Messages: Although the messaging func onality is in its preliminary stages, it
provides basic checks to determine if two PCs can communicate based on their subnet.
DISCUSSION
The simulator offers a simple yet effec ve way for beginners to experiment with network devices and
connec vity. While it excels in ease of use and flexibility, it is limited by:
• Device Support: Only a basic set of devices (Router, Switch, and PC) is supported.
• Message Simula on: The message simula on feature is not fully implemented, and real-world
networking protocols are not yet simulated in depth.
Despite these limita ons, the simulator serves as a great tool for learning fundamental networking
concepts.
CONCLUSION
This report provides a comprehensive analysis of the Network Simulator applica on, exploring its design,
func onality, and poten al for enhancing learning in the field of computer networking. The proposed
enhancements aim to improve the simulator's capabili es, making it a valuable tool for both educa onal
and professional use.
Sources:
• Online coding pla orms such as: § GeeksforGeeks § Real Python § Tutorialspoint
• Networking Concepts:
§ Concepts such as subnet masks and IP valida on are drawn from basic networking knowledge, o en
covered in resources like:
• Gemini
• ChatGpt