CaptainBeluga / ip-calculator

calculate subnetmask, network_id , broadcast_id, hosts and potential hosts by an ip address (CIDR notation)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Subnet Mask and IP Calculator πŸŒπŸ“ˆ

Python Version

This project is a Python script to calculate the subnet mask, network address, broadcast address, and the number of available hosts between the IP addresses (written in CIDR notation).

πŸš€ Features

  • Convert IP addresses from dotted-decimal notation (e.g., "192.168.0.1") to binary format.

  • Extract the subnet mask from an IP address in CIDR notation and convert it to binary.

  • Calculate the network address and broadcast address using logical AND and OR operations with the subnet mask.

  • Determine the number of available hosts within the given network.

    πŸ› οΈ Usage

  1. Clone the repository: https://github.com/CaptainBeluga/ip-calculator.git

  2. Run the script: python ip_calc.py

  3. Enter the IP address in CIDR notation (e.g., "192.168.0.0/24")

πŸ˜πŸ‘Œ

About

calculate subnetmask, network_id , broadcast_id, hosts and potential hosts by an ip address (CIDR notation)

License:MIT License


Languages

Language:Python 100.0%