- Notifications
You must be signed in to change notification settings - Fork0
IPV4 CLI Subnet Calculator With VLSM support, made with python, no optional libraries required. python3 supported
License
himansaBro/Advanced-subnet-calculator
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Advanced Subnet Calculator is a CLI tool written in Python for calculating IPv4 subnets. This tool supports both standard subnetting and Variable Length Subnet Masking (VLSM). It is designed to help network administrators and enthusiasts efficiently manage and allocate IP addresses within a network.
- Convert decimal to 8-bit binary and vice versa
- Binary counting for subnet calculations
- Generate subnets based on the main network address, CIDR, and the number of subnets
- Calculate subnet masks, network addresses, broadcast addresses, and maximum nodes
- Support for both standard subnetting and VLSM
- Input validation for IP addresses and subnet counts
- Python 3.10 or higher
- Compatible with Windows, Linux, and macOS
Clone the repository:
git clone https://github.com/himansaBro/Advanced-subnet-calculator.gitcd Advanced-subnet-calculatorRun the script:
python3 subnet_calculator.py
Standard Subnetting
Enter IP/CIDR..(e to exit)..............: 192.168.1.0/24Enter number of Subnets,0 for no subnets: 4Use VLSM Subnetting(y=yes/n=no/i=info)..: nOutput:
Main # 192.168.1.0/24 -Nodes : 256 -Subnet Mask : 255.255.255.0 -Network Adress : 192.168.1.0 -Brodcast Adress : 192.168.1.255 Subnet # 1 192.168.1.0 / 26 -Nodes : 64 -Subnet Mask : 255.255.255.192 -Network Adress : 192.168.1.0 -Brodcast Adress : 192.168.1.63VLSM Subnetting
Enter IP/CIDR..(e to exit)..............: 192.168.1.0/24Enter number of Subnets,0 for no subnets: 6Use VLSM Subnetting(y=yes/n=no/i=info)..: yOutput:
Main # 192.168.1.0/24 -Nodes : 256 -Subnet Mask : 255.255.255.0 -Network Adress : 192.168.1.0 -Brodcast Adress : 192.168.1.255 Subnet # 1 192.168.1.128 / 26 -Nodes : 64 -Subnet Mask : 255.255.255.192 -Network Adress : 192.168.1.128 -Brodcast Adress : 192.168.1.191 -Subnet Level : 0
This method is simpler and creates equal-sized subnets. It may lead to IP address wastage if the number of required subnets is not a power of 2.
This method allows for subnets of varying sizes, making efficient use of IP addresses. It is more flexible but also more complex.
The tool includes checks for:
- Valid IP addresses and CIDR notation
- Valid subnet counts that the network can handle
This project is licensed under the MIT License. See theLICENSE file for details.
Feel free to contribute to this project by submitting issues or pull requests. For major changes, please open an issue first to discuss what you would like to change.
- Developed by Himansa [CodeHack] (github.com/himansaBro)
- Inspired by network administration needs and IP address management
For suggestions, comments, or contributions, please contacthimansarajapacksha@gmail.com.
About
IPV4 CLI Subnet Calculator With VLSM support, made with python, no optional libraries required. python3 supported
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.