FilippoCiarlo / Subnet-Visualization-Tool

This tool written in Python, for the CS50 Final Project, offers a graphical representation of IP subnets within a designated network. Users provide a network in CIDR notation, along with a list of Occupied Subnets, if any, and an end prefix length, to generate a visual tree of the Subnets using the Graphviz library.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Subnet Visualization Tool

Video Demo:

CS50.Final.Project.-.Subnets.Visualization.Tool.mp4

Description:

This project provides a tool to visualize IP Subnets within a given Network. It takes a network in CIDR notation, a list of occupied Subnets, and an end prefix length to determine the depth of the subnet tree. The tool then generates a visual representation of the Subnets using the Graphviz library.

Features

  • Visualize a given network's Subnets up to a specified Subnet Mask.
  • Highlight Occupied Subnets within the Network.
  • Option for a full representation of Occupied Subnets.

Requirements

Usage

1. Clone the repository:

git clone https://github.com/FilippoCiarlo/Subnet-Visualization-Tool.git
cd Subnet-Visualization-Tool

2. Install the required libraries:

pip install ipaddress
pip install graphviz

3. Run the main script:

python main.py

4. Enter the Target Network Address in CIDR notation:

Input the IP address of the network you wish to analyze, using Classless Inter-Domain Routing (CIDR) notation. CIDR notation is a method used to create unique identifiers for networks and individual devices. This notation combines the standard IP address with a suffix that indicates the number of bits that represent the network portion of the address. For example, '192.168.1.0/24' indicates a network IP address of '192.168.1.0' with a subnet mask of 24 bits. This step is crucial for accurately defining the scope and range of the network for your analysis.

Network

5. Enter the Count and Details of Occupied Subnets in CIDR notation:

Specify the number of subnets that are currently in use within your network, and provide their corresponding IP addresses using Classless Inter-Domain Routing (CIDR) notation.

Occupied Subnets

6. Choose for a Full or Compact Representation of the Subnet:

Full or Compact Representation

6.1 Full Representation

This approach is comprehensive in nature, showcasing every layer of the network without exception. In Full Representation, all subnets, including subnets within occupied subnets, are displayed. This method ensures a complete, detailed view of the network's structure, leaving no stone unturned. It’s particularly useful for in-depth analysis, allowing network administrators to see every component and their interconnections.

Full Representation

6.2 Compact Representation

In contrast, the Compact Representation adopts a more streamlined approach. When a subnet is occupied, its internal subnets are not visualized in the diagram. This form of representation focuses on the broader picture, omitting the finer details of occupied subnets. It’s akin to viewing a tree without examining the occpied leafs. This method is beneficial for general overviews or when the details of internal occupied subnets are not necessary for the task at hand.

Compact Representation

7. Define the Maximum Subnet Mask Value:

By specifying the maximum subnet mask for your network, you are effectively setting the tree depth in your network structure. This value determines how detailed or granular your network tree will be, representing the deepest level of subnetting possible within your network hierarchy. A more specific subnet mask correlates with a deeper tree depth, allowing for finer segmentation and organization of network addresses.

Maximum Subnet Mask Value

8. Automatic Generation of Subnet Tree PDF:

Upon completion of the analysis, the tool will automatically generate a visual representation of the Subnet Tree. This visualization will be saved as a PDF file, named subnets_tree.pdf, and it will be located in your project's directory. This file provides a comprehensive graphical representation of the network's subnet structure, making it easier to understand and analyze the network's hierarchy and segmentation. You can access this file in the specified directory to view, share, or print the subnet tree for further use or documentation purposes.

subnets_tree file

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

About

This tool written in Python, for the CS50 Final Project, offers a graphical representation of IP subnets within a designated network. Users provide a network in CIDR notation, along with a list of Occupied Subnets, if any, and an end prefix length, to generate a visual tree of the Subnets using the Graphviz library.


Languages

Language:Python 100.0%