Hatemaliyan / Subnet-calculator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Subnet Calculator

This is a Python program that calculates and prints information about a subnet based on user input.

It uses the re library to validate user input and the SubnetCalculator class to perform subnet calculations.

Usage

To use the program, run the calculate_subnet() function. The function will prompt the user to enter an IP address, a subnet mask in CIDR notation (optional), and whether to partition by number of hosts or number of subnets.

The user will also be prompted to enter a number of hosts or subnets, depending on their choice of partitioning type.

The program will then calculate and print the following information about the subnet:

Subnet mask (in mask decimal format) Subnet in CIDR Number of hosts Number of subnets Network address Broadcast address

Dependencies

The program requires the re library, which is part of the Python standard library and does not require any additional installation or setup.

License

This program is licensed under the MIT License. See the LICENSE file for more information.

About


Languages

Language:Python 100.0%