Skip to content
Snippets Groups Projects
README.md 6.21 KiB
Newer Older
Jro Luttringer's avatar
Jro Luttringer committed
# Graphic Subnetting Tool
Jro Luttringer's avatar
Jro Luttringer committed
Graphic Subnetting Tool (GST) is an in-navigator helper to perform subnetting automatically and visualize the impact of the subnetting scheme graphically, using a binary tree to represent the addressing space.
Jro Luttringer's avatar
Jro Luttringer committed

The Feature Walk-Through explains what one may do with GST. A more direct explanation of the elements of the GUI can be found afterwards.

Jro Luttringer's avatar
Jro Luttringer committed
The purpose of this tool is mainly pedagogical.

To open GST you can clone the repo and open the index.html file.
Even simpler, you can simply go to the page of this project to try it out : [https://jr.luttringer.pages.unistra.fr/gst/](https://jr.luttringer.pages.unistra.fr/gst/)
Jro Luttringer's avatar
Jro Luttringer committed

Jro Luttringer's avatar
Jro Luttringer committed
![GST GUI](example.png)
Jro Luttringer's avatar
Jro Luttringer committed

Jro Luttringer's avatar
Jro Luttringer committed
## Feature Walk-Through

### Input and Buttons

GST lets you specify a given prefix in the top most input box (10.0.0.0/24) by default. 

Once you press the "Draw Tree" button, a single grey node will appear, representing your prefix. You can click on this gray node to extend it, reveal the two biggest subprefixes within it (i.e., click on a /24 will reveal its two /25). You can click again to retract these nodes.

Note that when hovering your mouse over a node, useful information about the prefix are displayed (network ID, #IPs, IP range...)

To perform subnetting, two options are possible : automatic allocation, or manual allocation, each with its own orange button. 

The Allocate Auto button automatically allocate a subprefix, depending on the number of hosts. It requires a number of hosts as input, which can be feed through the input box on the left side of the button (showing 62 by default). When clicking Allocate Auto, GST finds the first prefix big enough to contain the number of hosts specified in the inbox box.

The Allocate Manual button allocate manually the desired prefix, whatever it may be. Note that the number of hosts must still be fed as an input : more precisely, one must indicate "#host:prefix" in the input box. By default, this box is filled to allocate 10.0.0.0/26 for 62 hosts. 

Note that the Allocate Manual button will check whether the allocation is possible, depending on currently used prefixes and number of hosts. It will also indicate if your subnetting is suboptimal. The message will be displayed in the box below the horizontal line. This is especially useful to check if one's subnetting works (e.g., for an exercise ;)

Allocated prefix can be freed through the Free Prefix Button. All allocations can be flushed through the Reset button. 

### Graphic Representation 

Below the button, one may see the current state of the addressing space. 

The box right below the horizontal line is used to display important messages, in particular detected errors when performing manual subnetting.

The addressing space is shown as a binary tree. A white node is simply an empty node that was extended. A grey node is an empty node that was not extended. 

When allocating prefixes (manually or automatically), the allocated prefix will become visible, and filled in orange. Note that this allocation is echoed on the parents, where the percentage of used IPs is shown as an inner circle in light orange. This is shown in light orange as it does not result from a direct allocation by the user, but results naturally from the allocation of a child node. This is updated when freeing prefixes, to always show the current occupancy of a prefix. 

Note that this occupancy is shown in terms of prefixes (i.e., it shows of many remaining available prefixes out of all the /32 are still available). However, you can (or sometimes, have to) allocate a bigger prefix that you'd like (e.g., a /26 for 34 machines). You can show how many actual /32 are used by click on the switch button. This machine occupancy will be shown in blue. 

Have fun ! 


## Quick manual of GUI elements 

### User input 

User input are handled by a couple of element : the input box and a button (to feed the input to the program)

*Draw Tree* : Draw the binary tree for the input prefix. Input format : IP/mask

*Allocate Auto* : Automatically allocate a prefix for the number of hosts provided as input. Input format : Integer

*Allocate Manual* : Manually allocate the prefix provided as input, for the number of machine provided as input. Input format : Integer:IP/mask (where Integer is the number of hosts)

*Free Prefix* : Free the prefix provided as input. Input format : IP/mask 

*Reset* : Free all prefixes. No input. 


### Graphic Representation 

#### Info Box 
The info box (below the horizontal line) print useful messages when trying to perform manual allocation, if the desired allocation cannot be performed or is suboptimal. 

#### Switch Button 
This button allows one to see either the prefix occupancy (i.e., how many /32 of a prefix are theoretically used) or the machine occupancy (i.e., how many machines are actually using an IP). Note that with a perfect optimal addressing, the two occupancies are the same. 

#### Prefix Tree & Color Schemes

The addressing space is shown as a binary tree where each node is a prefix. Click on a node shown the two biggest subprefixes of the prefix (i.e., clicking on a /25 shows two /26).

The colors shown on each node have a specific meaning. 

Light gray nodes are empty nodes (no allocation) that have not been extended (not clicked). 

White nodes are empty node (no allocation) that have been extended. 

Bright orange nodes are prefixes that were directly allocated by the user through the Allocate Auto or Allocate Manual buttons. 

Dark gray nodes are nodes that may be used to address machines. In other words, they belong to a bigger prefix that has been allocated.

Jro Luttringer's avatar
Jro Luttringer committed
Nodes may possess an inner light orange circle, showing how many of the /32 they possess are allocated. These appear when a child of a given node is allocated. When a node is fully shown in light orange, it means that both its children are saturated. 
Jro Luttringer's avatar
Jro Luttringer committed

When using the switch button, nodes may possess an inner blue circle, showing how many of its IPs (/32) are actually used by machines. This enables to show how much space is wasted when performing suboptimal allocation.


Jro Luttringer's avatar
Jro Luttringer committed
---
Jro Luttringer's avatar
Jro Luttringer committed

This project was coded by Jean-Romain Luttringer, using the d3 library and https://github.com/fhightower/d3-dynamic-tree as a base.

Like the original, this is licensed under the GNU General Public License, version 3 license.