A Python-based subnet calculator that provides IPv4 network information using CIDR notation.
- IPv4 address validation.
- CIDR prefix identification.
- Subnet mask calculation.
- Wildcard mask calculation.
- Network address calculation.
- Broadcast address calculation.
- First and last usable host addresses.
- Total IP address calculation.
- Usable host calculation.
- Support for
/31and/32networks.
- Python 3
- ipaddress (Python Standard Library)
Clone this repository:
git clone https://github.com/pradipta-web/python-subnet-calculator.gitNavigate to the project directory:
cd python-subnet-calculatorRun the program:
py main.pyEnter an IPv4 address followed by its CIDR prefix.
Example:
Enter IPv4 address with CIDR: 192.168.10.25/24
IP Address : 192.168.10.25
CIDR : /24
Subnet Mask : 255.255.255.0
Wildcard Mask : 0.0.0.255
Network Address : 192.168.10.0
Broadcast Address: 192.168.10.255
First Host : 192.168.10.1
Last Host : 192.168.10.254
Total Addresses : 256
Usable Hosts : 254
- Understanding IPv4 addressing.
- Learning CIDR notation.
- Understanding subnet masks.
- Learning network and broadcast addresses.
- Practicing Python programming.
- Using Python's ipaddress module.
This project is intended for educational purposes and networking practice.
Kinervaaa