IP Tool is a Python-based command-line utility for working with IP addresses.
It provides various functionalities such as:
- converting binary IP to decimal IP
- determining IP class and private/public status
- calculating possible subnets
- and more.
- Converting a binary IP address to a dotted decimal notation IP address
- Converting an IP address to binary
- Finding the network address from an IP address and subnet mask
- Finding the network address from an IP/CIDR notation
- Calculating possible subnetting from an IP range
- Determining the IP class and private/public status
- Displaying all information for an IP address and subnet
- Clone this repository.
git clone https://github.com/nanafox/ipv4-learning.git
To use the command-line interface, navigate to the directory containing the ip_tool.py
script and run:
python ip_tool.py
Enter the binary IP address: 11000000.10101000.00000001.00000001
Decimal IP: 192.168.1.1
Enter the IP address: 192.168.1.1
Binary IP Address: 11000000.10101000.00000001.00000001
Enter the IP address: 192.168.1.1
Enter the subnet mask: 255.255.255.0
Network address with CIDR Notation: 192.168.1.0/24
Enter the IP address/CIDR: 192.168.1.1/24
Network address: 192.168.1.0
IP Subnet Mask: 255.255.255.0
Enter the IP network: 192.168.10.0
Enter the subnet mask or CIDR: 24
Enter new netmask/CIDR: 27
Base Network Address: 192.168.10.0/24
Base Network Mask: 255.255.255.0
Total Subnets Possible with prefix /27: 8
Total assignable IP Addresses per subnet: 30
First usable subnet: 192.168.10.0/27
Last usable subnet: 192.168.10.224/27
Wildcard mask: 0.0.0.255
PTR IP Address: 0.10.168.192.in-addr.arpa
PTR Network Address: 10.168.192.in-addr.arpa
Binary Subnet Mask: 11111111.11111111.11111111.00000000
Enter the IP network: 192.168.10.5
Enter the subnet mask or CIDR: 23
Enter new netmask/CIDR:
Possible Number of Subnets: 512
Total Assignable IP Address: 510
First assignable IP Address: 192.168.10.1
Last assignable IP Address: 192.168.11.254
Broadcast Address: 192.168.11.255
Wildcard mask: 0.0.1.255
PTR IP Address: 5.10.168.192.in-addr.arpa
PTR Network Address: 10.168.192.in-addr.arpa
Binary Subnet Mask: 11111111.11111111.11111110.00000000
Enter the IP address: 192.168.1.1
Network Class: C
Address Type: Private
Enter the IP address: 192.168.10.4
Enter the subnet mask or CIDR notation: 24
Network Address: 192.168.10.0
Subnet Mask: 255.255.255.0
CIDR Notation: 24
Possible Number of Subnets: 256
Total Assignable IP Address: 254
First assignable IP Address: 192.168.10.1
Last assignable IP Address: 192.168.10.254
Broadcast Address: 192.168.10.255
Wildcard mask: 0.0.0.255
PTR IP Address: 4.10.168.192.in-addr.arpa
PTR Network Address: 10.168.192.in-addr.arpa
Binary Subnet Mask: 11111111.11111111.11111111.00000000
Binary IP Address: 11000000.10101000.00001010.00000100
Network address with CIDR Notation: 192.168.10.0/24
Network Class: C
Address Type: Private
Follow the on-screen prompts to perform various IP-related tasks.
If you would like to contribute to this project, please feel free to submit a pull request or open an issue on GitHub.
This project is licensed under the MIT License.