Subnethero is a powerful C-based command-line tool designed to help network administrators and IT professionals generate subnetting tables and manage IP ranges for different network configurations. Whether you're using a flat approach, FLSM (Fixed-Length Subnet Mask), or VLSM (Variable-Length Subnet Mask), this tool will streamline the process of subnetting and ensure you get precise network breakdowns.
- Multiple subnetting approaches (flat, flsm, vlsm)
- Simple command-line interface
- Displays subnet information in a clear tabular format
- Generates subnetting tables with efficient algorithm
- Save the output to a csv file
- Parse csv to get network configuration
- IP lookup to know which subnet owns an IP
- Download subnethero with git
git clone https://github.com/giovanni-iannaccone/subnethero
cd subnethero- Compile it using make
make allsubnethero v1.0
Usage:
subnethero [-t | -f | -v] -c cidr -i ip -s n {n devices for each network}
Options:
-t | --flat use the flat approach
-f | --flsm use the flsm approach
-v | --vlsm use the vlsm approach
-i | --ip specify the IP of the base network
-c | --cidr the CIDR of the original network
-s | --subs number of subnetworks (followed by n devices for each network)
Optional:
-p | --input read network configuration from a csv file
-o | --output copy the output into csv file
-l | --lookup find which subnet owns an ip
Example: subnethero -v -c 24 -i 192.168.1.0 -s 3 64 5 15
-
-t|--flat
This option uses a flat approach to subnetting, dividing the network into one big subnet. -
-f|--flsm
This option applies the Fixed-Length Subnet Mask method, creating subnets of the same size based on the given number of devices. -
-v|--vlsm
This option uses the Variable-Length Subnet Mask method, where each subnet can vary in size according to the number of devices specified. -
-i|--ip
Enter the starting IP address of the network you want to subnet (e.g., 192.168.1.0). -
-c|--cidr
Specify the CIDR notation for the original network (e.g., /24). -
-s|--subs
Define the number of subnets you need, followed by the number of devices in each subnet. The tool will calculate the necessary subnet masks. -
-p|--input
Read network configuration from a csv file and do calculations on that configuration (e.g.,lookup). -
-o|--output
Copy the output to a csv file (e.g., output.csv), don't specify anything to print the table to stdout. -
-l|--lookup
To determine which subnet a specific IP address belongs to, simply add the-l IPflag at the end of your command.
For each subnet, the output will generate the following columns:
| IP | CIDR | Broadcast | Start | End | Free from | to |
|---|---|---|---|---|---|---|
| 192.168.1.0 | /26 | 192.168.1.63 | 192.168.1.1 | 192.168.1.32 | 192.168.1.33 | 192.168.1.62 |
| 192.168.1.64 | /26 | 192.168.1.127 | 192.168.1.65 | 192.168.1.69 | 192.168.1.70 | 192.168.1.126 |
| 192.168.1.128 | /26 | 192.168.1.191 | 192.168.1.129 | 192.168.1.143 | 192.168.1.144 | 192.168.1.190 |
We welcome contributing. See CONTRIBUTING.md file for details
This project is licensed under the GPL-3.0 License. See the LICENSE file for details.
- For any inquiries or support, please contact iannacconegiovanni444@gmail.com .
- Visit my site for more informations about me and my work https://giovanni-iannaccone.github.io
